This function is a wrapper around readNWISdv but includes added variables like water year, lat/lon, station name, altitude and tidied dates.

ww_dvUSGS(
  sites,
  parameter_cd = "00060",
  start_date = "",
  end_date = "",
  stat_cd = "00003",
  parallel = FALSE,
  wy_month = 10,
  verbose = TRUE,
  ...
)

Arguments

sites

A vector of USGS NWIS sites

parameter_cd

A USGS code for metric, default is "00060".

start_date

A character of date format, e.g. "1990-09-01"

end_date

A character of date format, e.g. "1990-09-01"

stat_cd

character USGS statistic code. This is usually 5 digits. Daily mean (00003) is the default.

parallel

logical indicating whether to use future_map().

wy_month

numeric indicating the start month of the water year. e.g. 10 (default).

verbose

logical for printing information. TRUE (default).

...

arguments to pass on to future_map.

Value

A tibble with daily metrics and added meta-data.

Note

Use it the same way you would use readNWISdv.

Examples

if (FALSE) {

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

#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 = availableCores()-1))

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

}