all_metrics {hydropeak}R Documentation

Event Based Fluctuation Flow Parameters

Description

Given an event with equal flow trend, all metrics implemented in the package hydropeak are computed and combined to a data frame. It includes also an identifier of the gauging station provided by the user and the starting time of the event.

Usage

all_metrics(x, id, event_type)

Arguments

x

Data frame (time series) from an event with equal flow trend. The data frame must contain a date-time column (Time) and a flow rate column (Q) and must be in a compatible format (see flow()).

id

Character string which refers to the identifier of the gauging station (in Austria: HZBCODE).

event_type

Numeric value which indicates the event type. By using get_events(), this is internally computed. If metrics for a single event have to be computed individually, the event type has to be provided as an argument or can be computed with event_type().

Value

A data frame including all computed metrics, IDs of gauging stations, event type (see event_type() for an overview of possible event types), and starting time of an event x. Included metrics are amp(), mafr(), mefr(), dur(), ratio().

Examples

data(Q)
# decreasing event:
Q4 <- flow(Q[3:4, ])
all_metrics(Q4, id = Q$ID[1], event_type = 4)
all_metrics(Q4, id = Q$ID[1], event_type = event_type(Q4))

# increasing event:
Q2 <- flow(Q[486:487, ])
all_metrics(Q2, id = Q$ID[1], event_type = 2)
all_metrics(Q2, id = Q$ID[1], event_type = event_type(Q2))

# constant event (at beginning or after NA event):
Q0 <- flow(Q[1:3, ])
all_metrics(Q0, id = Q$ID[1], event_type = 0)
all_metrics(Q0, id = Q$ID[1], event_type = event_type(Q0))

[Package hydropeak version 0.1.2 Index]