Description Usage Arguments Value Examples
View source: R/simplify_weatherdata.R
For multi-station cities, aggregates numeric values of weather data, calculates their mean value for each day and simplifies the columns to an easy-to-use daily data format.
1 | simplify_weatherdata(weatherdata)
|
weatherdata |
Data frame containing the result of |
Modified data frame containing one row for each day; 2 columns containing date and mean weather data value for that date.
1 2 3 4 5 6 7 8 9 10 11 12 | ## 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")
# Get weatherdata for Berlin (only September)
weatherdata = get_weatherdata("TAVG", "GM000001", "2018-09-01", "2018-09-23")
# Since there are 2 stations with weather data for Berlin, we modify the data
weatherdata_simplified = simplify_weatherdata(weatherdata)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.