get_NOAA_GHCND | R Documentation |
Obtain daily climatic summary data for a set of station IDs, years, and datatypes.
Note that typically results from the NOAA API are limited to 1000 records. However, by "chunking" up data into individual stationyeardatatypeid combinations, record results generally do not exceed 365 records for daily summaries.
In order to use this function, you must obtain an API token from this website: https://www.ncdc.noaa.gov/cdo-web/token
get_NOAA_GHCND(stations, years, datatypeids, apitoken)
stations |
Station ID (e.g. |
years |
One or more years (e.g. 2017:2020) |
datatypeids |
One or more NOAA GHCND data type IDs (e.g |
apitoken |
API key token for NOAA NCDC web services (https://www.ncdc.noaa.gov/cdo-web/token) |
A data.frame containing the GHCND data requested (limit 1000 records)
#' ## in order to use this function, you must obtain an API token from this website:
## https://www.ncdc.noaa.gov/cdo-web/token
# get_NOAA_GHCND(c("GHCND:USC00388786", "GHCND:USC00388787"),
# years = 2017:2020,
# datatypeids = c("PRCP","SNOW"),
# apitoken = "yourtokenhere")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.