Open TransitScreen opened 12 years ago
NWS offers near real-time weather data in XML:
http://www.weather.gov/xml/current_obs/KDCA.xml
(if you load it in a browser, it looks like a Web page, because it has a stylesheet, but it's actually an XML file)
So, what do we want this to look like? Current conditions? Forecast for tomorrow? High and low temperature?
If it's current conditions only, then that's easy to get with the feed linked above; if we want forecasts, they're easy to get from the NDFD, but parsing the NDFD XML takes a little more work.
We'll also need a caching mechanism for this data; the weather doesn't change every 20 seconds.
I'm thinking users would want to know if it's going to rain or not so they know whether to take a bike. Temperature might be helpful too, especially when it's near freezing.
So, temperature and conditions at the current time and for the next four hours. That should cover the majority of urban trips.
For now, I guess we could cache just the KDCA predictions, once every 5 minutes.
Writing some calls for NDFD would be a good start. http://graphical.weather.gov/xml/
Weather would be nice to have when determining whether to use bikeshare or transit.
Public weather APIs include:
http://www.wunderground.com/weather/api
http://developer.yahoo.com/weather/