This function uses the readNWISstat to gather daily, monthly or yearly percentiles.

ww_statsUSGS(
  procDV,
  sites = NULL,
  temporalFilter = "daily",
  parameter_cd = NULL,
  days = 10,
  parallel = FALSE,
  verbose = TRUE,
  ...
)

Arguments

procDV

A previously created ww_dvUSGS object.

sites

A character USGS NWIS site.

temporalFilter

A character for the stat summary window, e.g. 'daily' (default), 'monthly', 'yearly'.

parameter_cd

A USGS code parameter code, only if using sites argument.

days

A numeric input of days to go back from today (only needed if using .temporalFilter = 'daily').

parallel

logical indicating whether to use future_map().

verbose

logical for printing information. TRUE (default).

...

arguments to pass on to future_map.

Value

a tibble with associated site statistics.

Note

Be aware, the parameter values ('Flow', 'Wtemp', etc) are calculated from the ww_floorIVUSGS function by taking the daily mean of the hourly data. Thus, the instantaneous values will look different than the daily mean values, as it should. The .temporalFilter argument is used to generate the window of percentiles.

Examples

if (FALSE) {
# get by date range

yaak_river_dv <- ww_dvUSGS('12304500')

#daily
yaak_river_stats <- ww_statsUSGS(yaak_river_dv,
                                 temporalFilter = 'daily',
                                 days = 10)
#monthly
yaak_river_stats <- ww_statsUSGS(yaak_river_dv,
                                 temporalFilter = 'monthly',
                                 days = 10)
#yearly
yaak_river_stats <- ww_statsUSGS(yaak_river_dv,
                                 temporalFilter = 'yearly',
                                 days = 10)
}