From the NOAA API docs: Describes the type of data, acts as a label. For example: If it's 64 degrees out right now, then the data type is Air Temperature and the data is 64.
ncdc_datatypes(datasetid = NULL, datatypeid = NULL,
datacategoryid = NULL, stationid = NULL, locationid = NULL,
startdate = NULL, enddate = NULL, sortfield = NULL,
sortorder = NULL, limit = 25, offset = NULL, token = NULL,
dataset = NULL, page = NULL, filter = NULL, ...)
(optional) Accepts a valid dataset id or a vector or list of them. Data returned will be from the dataset specified.
Accepts a valid data type id or a vector or list of data type ids. (optional)
Optional. Accepts a valid data category id or a vector or list of data category ids (although it is rare to have a data type with more than one data category)
Accepts a valid station id or a vector or list of station ids
Accepts a valid location id or a vector or list of location ids (optional)
(optional) Accepts valid ISO formated date (yyyy-mm-dd) or date time (YYYY-MM-DDThh:mm:ss). Data returned will have data after the specified date. The date range must be less than 1 year.
(optional) Accepts valid ISO formated date (yyyy-mm-dd) or date time (YYYY-MM-DDThh:mm:ss). Data returned will have data before the specified date. The date range must be less than 1 year.
The field to sort results by. Supports id, name, mindate, maxdate, and datacoverage fields (optional)
Which order to sort by, asc or desc. Defaults to asc (optional)
Defaults to 25, limits the number of results in the response. Maximum is 1000 (optional)
Defaults to 0, used to offset the resultlist (optional)
This must be a valid token token supplied to you by NCDC's Climate Data Online access token generator. (required) See Authentication section below for more details.
THIS IS A DEPRECATED ARGUMENT. See datasetid.
THIS IS A DEPRECATED ARGUMENT. There is no equivalent argument in v2 of the NOAA API.
THIS IS A DEPRECATED ARGUMENT. There is no equivalent argument in v2 of the NOAA API.
Curl options passed on to HttpClient
(optional)
A data.frame
for all datasets, or a list of length two,
each with a data.frame
Get an API key (aka, token) at http://www.ncdc.noaa.gov/cdo-web/token. You can pass your token in as an argument or store it one of two places:
your .Rprofile file with an entry like
options(noaakey = "your-noaa-token")
your .Renviron file with an entry like
NOAA_KEY=your-noaa-token
See Startup
for information on how to create/find your
.Rrofile and .Renviron files
Other ncdc: ncdc_combine
,
ncdc_datacats
, ncdc_datasets
,
ncdc_locs_cats
, ncdc_locs
,
ncdc_plot
, ncdc_stations
,
ncdc
# NOT RUN {
# Fetch available data types
ncdc_datatypes()
# Fetch more information about the ACMH data type id, or the ACSC
ncdc_datatypes(datatypeid="ACMH")
ncdc_datatypes(datatypeid="ACSC")
# datasetid, one or many
## ANNUAL should be replaced by GSOY, but both exist and give
## different answers
ncdc_datatypes(datasetid="ANNUAL")
ncdc_datatypes(datasetid="GSOY")
ncdc_datatypes(datasetid=c("ANNUAL", "PRECIP_HLY"))
# Fetch data types with the air temperature data category
ncdc_datatypes(datacategoryid="TEMP", limit=56)
ncdc_datatypes(datacategoryid=c("TEMP", "AUPRCP"))
# Fetch data types that support a given set of stations
ncdc_datatypes(stationid='COOP:310090')
ncdc_datatypes(stationid=c('COOP:310090','COOP:310184','COOP:310212'))
# Fetch data types that support a given set of loncationids
ncdc_datatypes(locationid='CITY:AG000001')
ncdc_datatypes(locationid=c('CITY:AG000001','CITY:AG000004'))
# }
Run the code above in your browser using DataLab