Transportation agencies collect a multitude of data every day, but much of that data is not available to the public. Developer Matthew Somerville created a data visualization for a weekend hack contest that shows just how powerful the results of publicizing that real-time data can be.
What it is: Somerville created a live map of the London Underground, known as the Tube, using the API from subway operator Transport for London (TfL), which offers several data streams to the public. Somerville, senior developer at the nonprofit MySociety Limited, made the map at a programming competition called Science Hackday in London in June 2010. He had created something similar for the United Kingdom’s National Rail network, only by scraping website data instead of an actual API.
“Someone mentioned that TfL had recently released a new open data API providing station and line based information, and I immediately thought of the idea of trying to plot that information on a map,” Somerville said via email.
While Somerville said he pulled together the idea on the spot and completed it in just a weekend, the real-time map won second place at the 2011 Open Data Challenge competition that featured 430 entries from 24 European Union member states.
The result, a live look at the oldest subway network in the world, is an example of a real-time data feed in action. Rather than serving as a train alert for travelers, Somerville said he considers the map valuable as a model of what is possible if organizations open up their data for free.
How it was made: Somerville already had a similar train site up for National Rail, so he borrowed that code and then used Google Maps to plot the data.
“As I was basing it on existing code for speed of development, it was therefore on a Google Map,” Somerville said. “If [I were] doing it again now, I would try and use OpenStreetMap as I’m a believer in what they’re trying to do, it is open data like the TfL tube data itself, and their coverage of London is excellent.”
He credits fellow developer Tim Diggins with creating the icons for the train stations on the map’s website.
Challenges overcome: With a free API from TfL and two stores of ready-made code, Somerville said quickly developing the page wasn’t too hard. The biggest challenge came trying to host the map after the link to the site made the rounds on social media.
“The actual making was quite straightforward; there were some harder challenges a day or two after the hack day, when the link flew around Twitter and my tiny virtual machine struggled to cope with the demand,” he said. “One quick live switch of webserver and some optimizations meant I could deal more easily with all the people visiting.”
Response: Somerville won second place in the app contest at the Open Data Challenge, a competition for ideas, applications, visualizations and datasets sing free data in Europe.
He said no one from the TfL has contacted him officially, but a few train drivers have emailed him and complimented him on the map.
“I got a large number of emails and tweets at the time, and there’s generally still a mention every few days by someone on Twitter—people seem to really like it, though some wonder what it’s for,” he said. “I’m not sure it needs to be for anything, thankfully, though if it does have to be, being for showing what opening up information an organization holds can easily produce is probably it.”
An outsider’s view: Michael Pack, director of the Center for Advanced Transportation Technology at the University of Maryland, said his lab is working to combine and publicize the wealth of traffic and transportation data that’s collected in the United States. Pack said Somerville’s map was “simple but innovative.”
Pack’s lab creates several different visualizations and real-time maps to show transit authorities what is possible.
“What we’ve been trying to do is show the benefits of sharing information with one another and with the public, because if you’re trying to decrease congestion on the roadway and you encouraging people to ride transit, the more informed they are the better,” Pack said. “The more people know, the better decisions people can make, and there will be less congestion on the roads and the roads will be safer.”
Pack said his lab is starting to get buy-in from many transit authorities on the East Coast once they see what’s possible with a good visualization, and he hopes to have data from transportation management centers from around the country in a year. The next step, Pack said, is getting them to allow third parties to work with their data.
“A lot of these agencies don’t have the budget or the time to put together fancy websites or visualizations,” he said. “But it’s pretty damn simple to put your data up on the web if you have the political will to do so.”