Classify flood levels as alert, minor and major and compute the total number of hours in each state
compute_flood_stats(data, DateTime, RiverWaterLevel, alert, major, minor)A list containing a tibble including new variable called state classifying flood level and total number of hours spent in each state
data frame with variables date and time, river water level, alert level, major flood level and minor flood level
Variable name corresponds to Date and Time (%Y-%m-%d %H:%M)
Variable name corresponds to the River Water Level
Alert level numeric value
Major flood level numeric value
Minor flood level numeric value