Learn R Programming

whitewater (version 0.1.4)

ww_wyUSGS: Water Year Stats (USGS)

Description

This function uses the results of the ww_dvUSGS object to generate mean, maximum, median, standard deviation and some normalization methods (drainage area, scaled by log and standard deviation) per water year.

Usage

ww_wyUSGS(procDV, sites = NULL, parallel = FALSE, verbose = TRUE, ...)

Value

A tibble filtered by water year with added meta-data.

Arguments

procDV

A previously created ww_dvUSGS object.

sites

A character vector with NWIS site numbers (optional).

parallel

logical indicating whether to use future_map().

verbose

logical for printing information. TRUE (default).

...

arguments to pass on to future_map and/or ww_dvUSGS.

Examples

Run this code
if (FALSE) {

library(whitewater)
yaak_river_dv <- ww_dvUSGS('12304500',
parameter_cd = '00060',
wy_month = 10)

yaak_river_wy <- ww_wyUSGS(yaak_river_dv)

#parallel

#get sites

huc17_sites <- dataRetrieval::whatNWISdata(huc = 17,
siteStatus = 'active',
service = 'dv',
parameterCd = '00060')

library(future)
#need to call future::plan()
plan(multisession(workers = parallelly::availableCores()-1))

pnw_dv <- ww_dvUSGS(huc17_sites$site_no,
parameter_cd = '00060',
wy_month = 10,
parallel = TRUE)

pnw_wy <- ww_wyUSGS(pnw_dv,
                    parallel = TRUE)
}

Run the code above in your browser using DataLab