GTFS Feed Browsing & Normalization

Monday, 12 January 2015

Today OpenMobilityData released a number of improvements to the web site in order to make browsing and discovery of open GTFS feeds simpler.

In addition to no longer requiring registration to access most parts of this web site, we've also added the features below.

View Routes, Stops & Trips in Detail

Starting today, you can now view details of all routes, trips and stops contained within a GTFS feed.

Using the San Francisco Muni GTFS feed as an example, here's what it looks like to view today's N Judah trips.

If you drill-down on one of the listed trips, you can view its respective stopping pattern.

And finally, you can select an individual stop to view additional details, such as which routes operate at that stop and when. Here's what the Metro Embarcardero Station looks like.

More Examples:

Feed Normalization

It is now possible to define a "normalization chain" for any given GTFS feed, allowing you to use a cleaned-up version of the feed, rather than the original. This is the normalization chain for San Francisco Muni:

Even though GTFS is a specification for representing public transit data, data providers often interpret the specification slightly differently. This means there is little consistency across feeds.

For instance, one provider may use mixed-case strings for their stop names, while another may use all upper-case. One provider may include route descriptions while another may not. In the case of Muni, there are also these problems, which this normalization chain fixes:

  1. Incorrect route types. Each of the Muni rail routes are incorrectly listed in feed as being bus routes.
  2. In reality there is no KT route. When the K train reaches Embarcadero Station, it begins a new trip as the T train (and vice-versa when travelling in the opposite direction).
  3. Stop 7440 is not a public stop. Passengers aren't able to use this stop, so generally it's not helpful to include this stop in any trips.

You can compare the normalized version of the SFMTA feed to the original:

Note: At this time the only feed with a normalized version is San Francisco Muni, but we're planning to gradually add more normalization rules.

Download Individual Files

Finally, for any newly-added feed version added to this web site, you can now download the individual files within that feed directly.

Previously, you could download the feed as a whole or view snippets of individual files. Now all files are directly available without the friction of having to download a huge feed in order to view a tiny file.

Using the latest routes.txt version from SFMTA as an example, you can now click the View File link to view the entire file.

Summary

  • Registration now only required for using the API
  • View GTFS routes, stops & trips in detail
  • We can now offer normalized versions of any GTFS feed
  • Download/view individual raw files for any GTFS feed

If you have any questions, comments or suggestions, please submit them on GitHub. If you're new to GTFS and would like to learn how to use it in your own projects, please buy my GTFS book.