ww_dvUSGS {whitewater} | R Documentation |
Process USGS daily values
Description
This function is a wrapper around readNWISdv but includes added variables like water year, lat/lon, station name, altitude and tidied dates.
Usage
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. |
end_date |
A character of date format, e.g. |
stat_cd |
character USGS statistic code. This is usually 5 digits. Daily mean (00003) is the default. |
parallel |
|
wy_month |
|
verbose |
|
... |
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
## Not run:
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)
## End(Not run)
[Package whitewater version 0.1.3 Index]