MobilityLab / TransitScreen

Transit screen configuration and display.
http://mobilitylab.org/2012/01/05/experimental-real-time-transit-screens-come-to-arlington-and-dc/
MIT License
132 stars 21 forks source link

Add support for weather APIs #42

Open TransitScreen opened 12 years ago

TransitScreen commented 12 years ago

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/

kurtraschke commented 11 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)

kurtraschke commented 11 years ago

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.

TransitScreen commented 11 years ago

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/