Continuing our work to make city data more real time, we have worked to make 511 data streaming using Server-Sent Events (SSE) in any browser or mobile device. 511 data includes a number interesting data sets that can be made real-time, such as transit schedules, but we wanted to focus on traffic data for our next project, so we took the 511 traffic incidents API for the San Francisco Bay Area and proxied it using Streamdata.io, and then published as a simple prototype to show what is possible.
Not all 511 providers have a JSON API like the San Francisco/Bay Area does, so we’ll be targeting any existing 511 APIs we can find. Next on our target list is New York City, who have a nice set of APIs, but after that, we must hunt for other usable 511 APIs. Most 511 providers will require converting RSS feeds in APIs, and even scraping 511 HTML listings and turn into JSON feeds, before we can proxy and make real-time using Streamdata.io–so we will probably need some local help.
If you’d like to see the 511 traffic data for your city or region be available in a streaming format, feel free to reach out. We’ll see what we can do to help you identify any feeds and see what we can do to make things more real-time when it comes to your local commute.
You can find the demo for this project over at Github, or get at the scripts behind it on the Github repository. It is a pretty basic example of a listing page, but it gets the point across what you can do when streaming 511 traffic data.