The loadflux
package is build for the comprehensive analysis of the intra-event suspended sediment dynamics.
You can install the development version from GitHub with:
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,
datetime = time,
window = 21)
head(df)
#> # A tibble: 6 x 4
#> he time discharge SS
#> <dbl> <dttm> <dbl> <dbl>
#> 1 1 2017-06-06 12:00:00 0.778 227.
#> 2 1 2017-06-06 13:00:00 0.778 NA
#> 3 1 2017-06-06 14:00:00 0.778 224.
#> 4 1 2017-06-06 15:00:00 0.778 NA
#> 5 1 2017-06-06 16:00:00 0.778 271.
#> 6 1 2017-06-06 17:00:00 0.925 NA
Then you can plot the hysteresis loop by running hysteresis_plot
library(ggplot2)
df %>%
filter(he == 2) %>%
hysteresis_plot(q = discharge,
ssc = SS,
base_font_size = 14)
This package also contains several function for hysteresis index calculation:
Added
SHI
- Simple Hystersis Index from Tsyplenkov et al., 2020AHI
- Aich’s Hysteresis Index from Aich et al., 2014Pending
HImid
- Hysteresis Index from Lawler et al., 2006To calculate a hysteresis index for your event run as follows: