This function calculates Turbidity Index (TI) following the description from Chalov & Tsyplenkov (2020)

TI(dataframe, ssc, datetime, round_time = "hour")

Arguments

dataframe

A data set object

ssc

Turbidity variable

datetime

a vector of date-time objects

round_time

unit a character string specifying a time unit or a multiple of a unit to be rounded to. Valid base units are `second`, `minute`, `hour`, `day`, `week`, `month`, `bimonth`, `quarter`, `season`, `halfyear` and `year`. See lubridate::round_date

Value

A numeric variable

References

Chalov SR, Tsyplenkov AS. 2020. Influence of macroturbulence on the dynamics of river water turbidity. Vestnik Moskovskogo universiteta. Seriya 5, Geografiya 0 (3): 34–46 (In Russ.)

Author

Anatoly Tsyplenkov and Sergey Chalov

Examples

library(dplyr)
data(djanturb)
output_table <- hydro_events(
  dataframe = djanturb,
  q = discharge,
  datetime = time,
  window = 21
)

output_table %>%
  filter(he == 2) %>%
  TI(
    ssc = discharge,
    datetime = time
  )
#> [1] 0.05008865