How Does Google Maps Know Traffic Conditions In Realtime?

When I was in Germany in the early 2000s, all my questions about distance would receive answers in terms of time. That too, under two conditions, namely, without traffic and with traffic.

For example, if I asked a customer, “how far is your office from Munich airport”, the typical answer would be, “one and a half hours without traffic, two and a half hours with traffic”.

Yes, Munich airport is really that far away from the city. According to an old joke, Munich is the only city in the world where you need one plane to get to the airport and another plane to get out of the airport! The joke is equally applicable to Bangalore today! But I digress.

Coming from India, I found that very odd. Had I asked somebody a similar question in India, say, “How far is your office from Chennai Airport?”, the typical answer would have been, say, “12 kilometers”.

To receive an answer in hours to a question about kilometers was one of my first culture shocks in Germany. (Today, things have changed in India, at least in big cities. If I ask the same question in, say, Mumbai or Bangalore today, I’m unlikely to get an answer in kilometers but in hours, with and without traffic).

Now, the term “traffic” in the above answers refers not only to the volume of traffic along the route but also accounts for delays caused by accidents, roadworks, route diversions, and so on (henceforth “traffic conditions”).

So, while driving from A to B, it’s important to know two things: (a) the distance between the two points, and (b) the traffic conditions on the route between them.

Distance was static, there were paper maps and navigation systems galore, so it was easy to know (a).

But mobile Internet and Google Maps were not there. So how did we get hold of (b) during that era?

High end cars like Mercs and BMWs had Garmin, Magellan and other navigation systems powered by GPS and CDs containing (static) maps of various cities in Germany and Europe. (The CDs were later replaced by pen drives and SDRAM cards). Live traffic conditions were piped in to the automobile’s navigation system via reserved frequencies on FM channel. As soon as it received a traffic update, CDs would whir and the navigation system would recompute the route. It would take up to five minutes for the revised route to be displayed onscreen and relayed via audio.

Fast forward to 2020.

Mobile internet is everywhere. Every motorist has a smartphone with GPS. Google Maps is ubiquitous. While Garmin, TomTom and other dedicated navigation devices are still around, Google Maps has democratized turn-by-turn navigation. Not only does the app provide basic directions but it also displays continually updated traffic conditions in red-amber-green color codes on all routes.

For example, take the route from Osho International Meditation Center to Pune Airport. The following illustration shows the traffic conditions at different times from Sunday through Saturday.

This begs the question, how does Google Maps know about traffic conditions in realtime?

First, let’s consider how Google Maps knows about traffic at all.

AFAIK, Google does not record traffic or tap into CCTV feeds that dot the various buildings along any route of any metropolis today. (Google Street View captures pictures of buildings on a street; the vehicles visible in this view are snapshots and not indicative of traffic.)

As a result, Google Maps does not know anything about traffic directly. Instead, it infers density of traffic, roadworks and diversions on a particular route from Android smartphones traversing that route.

More specifically, Google Maps’ algorithms crunch location information, density and velocity of said Android smartphones to arrive at an estimate of traffic conditions. Since Google Maps uses Artificial Intelligence and Machine Learning, its estimates become more and more accurate as it processes more and more data through the years.

Location information collected by Google is “derived from sources including GPS data, information about the cell sites within range of the mobile device, and information about WiFi access points and Bluetooth beacons within range of the mobile device” (Source: Search warrant referenced in the below tweet).

Obviously, for Google Maps traffic updates to work, location-tracking must be enabled on the tracked Android smartphones. Hypothetically, if every Android smartphone owner on a particular route disables location tracking, Google Maps will not be able to report roadwork obstacles / route diversions (henceforth “traffic conditions”) on that route.

While the concepts of density and velocity are self-explanatory, they’re also easy to game.

Business Insider recently carried a story of how an artist spoofed Google Maps into reporting several traffic jams in Berlin, Germany, when there were none.

Simon Weckert toted the pile of (99) smartphones (on a red wagon) down empty streets in Berlin. Every street he traversed appeared as a red, traffic-heavy zone on Google Maps, causing drivers to reroute to avoid the streets.

Google Maps got hoodwinked by the large number of Android smartphones that were moving slowly.

Now, to answer the original question:

Google Maps can reflect traffic conditions in realtime only on high traffic routes where it can acquire a lot of data very fast.

This has two implications.

One, Google Maps can’t reflect traffic conditions in realtime on low traffic routes.

To give an example, a friend recently went on a drive between two Tier 3 towns in the Indian state of Madhya Pradesh. Before he started his trip, he checked Google Maps. It reported a travel time of 2h15min basis delays caused by roadworks on the way. My friend completed the trip in 1h45min. By the time he started, the roadworks were completed but Google Maps wasn’t updated.

Two, Google Maps can be thrown badly off gear by extreme traffic conditions. Given below are two outliers that I personally experienced when Google Maps’ traffic updates totally went for a toss.

Outlier 1

A few months ago, the Ramwadi Underpass on the way from my house in Kalyaninagar to Pune Airport was closed in the northbound direction (towards the airport). It took two days for Google Maps to mark the underpass with a no-entry icon.

I have no inside track into why Google Maps was so un realtime on this occasion but that won’t stop me from speculating about the following root cause:

  1. Google Maps was misled by the density of the southbound traffic, which was normal since the underpass was closed only in the northbound direction.
  2. For the first two days following the northbound closure, when Google Maps had still not inserted the no-entry icon, many motorists took the normal route as they always did in the past. When they reached the underpass, they realized that it was closed in the northbound direction and turned around. All this while, Google Maps was sensing enough traffic towards the airport and inferring that the northbound route was open, as it had always been in the past. (Back in college, my computer science professor would have warned me that this is “recursive” / “self-referential” logic. So be it!)

Outlier 2

Once a year, on the so-called Palki day, dozens of roads in Pune are closed to motorists to give right of way to tens of thousands of foot pilgrims on their journey towards Pandharpur, a temple town a couple of hundred kilometers south of Pune.

On the latest Palki, I was on a Uber ride. Google Maps went totally haywire and couldn’t make up its mind which road was closed and which was open. Frustrated by the wild goose chase that Google Maps was sending him on, the Uber driver simply switched off Google Maps and drove by “visual sighting”.

Anyone who drives around by looking at the roads and signs in front of him or her might seem like a psychopath today, but, believe me, that’s what motorists did until a few years ago!!!

Funnily enough, Google Maps is reportedly quite terrible at reflecting traffic conditions in its own backyard in the the San Franciso Bay Area!


Notwithstanding the false positives and false negatives described above, the average motorist is largely justified in thinking that Google Maps knows traffic conditions in realtime.

But that may not be the case for “power” users for whom wrong routes and delays in rerouting cost time and money and risk causing customer dissatisfaction.

Take Uber for instance.

The rideshare company acquired Nokia Maps for $3 billion a couple of years ago. Although Uber was using Google Maps at the time, the explanation for the M&A was that, Nokia Maps could report both route-wise and lane-wise traffic conditions in realtime. Uber was expected to eventually replace Google Maps with Nokia Maps in its rideshare and food delivery apps. Given that both Uber and Uber EATS still run on Google Maps, not sure when that “eventually” is going to happen.

As a matter of fact, Google itself acquired an Israeli mapping app called Waze for a billion dollars a few years ago. Waze uses crowdsourcing and is reportedly much better than Google Maps at reporting route diversions and roadworks in realtime. Waze is quite popular in the USA but, from what I’ve seen, it’s not too well known in the rest of the world. And, even in the US, Uber and Lyft, the two most popular rideshare companies, don’t use Waze.

Quora Answer Link: https://qr.ae/pNnh6C

ADDENDUM: HOW DOES TURN-BY-TURN NAVIGATION WORK?

A turn-by-turn navigation system is a combination of hardware and software that provides an automobile driver with one or more motorable routes between Point A and Point B on the surface of the Earth. It comprises the following three key components:

  1. GPS. More precisely, GPS Receiver. This is a chip installed in the system, whether it’s a smartphone or dedicated satnav system. GPS looks up a combination of four geostationary satellites and tells the “LatLong” i.e. latitude and longitude of the driver’s location on the surface of earth. (According to some accounts, GPS also reports altitude but it’s supposed to highly inaccurate. But we can ignore that in the present context because it does not involve flying!)
  2. Map. It shows roads, buildings, water bodies, bridges, and other elements of the terrain. High end maps also contain information regarding speed radars, gas stations, and rest areas on the way.
  3. Algorithm. This is a program that computes the route from starting point (typically where the GPS is) to the ending point (which is manually entered by the driver on the map at the start of the journey) and projects it on the map. It does this by finding all available pathways (interconnection of motorable roads, bridges over waterbodies on the way) and their condition (speed limit under normal times, traffic disruptions if any caused by accidents, lane closures, etc.) – in short, “quantity” and “quality” of pathways. “Quantity” is a fairly straight forward geometrical calculation. Quality is assessed from updates received from smartphones in the route via Mobile Internet or piped in from dedicated FM frequencies. In addition, the algorithm also informs the driver as s/he reaches every turn and tells him or her whether to turn left, turn right or go straight. Ergo turn-by-turn navigation. Since there could be multiple routes between any two points, the algorithm computes and displays all available routes, and either lets the driver select one manually, or computes the “best route” based on fastest route, route with the least toll, and other “constraints” specified by the driver.

When these three components work together, the driver gets a motorable route between point A and point B.

While a turn-by-turn navigation system is often branded by one of its component parts – Garmin GPS, Google Maps, and TomTom SatNav – it needs all three components to work.