How Google Maps Can Predict Bus Delays & Traffic Jams Using Machine Learning

Google Maps has single-handedly reduced the ambiguity of the commuters over the past decade. In India, where the majority of the population prefers public transport for a daily commute, Google Maps has a key role to play. From bus timings to route maps, Google services are quite significant. But, in densely populated countries like India, traffic congestion is a major problem both for those in transit and the algorithm that serves Google Maps.

To solve this, Google Maps is launching live traffic delays for buses in places where there is no real-time information from local transit agencies.

Google Maps in India, especially, has released three updates:

  • Bus travel times from live traffic in 10 of the largest cities in India, 
  • Live train status for Indian Railways trains 
  • Mixed-mode commute suggestions that now combine auto-rickshaw and public transport

Overview Of The Model


To develop the new model to predict delays, the machine learning developers at Google extracted training data from sequences of bus positions over time, as received from transit agencies’ real-time feeds. These inputs are aligned with the car traffic speeds on the bus’s path during the trip. 

As can be seen in the plot below, how the car’s delay at 800m mark changes the bus timings. The model is split into a sequence of timeline units. These units can be anything from visits to street blocks to bus stops. Every unit is used to forecast the duration of the travel. 

Even within a small neighbourhood, the model needs to translate car speed predictions into bus speeds differently on different streets.

So, for better approximation, each unit is made to predict its duration independently, and the final output is the sum of the per-unit forecasts.

Not only the forecast of the duration but also to capture unique properties of specific streets, neighbourhoods, and cities, the model is made to learn a hierarchy of representations for areas with a timeline unit’s geography; locating road or a bus stop more precisely. 

To make the prediction more robust, the researchers simulated the possibility of queries that pop up about the areas which were not the part of training data.

As different cities and neighbourhoods also run to a different beat, so the model is made to combine its representation of location with time signals.

Some examples are kept with the exact bus route and street, others keep only neighbourhood — or city-level locations, and others yet have no geographical context at all. This better prepares the model for later queries about areas where we were short on training data.

The model developed here is simpler because of the sequence structure that allowed the researchers to :

  • Train models of individual units’ durations and
  • Optimise the “linear system” where each observed trajectory assigns a total duration to the sum of the many units it spans

India Gets To Try It First

This new update where Google Maps can be used to track live traffic data and public bus schedules to calculate delays and provide accurate travel times is the first product of its kind — launching first in India. This feature is supposed to enable the commuter to factor in real-time traffic and plan their trip accordingly. This feature will be available for Delhi and Bengaluru initially and will soon be extended to more cities. And, for real-time train information, the feature was developed with the help of Where Is My Train app, which was acquired by Google.  Whereas, the public transport tab on Google Maps for Android will now tell whether planning a certain trip is a good option or not, how long it will take and which station you should take an auto-rickshaw to/from.

Download our Mobile App

Ram Sagar
I have a master's degree in Robotics and I write about machine learning advancements.

Subscribe to our newsletter

Join our editors every weekday evening as they steer you through the most significant news of the day.
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

Our Recent Stories

Our Upcoming Events

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox

Can OpenAI Save SoftBank? 

After a tumultuous investment spree with significant losses, will SoftBank’s plans to invest in OpenAI and other AI companies provide the boost it needs?

Oracle’s Grand Multicloud Gamble

“Cloud Should be Open,” says Larry at Oracle CloudWorld 2023, Las Vegas, recollecting his discussions with Microsoft chief Satya Nadella last week. 

How Generative AI is Revolutionising Data Science Tools

How Generative AI is Revolutionising Data Science Tools

Einblick Prompt enables users to create complete data workflows using natural language, accelerating various stages of data science and analytics. Einblick has effectively combined the capabilities of a Jupyter notebook with the user-friendliness of ChatGPT.