View source: R/ncdc_locs_cats.r
ncdc_locs_cats | R Documentation |
Location categories are groupings of similar locations.
ncdc_locs_cats(
datasetid = NULL,
locationcategoryid = NULL,
startdate = NULL,
enddate = NULL,
sortfield = NULL,
sortorder = NULL,
limit = 25,
offset = NULL,
token = NULL,
...
)
datasetid |
A valid dataset id or a vector or list of dataset id's. Data returned will be from the dataset specified, see datasets() (required) |
locationcategoryid |
A valid location id or a vector or list of location category ids |
startdate |
A valid ISO formatted date (yyyy-mm-dd). Data returned will have data after the specified date. Paramater can be use independently of enddate (optional) |
enddate |
Accepts valid ISO formatted date (yyyy-mm-dd). Data returned will have data before the specified date. Paramater can be use independently of startdate (optional) |
sortfield |
The field to sort results by. Supports id, name, mindate, maxdate, and datacoverage fields (optional) |
sortorder |
Which order to sort by, asc or desc. Defaults to asc (optional) |
limit |
Defaults to 25, limits the number of results in the response. Maximum is 1000 (optional) |
offset |
Defaults to 0, used to offset the resultlist (optional) |
token |
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. |
... |
Curl options passed on to |
Locations can be a specific latitude/longitude point such as a station, or a label representing a bounding area such as a city.
A list containing metadata and the data, or a single data.frame.
Get an API key (aka, token) at https://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 the entry
options(noaakey = "your-noaa-token")
your .Renviron file with the entry
NOAA_KEY=your-noaa-token
See Startup
for information on how to create/find your
.Rrofile and .Renviron files
https://www.ncdc.noaa.gov/cdo-web/webservices/v2
Other ncdc:
ncdc_combine()
,
ncdc_datacats()
,
ncdc_datasets()
,
ncdc_datatypes()
,
ncdc_locs()
,
ncdc_plot()
,
ncdc_stations()
,
ncdc()
## Not run:
# All location categories, first 25 results
ncdc_locs_cats()
# Find locations with category id of CLIM_REG
ncdc_locs_cats(locationcategoryid='CLIM_REG')
# Displays available location categories within GHCN-Daily dataset
ncdc_locs_cats(datasetid='GHCND')
ncdc_locs_cats(datasetid='GSOY')
ncdc_locs_cats(datasetid='ANNUAL')
# multiple datasetid's
ncdc_locs_cats(datasetid=c('GHCND', 'GSOM'))
# Displays available location categories from start date 1970-01-01
ncdc_locs_cats(startdate='1970-01-01')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.