Description Usage Arguments Slots Author(s) Examples
A class to query the weather data of a place from multiple Personal Weather Stations
Generic Method for getPWSinfo defined
Method of class WGround to get PWS data for a location Return object with data frame with pws info. Throws an error if object is invalid.
Generic Method for CurrentWeatherbyPWS defined
Method of class WGround to get Current weather conditions Return object with data frame with conditions. Throws an error if object is invalid.
Generic Method getHistoricalWeather defined
Method of class WGround to get Historical weather data Return data frame with historical weather data. Throws an error if object is invalid.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | getPWSinfo(object, verbose = TRUE, distance_mi = numeric(0),
maxPWScount = numeric(0))
## S4 method for signature 'WGround'
getPWSinfo(object, verbose = TRUE,
distance_mi = numeric(0), maxPWScount = numeric(0))
CurrentWeatherbyPWS(object, verbose = TRUE)
## S4 method for signature 'WGround'
CurrentWeatherbyPWS(object, verbose = TRUE)
getHistoricalWeather(object, startDt, endDt, maxPWScount = 3,
verbose = TRUE)
## S4 method for signature 'WGround'
getHistoricalWeather(object, startDt, endDt,
maxPWScount = 3, verbose = TRUE)
|
object |
the WGround object |
verbose |
mode |
distance_mi |
distance from specified location |
maxPWScount |
maximum number of PWS received |
startDt |
start date for historical data |
endDt |
end date for historical data |
APIkey
API key from Wunderground website
city
A valid city name
country
A valid country name
state
A valid US state name
pws
A data frame of all PWS
selectedpws
A data frame of user selected PWS
conditions
A data frame of current conditions for selected PWS
runmode
online or offline, default: online
Siddhartha Jetti - 50% & Atul Lal - 50%
1 2 3 4 5 6 7 8 | obj <- new("WGround", city="Fremont",state= "CA",runmode="offline")
obj <- getPWSinfo(obj,verbose=FALSE)
obj@selectedpws <- obj@pws[obj@pws$id == 'KCAFREMO83'|obj@pws$id == 'KCAFREMO88',]
obj <- CurrentWeatherbyPWS(obj,verbose=FALSE)
df_hist <- getHistoricalWeather(obj,verbose=FALSE,startDt="2017/01/01",endDt="2017/01/01")
head(df_hist,5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.