knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Hydrological Events demarcation

This is a basic example which shows you how to split your series into hydrological events:

library(dplyr)
library(loadflux)
data(djan)

df <- djan %>% 
  hydro_events(q = discharge, # Water discharge
               datetime = time, # POSISct argument
               window = 21) # Search window

head(df)

Plots

Then you can explore visually hydrological events via event_plot function. This function creates an interactive dygraph object which is rendered as html. Every coral stripe stands for one hydrological event.

library(dygraphs)

df %>%
  event_plot(q = discharge, # Y-axis
             datetime = time, #X-axis
             he = he) # Hydrological events

You can even explore both Water Discharge Q and Suspended Sedimnet Concentration SSC temporal variability:

library(dygraphs)

df %>%
  event_plot(q = discharge, # Y-axis
             ssc = SS,
             datetime = time, #X-axis
             he = he) # Hydrological events


atsyplenkov/loadflux documentation built on March 10, 2023, 8:18 p.m.