2009/2/26 Thomas Levine <thomas.lev...@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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.