addWeather | R Documentation |
Adds a weather & instructions to a term object, returns the updated object.
If you specified an address in the term construction with newTerm
then this function will take care of everything automatically. Note that you
can add multiple weather stations to the "term" object with repeated calls of
this function.
addWeather(term, weather = NULL, formula = NULL, stationid = NULL, timeVar = NULL, tempVar = NULL, name = NULL)
term |
the term object to add data |
weather |
optional dataset if providing your own weather (rather than using the built-in integration with NOAA). |
formula |
optional specification of time variable and temp variable if providing your own weather. Example temp ~ date. |
stationid |
optional GHCN ID as found from |
timeVar |
optional manual specification of date variable if providing your own weather data. |
tempVar |
optional manual specification of temp variable if providing your own weather data. |
name |
optional name for this particular weather. Example name = "Sea-Tac" is way better than "SEATTLE-TACOMA INTERNATIONAL AIRPORT" |
the term object w/ weather added
newTerm
addData
addMethod
# Add weather stationSearch("Seattle, WA") mod <- addWeather(mod, stationid = "GHCND:USW00024234")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.