View source: R/anlz_hydroload.R
anlz_hydroload | R Documentation |
Estimate hydrological estimates and adjustment factors for bay segments
anlz_hydroload(yrs, noaa_key = NULL, trace = FALSE)
yrs |
numeric vector indicating years to return |
noaa_key |
user-supplied NOAA key, see details |
trace |
logical indicating if function progress is printed in the consol |
This function uses rainfall and streamflow data from NOAA and USGS and requires an API key. See the "Authentication" section under the help file for ncdc in the defunct rnoaa package. This key can be added to the R environment file and called for later use, see the examples.
These estimates are used in annual compliance assessment reports produced by the Tampa Bay Nitrogen Management Consortium. Load estimates and adjustment factors are based on regression models in https://drive.google.com/file/d/11NT0NQ2WbPO6pVZaD7P7Z6qjcwO1jxHw/view?usp=drivesdk
A data frame with hydrological load estimates by bay segments for the requested years
## Not run:
# this function requires an API key
# save it to the R environment file (only once)
# save the key, do only once
cat("NOAA_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n",
file=file.path(normalizePath("~/"), ".Renviron"),
append=TRUE)
# retrieve the key after saving, may need to restart R
noaa_key <- Sys.getenv('NOAA_key')
# get estimates for 2021
anlz_hydroload(2021, noaa_key)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.