Description Usage Value References Examples
get_cities
is a function that lists all the available cities for
which the data can be fetched with get_weatherdata
along with
their data availability details.
1 |
Data frame containing information about all the cities for which weather data is available and the time period of the data. The following columns are returned:
mindate - minimum date from which data is available
maxdate - maximum date upto which data is available
datacoverage - measure of data availability in the time period
id - city ID (required for using get_weatherdata
)
country - country ID
City - city name
API Reference: https://www.ncdc.noaa.gov/cdo-web/webservices/v2#locations
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# First get your API-token here: https://www.ncdc.noaa.gov/cdo-web/token
# Then, set it as system variable (as character variable):
Sys.setenv("NOAA_TOKEN" = "YOUR_TOKEN_GOES_IN_HERE")
cities = get_cities()
head(cities)
head(cities[which(cities$country == "SW"), ]) # Cities in Sweden
head(cities[which(cities$country == "GM"), ]) # Cities in Germany
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.