The Latest Nairobi GTFS Feed is Now Available

February 2, 2017


We are so excited to announce that an updated version of the Nairobi GTFS Feed is now available on our website—and soon on Google Maps as well! Updating the data was a multi-step process that relied on all members of the Digital Matatus team, a database programmer in Nairobi, and a group of dedicated University of Nairobi students.

First, the Digital Matatus team worked with Nairobi-based programmer Derick Lung’aho to create a web-based GTFS editing tool. Based on our first round of data collection we knew that editing GTFS can be time-consuming and complicated, because each change must be carried through multiple text files. The online tool we created instead makes it possible to visually edit a trip once and to have the changes automatically reflected throughout the GTFS Feed.

This screenshot shows how to edit a trip visually on the Digital Matatus GTFS Editing Tool.

Both the stops and the path of the trip can be edited by dragging points to new positions on the map. This is especially useful for making small changes and correcting for inaccurate GPS coordinates. And adding a new stop is a simple as dropping a pin! We hope to make this tool publicly available soon.

With the editor created, the next step was to collect updated data for all the 133 matatu routes in Nairobi. This data collection process worked differently than our first round (which was traced using cell phones). Students used paper maps of the routes to verify the route path, stops, and any other details with matatu drivers.

This is an example of the maps used by the students to verify route information.

Twelve University of Nairobi students took to the streets with these paper maps. They spoke with matatu drivers and touts (the ticket handlers) at major bus stops to confirm the route details. Because of new road construction and changes to existing roads, many routes shifted slightly, adding new stops or altering parts of the route. The students made note of these changes by hand on their maps, and then edited the GTFS using the new Digital Matatus GTFS Editor. In a few cases routes changed their terminus station, causing the student responsible to go searching out that route at various matatu termini in the city. This field work required a lot of persistence on the part of the students. They had to have a deep understanding of both the GTFS and the matatu system.

Students making notes on a paper map during field work.

A student edits her route using the GTFS Editor.

The final step was cleaning the edited GTFS data. Once all the students made their changes in the online interface, it was easy to export the edited GTFS feed directly from the tool. We used both the free GTFS Feed Validator (by Transitscreen) and the Google Transit validation platform to identify any errors in the feed. Happily, the GTFS Editor significantly reduced the number of errors that had to be fixed manually.

--

We would like to thank University of Nairobi students—George Maina, Lawrence Mamithi, Felix Masila, Ivy Mukui, George Mwangi, Sammy Mwangi, Daniel Mutwiri, Benson Odongo, Nico Opiyo, Stephen Osoro, Jerono Tembu, and Gladys Wangui—for their dedication to the data collection. We couldn’t have done it without all of you!

Download the GTFS feed here.


go back