Indexes periods of drought consecutively per site (idx), and provides an a numeric value in days that the drought lasted preceding days are also counted (if not overlapping with a previous drought for comparison purposes)

index_flue(df)

Arguments

df

a machine learning data frame

Value

the same data frame with numbered drought instances per site, as well as the consecutive days the drought lasted, as well as the preceding 20 days if no overlap with other droughts is present