Painted with the faces of celebrities like Bob Marley and Tupac Shakur, and furnished with disco balls that lurch and twinkle as they weave through traffic, the thousands of matatus on the roads in Nairobi are bright and loud. Blaring music and honking their way through congestion, these mini-buses are the main mass transit network in the Kenyan capital, and 70 percent of the population uses them to get around. They're cheap and convenient, filling the public transit void. But the system is chaotic.

Individual matatu buses and routes are privately owned and operated, which means schedules and ticket prices can change at the whim of whoever’s in charge. Even finding the right stop can be tricky. You just kind of have to...know. If you choose the wrong line, you could waste half a day on an already long trip. Since most routes run through the city center before going back out, the roads—not designed for the megacity that Nairobi has become—are flooded with matatu congestion. One or two accidents on the main thoroughfares can shut down traffic for hours.

The situation makes it difficult for riders, who could save time if they knew about better routes, and challenging for major transit projects meant to improve city life. A recent highway project in Nairobi didn’t plan for the matatus, and the informal highway stops they make are dangerous, adding traffic that the planners didn’t anticipate. A full picture of the matatu system would be useful, to say the least.

That picture now exists: In a collaboration called Digital Matatus, researchers from MIT, Columbia University, and the University of Nairobi along with the design firm Groupshot released a map of the entire matatu system last year—a first for a non-formal transit system. And on Wednesday, it became the first informal network to be launched on Google Maps. Just as New York commuters can plot their subway routes on the service, residents of Nairobi can now jack into the matatu system on their smartphones.

Google

“Hats off to Digital Matatus and Google for doing this,” says Robert Cervero, a professor of city and regional planning at the University of California, Berkeley. “This is a very important pilot test demonstration and if the data can be put to good use designing better systems, it can have tremendous benefits.”

The idea to map the matatus began in 2012 when Sarah Williams and Jacqueline Klopp, two researchers working on land use projects in Nairobi, connected with Groupshot co-founder Adam White. “Adam and I started talking about the problem of working on sustainable transportation," says Klopp, an associate research scholar at the Columbia Center for Sustainable Urban Development. "There were all these transportation projects going on, but there was no basic data about the existing transit system in Nairobi."

The annals of the city government held some matatu data, but not much. Digital Matatus found records for about 75 percent of the routes, but they only included the start and end points, making it impossible to know how the buses navigated through the city. So armed with smartphones, ten university students spent four months riding the matatus, noting the name and location of each stop in a purpose-built app, which also used GPS to track the route. In dangerous neighborhoods, they followed behind the brightly painted buses in private cars.

By the end, the students recorded almost 3,000 stops on more than 130 routes. Next, all that data needed to be put in a usable format—specifically, a global standard called the General Transit Feed Specification (GTFS), which is compatible with open-source software used to make routing apps like Google Maps. But GTFS, developed in 2005, is geared towards formal transit systems, ones with fixed times and schedules.

That’s when Digital Matatus connected with Google Maps. Along with the rest of the robust GTFS community, Google agreed to update the global standard to make room for flexible transit networks with constantly changing schedules, routes, and stops. Nairobi was a perfect test bed. “In our efforts to expand public transportation on Google Maps, it was a good place to go next because there were people eager and willing to work on it,” said Mara Harris, a Google rep.

In the meantime, the Digital Matatus team turned to the project of visualizing the entire matatu system in one map. When they plotted the GPS coordinates in their software, they generated a neuron-like mass of overlapping routes and colors. Separating and structuring that mass into a formal subway-style map, designers at the MIT Civic Data Design Lab gave each of the main corridors going through the city center a different color, with well-known landmarks such as the Karura Forest and Ngong Road Forest anchoring the map in the city. A little over a year after starting the project, Digital Matatus released the Nairobi Matatu Routes paper map and the free GTFS transit data in January 2014.

Sarah Williams and Wenfei Xu, MIT Civic Data Design Lab

City officials, who had been passively attending project meetings throughout, finally made it their official transit map. And, crucially, they also started using it as a guide for their evolving mass rapid transit proposals. The strength of an ad-hoc system like the matatus is that over time—over many traffic jams and missed appointments—trial-and-error driving can lead to more efficient, emergent routes.

The tech community pumped out five routing apps for smartphones and old-school feature phones as well as one payment app that calculated actual ticket fares in an effort to combat price fluctuations. Matatu drivers began planning more routes to underserved areas and alternative routes to avoid congestion. And citizens were shocked to see all the routes on the map, said Williams. They could find more efficient routes that they didn’t even know existed. “There were interesting observations from women, especially, who said ‘This is really valuable because at night, I want to make sure I’m on the right matatu,’” said Klopp. “‘I don’t want to get on the wrong one where I don’t feel safe.’”

Adam White

Launching the matatu routes in Google emphasizes the need to study the informal transit networks that shuttle masses of people around in sub-Saharan Africa, southeast Asia, and south Asia. “You’re saying this is part of the system,” said Klopp. And since the GTFS data structure and the Nairobi data are open source, Digital Matatus gives other groups in Mexico City, Manila, Dhaka, China, and elsewhere a plan to collect and disseminate data on their transit. The collaboration has already received requests from around the world to map their cities.

Digital Matatus has also started talks with four more cities in Africa—Kampala, Accra, Lusaka, and Maputo—to use the same methods to map their informal mass transit systems. “So many of our problems in developing cities where you have extreme poverty and awful environmental conditions—they’re always tied in some way to the transport sector,” said Cervero. “It’s very chaotic and unmanaged, so this is a huge first step towards enhancing those services.”

People in Nairobi still use the paper maps because the matatu routes have not changed since their release, and the ultimate goal is a formal transit system with set maps, times, and prices. But hopefully "formal" will still mean you enjoy your commute with twinkling disco balls and a good beat.