View source: R/stage_nwis_sitelist.R
stage_nwis_sitelist | R Documentation |
finds all NWIS sites that meet given data requirements
stage_nwis_sitelist(vars, min.obs = 100, site.types = "ST", HUCs = 1:21,
folder = NULL, verbose = TRUE, p_codes)
vars |
a character vector of mda.streams var codes, as in
|
min.obs |
minimum number of observations of the vars that a site must have to be accepted |
site.types |
character vector of acceptable NWIS site types as in https://maps.waterdata.usgs.gov/mapper/help/sitetype.html |
HUCs |
character or numeric vector of HUC codes, e.g., 1:3 or '04' |
folder |
directory path, or NULL, indicating where to save the file or (NULL) to return it as a character vector |
verbose |
logical. Should status messages be given? |
p_codes |
optional - allows you to specify p_codes that aren't in
|
a character vector of NWIS sites, appended with 'nwis_'
## Not run:
stage_nwis_sitelist(vars=c('doobs','wtr','disch','stage'),
state_codes=c("wi","Michigan"))
sites <- stage_nwis_sitelist(
p_codes=get_var_src_codes(var=="doobs",!is.na(p_code),out="p_code"),
state_codes=c("all"), verbose=TRUE)
sites_file <- stage_nwis_sitelist(
p_codes=get_var_src_codes(var=="doobs",!is.na(p_code),out="p_code"),
state_codes=c("wi"), folder=tempdir()); readLines(sites_file)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.