Learn R Programming

whitewater (version 0.1.4)

ww_statsUSGS: USGS stats

Description

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

Usage

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

Value

a tibble with associated site statistics.

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.

Examples

Run this code
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)
}

Run the code above in your browser using DataLab