| eventPOT {hydroEvents} | R Documentation |
Event identification (using a peak over threshold algorithm)
Description
Identify events using a specified threshold value over which an event is considered to have occurred.
Usage
eventPOT(data, threshold = 0, min.diff = 1, out.style = "summary")
Arguments
data |
A data vector |
threshold |
Value above which an event is considered to have occurred |
min.diff |
Spacing required for two events to be considered separate |
out.style |
The type of output (currently either "summary" or "none") |
Details
The threshold can be thought of a value below which the data are considered to be "zero".
The min.diff can be viewed as the minimum spacing for event independence.
Value
By default, the out.style returns the indices of the maximum in each event, as well as the value of
the maximum and the sum of the data in each event, alongside the start and end of the events. Otherwise just
the indices of start and end of events as a two column dataframe are returned.
See Also
calcStats eventBaseflow eventMaxima eventMinima
Examples
# Example using streamflow data
bf = baseflowB(dataBassRiver, alpha = 0.925)
qf = dataBassRiver - bf$bf
events = eventPOT(qf)
plotEvents(qf, dates = NULL, events = events, type = "lineover",
main = "Events (plotted on quickflow)")
plotEvents(dataBassRiver, dates = NULL, events = events, type = "lineover",
main = "Events (plotted on streamflow)")
# Examples using rainfall data
events = eventPOT(dataLoch, threshold = 0, min.diff = 1)
plotEvents(dataLoch, dates = NULL, events = events, type = "hyet",
main = "Rainfall Events (threshold = 0, min.diff = 1)")
events = eventPOT(dataLoch, threshold = 2, min.diff = 2)
plotEvents(dataLoch, dates = NULL, events = events, type = "hyet",
main = "Rainfall Events (threshold = 2, min.diff = 2)")