How-tos

Identifying congestion in London using Bluemix and Watson

Share this post:

In March, I took part in the Smarter Travel Transport Hack, representing IBM at the offices of Landor LINKS in London. During the event, I worked with Harry from Transport API on a challenge for Traveline to provide novel ways of determining bus disruptions for the UK. The app we built is now live on IBM Bluemix here.

So how did we do this? To begin with, we gathered bus geometry data from Transport API, to determine the exact locations of all bus stops, for every bus route and operator in the UK. We then gathered tweets containing the word ‘bus’ from locations close to the bus stops and used IBM Watson’s Alchemy API, which is a sentiment analysis tool to identify possible disruptions. We also used Transport for London’s API to obtain an image from every CCTV traffic camera in London, allowing us to train an IBM Watson Visual Recognition classifier. Using a small training set of just 20 images (10 congested and 10 not congested), CCTV traffic camera images can be classified as ‘Congested’ or ‘Not Congested’.

The screenshot below shows the London Bus Route 91 with a bounding box query around each bus stop to identify tweets and the various traffic cameras on the route. You can see that IBM Watson has classified the traffic conditions from this particular camera as “Congested” with a confidence score of 0.62 (62%).

For more information on the TransportHack (including details of a free Nandos) click here.

The code for the smarter bus disruption app is on GitHub here.

Since the Smarter Travel Hackathon, I’ve built an app for getting passengers to London Heathrow Airport, see here.

You can click anywhere on the map to receive public transport and road directions from the clicked point to London Heathrow. I extended the camera idea to include a live image, video feed and daytime classification. The code for this demo is also on GitHub.

IBM Watson API’s are only available through IBM Bluemix. To explore our catalogue of API’s and start building now, sign up for a 30 day trial today.

To learn how to integrate Bluemix into your existing environment, check out the Solution Guide.

Solution Guide

Add Comment
3 Comments

Leave a Reply

Your email address will not be published.Required fields are marked *


Harry Wood

We did another write up on our TransportAPI blog here: http://www.transportapi.com/blog/2016/03/smarter-travel-transporthack/

A “bus route geometry” call was the starting point for a lot of the API calls we did in this demo. More about this new API feature here: http://www.transportapi.com/blog/2016/09/bus-route-geometries/

Reply

Shekhar Agarwal

Very well implemented and useful.

Can this be extended across various cities in the world?
What would it take for implementation?

Thanks!

Reply

Dan Cunnington

Hi Shekhar,

Thank you for your interest. In principal, there is no reason why this idea couldn’t be extended to other cities, in fact with a larger training set the classifications would become more accurate. It just depends on the data available to developers from each city in question.

A good example is TransportAPI who provide unified transport data across the UK (Myself and Harry used the transport buzz function to retrieve geolocated tweets) – http://www.transportapi.com/

and also Transport for London (where we used the CCTV data feed to train an IBM Watson image classifier) https://api.tfl.gov.uk/ https://www.ibm.com/watson/developercloud/visual-recognition.html

Reply
More Watson Stories

Integrate and Analyze Diagnostic Logs with IBM Cloud Log Analysis

Analyzing diagnostic logs, monitoring application health and keeping track of security-related events are at the foundation of successfully running apps and services. IBM Cloud offers services for that purpose. Today, I am going to show you how to use IBM Cloud Log Analysis to integrate, search and analyze as well as visualize diagnostic logs in the IBM Cloud.

Continue reading

Obey your commands: Home automation using Watson and PubNub

Integration of voice control in smart devices is buzzing, and adoption continues to grow. Voice control provides a more natural way of interacting with connected apps and devices ranging from news feeds, traffic information to acting as personal assistants in the home. These intelligent devices respond to commands spoken in our own voice and act immediately.

Continue reading

Container builds with multiple stages in IBM Cloud Container Registry

The IBM Cloud Container Registry team has been working to enable users to run their container builds in IBM Cloud. This capability was available to users of single containers or container groups, and we’re proud to announce that now cluster users can use it too. We’ve also taken the opportunity to add some new features. There’s a new command, bx cr build, and I’d like to highlight one of the new features that can help simplify your container builds.

Continue reading