[R] Download daily weather data

Thomas Levine thomas.levine at gmail.com
Fri Feb 27 01:58:12 CET 2009


Perhaps "coat" and "jacket" are more ambiguous in the United States than
the United Kingdom. If it's cold enough to warrant it, I wear a jacket
in the morning. If it isn't, I don't want to have to carry it around all
day. Checking the daily weather forecast is too much work, so I just go
by the current temperature in the morning, which leads to many false
positives.

Thomas Levine!


On Thu, 2009-02-26 at 22:51 +0000, Barry Rowlingson wrote:

> 2009/2/26 Thomas Levine <thomas.levine at gmail.com>:
> > I'm writing a program that will tell me whether I should wear a coat,
> > so I'd like to be able to download daily weather forecasts and daily
> > reports of recent past weather conditions.
> >
> > The NOAA has very promising tabular forecasts
> > (http://forecast.weather.gov/MapClick.php?CityName=Ithaca&state=NY&site=BGM&textField1=42.4422&textField2=-76.5002&e=0&FcstType=digital),
> > but I can't figure out how to import them.
> >
> > Someone must have needed to do this before. Suggestions?
> 
>  You could use my geonames package that uses the GeoNames query
> service. There's a sample queries here:
> 
> http://geonames.r-forge.r-project.org/
> 
>  Easiest is probably to use GNfindNearByWeather:
> 
>  > as.data.frame(GNfindNearByWeather(57,-2))
>          clouds weatherCondition
> 1 broken clouds              n/a
>                                              observation windDirection ICAO
> 1 EGPD 262120Z 25003KT 9000 -RA BKN018 06/05 Q1012 NOSIG           250 EGPD
>   elevation countryCode       lng temperature dewPoint windSpeed humidity
> 1        65          GB -2.216667           6        5        03       93
>       stationName            datetime  lat hectoPascAltimeter
> 1 Aberdeen / Dyce 2009-02-26 21:20:00 57.2               1012
> 
>  The package is on CRAN.
> 
>  There is of course an easier way to decide if you need to wear a
> coat, and that is to look out the window :)
> 
> Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090226/471e9449/attachment-0002.bin>


More information about the R-help mailing list