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,
...
)
A vector of USGS NWIS sites
A USGS code for metric, default is "00060".
A character of date format, e.g. "1990-09-01"
A character of date format, e.g. "1990-09-01"
character USGS statistic code. This is usually 5 digits. Daily mean (00003) is the default.
logical
indicating whether to use future_map().
numeric
indicating the start month of the water year. e.g. 10 (default).
logical
for printing information. TRUE (default).
arguments to pass on to future_map.
A tibble
with daily metrics and added meta-data.
Use it the same way you would use readNWISdv.
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)
}