Description Usage Arguments Details Value Note Author(s) References See Also Examples
A user provides a city name and a radius. This function then goes and finds weather stations within the specified radius.
1 | getWeatherData(locale = "Montreal,CA", distance = 20, statLimit = 150)
|
locale |
A city/state/country name |
distance |
A distance/radius in miles |
statLimit |
A limit on the number of stations to be returned |
None
An S4 object containing weather information for each personal weather station found
None
Steve Pittard <wsp@emory.edu>
STATS290 Website
None
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## The function is currently defined as
function (locale = "Montreal,CA", distance = 20, statLimit = 150)
{
.onLoad = function(libname, pkgname) {
.libPaths("~wpittard/Library")
require("svMisc")
}
myLocs = getLatLon(locale, distance)
myStats = getStations(myLocs$locs, myLocs$iradius, statLimit)
if (length(myStats) == 0) {
stop("Sorry. No stations found within the specified radius")
}
baseStat = myStats[1]
myWeatherObj = getWeather(myStats, myLocs$mlat, myLocs$mlon,
myLocs$iradius, myLocs$origCity, baseStat)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.