Using natural language processing to route around NYC’s subway disruptions

Gobot analyzes MTA’s service advisories in realtime

Citymapper
Citymapper

--

The New York City Subway is in distress. But you already know that:

August 2017 New Yorker Cover

The infrastructure is a mess of delays, signal problems, power outages and trash fires. What is also challenging is figuring out what is going on and how to plan around it.

MTA’s service changes are complicated, long pieces of text that are hard to decipher, especially when you’re in a hurry, and only concerned about your specific journey.

It turns out the best way to make the service issues understandable by humans is to build a robot that explains them to humans.

Gobot the robot

Gobot applies natural language processing to MTA’s service alerts

Let’s say you’re travelling from DUMBO in Brooklyn to 59th and Lex in Manhattan, but there’s a service change.

“Due to FDNY activity at 23St there is no B, D, F, M train service between W4St-Washington Sq and 42St-Bryant Pk in both directions.”

What does that mean for you? Gobot digs into the details to figure out that:

  • Stations between West 4th Street and 42nd Street Bryant Park are closed,
  • But the rest of the F line is running

So our routing then suggests transferring from the F to the 6 train.

Gobot analysis

Gobot automatically updates the app to reroute you in real time

A to B routing results are adjusted immediately so that that best possible usable route is ranked at the top!

Automatic realtime rerouting in our app

Gobot constantly figures out the realtime State of the City

Planned work? Sudden power outage? Rush hour trash fire? Gobot is always working at analyzing all subway lines in realtime. Even on weekends.

And we’re updating our app and website accordingly. Check the ‘Lines/Status’ section. Rather than indecipherable text, we will help you understand exactly what’s going on:

NYC line service advisory

If you like visuals, the website shows every disrupted subway line on a map, highlighting affected parts, and updating in realtime.

Check out New York City at Citymapper.com/nyc/status.

The real state of NYC

Here’s the 1 with at-a-glance service statuses and affected stations.

So much wow. How does Gobot do it?

Semantics are tough, especially when they’re inconsistent. The MTA often uses multiple (and abbreviated) names for the same station, describes directions with a confusing mix of actual places, directions and phrases (for example, “Southbound” means “Downtown” which can mean “Brooklyn-bound” which can also mean “Bay Ridge-bound”) and… they sometimes make sbelleng miztakes.

So we’ve been collecting thousands and thousands and thousands of these MTA messages over a long period, and getting Gobot to read all of them, so it learns what the MTA is saying, no matter how the MTA is saying it.

Gobot at work

Gobot, try this beast of a message:

“Due to FDNY activity at Lexington Av-59St, there is no N train service between Times Sq-42St and Queens Plz, northbound and southbound.”

The MTA has used ‘Plz’ and not Plaza. They haven’t stated “from Times Sq-42 St to Queens Plz” but “between Times Sq-42 St and Queens Plz”. They’ve used “northbound and southbound” rather than just saying ‘in both directions’. Oh, and to add another level of confusion, Queens Plaza isn’t even on the N. It’s Queensboro Plaza.

Gobot is able to figure out these crazy MTA variables, extract the relevant station information, and help you understand it all in a single glance:

Don’t worry, just Route

All this happens in the background. Most importantly for users, you just request directions. We will give you the best realtime option, based on what is happening at that moment, without you having to read or decipher anything!

If you can make it here… You can make it anywhere.

New York may be the most challenging city in the world when it comes to disruptions and service changes. But we are also conducting the same analysis on train and bus systems around the world.

When using our app or website, rest assured that Gobot will aim to figure out the most accurate realtime information on the state of your city, not just based on the information we get from agencies, but also through our own analysis of the information.

Visit NYC at Citymapper.com/NYC

More stories at Medium.com/Citymapper

--

--