Skip to contents

Estimates the typical maximum extent of the open water footprint in each unit as a percentile of all observations in the dataset, helping to correct for upland areas that may be included within each unit that are rarely, if ever, flooded.

Usage

estimate_flood_extent(
  df,
  prob = 0.95,
  full_prop_threshold = 0.55,
  wet_prop_threshold = 0.2
)

Arguments

df

Input tibble from format_watertracker().

prob

Single numeric value passed to quantile(); see Details.

full_prop_threshold

Numeric value (0-1); see Details.

wet_prop_threshold

Numeric value (0-1); see Details.

Value

tibble with added fields: ObservedAreaWater_pq, ObservedAreaWater_adjust, flood_prop, and flood_status

Details

For each unit, calculates ObservedAreaWater_pq as a percentile value, as determined by prob, of all ObservedAreaWaterHa in the dataset (as provided in the raw Water Tracker data). This value is intended to represent the typical upper limit of wetted area, to account for upland areas in the unit that are not typically flooded as part of regular management.

The value for prob should typically be set less than 1 to allow for outliers resulting from occasional extreme flooding events, such as driven by precipitation. (Note that providing multiple values of prob, while supported by the quantile() function, is not supported by this function.)

The ObservedAreaWater_adjust is then calculated to reflect this upper limit of wetted area, such that values of ObservedAreaWaterHa that exceed ObservedAreaWater_pq are reduced to this value. Likewise, flood_prop is calculated as the proportion of observed ObservedAreaWater_adjust on each date relative to this upper limit.

Finally a categorical flood_status is assigned to each observation date as:

  • full: flood_prop >= full_prop_threshold

  • wet: wet_prop_threshold <= flood_prop < full_prop_threshold,

  • trace: flood_prop > 0 but < wet prop threshold

  • dry: flood_prop = 0

Examples

df = format_watertracker(sampledat)
estimate_flood_extent(df)
#> # A tibble: 5,474 × 23
#>    wateryear month month_name  year obsdate    unit        WETLAND CLASS AREA_HA
#>        <dbl> <dbl> <fct>      <dbl> <date>     <chr>       <chr>   <chr>   <dbl>
#>  1      2013     5 May         2013 2013-05-11 SampleWetl… Sample… mana…    37.1
#>  2      2013     5 May         2013 2013-05-27 SampleWetl… Sample… mana…    37.1
#>  3      2013     6 Jun         2013 2013-06-12 SampleWetl… Sample… mana…    37.1
#>  4      2013     6 Jun         2013 2013-06-28 SampleWetl… Sample… mana…    37.1
#>  5      2013     7 Jul         2013 2013-07-14 SampleWetl… Sample… mana…    37.1
#>  6      2013     7 Jul         2013 2013-07-30 SampleWetl… Sample… mana…    37.1
#>  7      2013     8 Aug         2013 2013-08-10 SampleWetl… Sample… mana…    37.1
#>  8      2013     8 Aug         2013 2013-08-19 SampleWetl… Sample… mana…    37.1
#>  9      2013     8 Aug         2013 2013-08-26 SampleWetl… Sample… mana…    37.1
#> 10      2013     9 Sep         2013 2013-09-04 SampleWetl… Sample… mana…    37.1
#> # ℹ 5,464 more rows
#> # ℹ 14 more variables: AREA_AC <dbl>, Mosaic <chr>, MosaicDateStart <date>,
#> #   MosaicDateEnd <date>, ObservedPixels <dbl>, WaterPixels <dbl>,
#> #   ObservedAreaHa <dbl>, ObservedAreaWaterHa <dbl>, PercentObserved <dbl>,
#> #   PercentWater <dbl>, ObservedAreaWaterHa_pq <dbl>,
#> #   ObservedAreaWater_adjust <dbl>, flood_prop <dbl>, flood_status <chr>