How GTFS Has Revolutionalised Public Transport

Congestion is fast becoming a problem for public transit authorities. Public transportation especially in some cities is a nightmare but for some, a timely solution has come in handy.

This solution is the General Transit Feed Specification GTFS). GTFS is a data specification that enables public transit authorities to publish their data in a format that can be consumed and analysed via various software applications by thousands of public transport service providers.

Unextracted GTFS file published by Mason Transit Authority {Image Source: Mason Transit Authority}
stop_times.txt GTFS file published by Mason Transit Authority {Image Source: Mason Transit Authority}

GTFS Components

GTFS feeds contain data for transit operations, which can be broken down into two major categories.

  • Static component
  • Real-time component

Static Component

The static GTFS component requires one or two days of processing time after submitting to Google. However, the period might be longer if the search engine detects issues in the feed.

It is tailored for pre-planned transit design and schedule. Users are required to provide their static feed to Google two days prior. However, a full week is recommended in the event Google detects disagreement or suspicious issues with the feed that might necessitate human review

The static component contains transit information such as the transport schedule and pricing.

Real-Time Component

When it comes to the real-time component, the updates users furnish Google with are reflected immediately.

GTFS real-time is designed to provide real-time updates compared to the static component. It offers real-time information via vehicle positions and trip updates for trips or stops that are predefined in static.

The real-time component contains details such as vehicle positions, arrival time predictions, and real-time advisories/tips.

Whose Brainchild is the GTFS?

GTFS was mooted and implemented by Google and a host of developers. The idea was to integrate that with Google Maps to enable users to identify public transit options when trying to move from Point A to Point B.

GTFS Real-Time

Public transportation authorities are now able to furnish users (mostly application developers) with real-time updates thanks to the GTFS Real-Time feed specification. It is an extension to GTFS.

GTFS Real-time was also developed to be easy to implement, to allow interoperability, and with an eye on passenger information.

Which Cities Publish Their Transportation Data

A number of cities across the world publish their transportation data in the GTFS format. However, the types of licenses differ.

The following cities publish their transportation data in GTFS under open data licenses such as the Creative Commons -licenses or the Open Database License (ODbL) by the Open Data Commons.  These quoted licenses allow for sharing of data albeit with different levels of access. The data is then used for scientific purposes.

Below are the cities that publish their data via GTFS;

Adelaide (Australia), Belfast (Northern Ireland), Berlin (Germany), Bordeaux (France), Brisbane (Australia), Canberra (Australia), Detroit (United States), Dublin (Ireland), Grenoble (France), Helsinki (Finland), Kuopio (Finland), Lisbon (Portugal), Melbourne (Australia), Nantes (France), Palermo (Italy), Paris (France), Prague (Czechia), Rennes (France), Rome (Italy), Sydney (Australia), Toulouse (France), Turku (Finland), Venice (Italy) and Winnipeg (Canada).

How Does GTFS Work?

As mentioned earlier, GTFS is designed to be simple to enable small agencies to easily adopt the standard just like big agencies. Consequently, GTFS uses Comma-Separated Values (CSV) files.

CSV Files

As the name implies, CSV files are denoted by comma-separated values file which makes it easy to save data in tabular format. That is why you’d notice that the CSV files, which resemble a garden-variety spreadsheet, contain a .csv extension

Granted that CSV files are designed to be easy to use, this type of file format can be used with any spreadsheet program including Google Spreadsheets or Microsoft Excel.

One key feature of CSV files is that they differ from other file types in that you can only have one sheet in a file. The fact that CSV files cannot be saved as a row, column, or cell is an instant recipe for a sleepless night.

Sample CSV file showing invoice details information of an unspecified entity. {Image Source: Research Gate}

However, CSV files are preferred because they organize large amounts of data better.

GTFS Feed

A GTFS feed can be defined as a compressed zip file containing CSV files containing data on different features of a transit system namely: routes, stop times, stops as well as other fine details.

Required Files For GTFS Feed

  • stop_times.txt 
  • agency.txt
  • trips.txt
  • routes.txt
  • stops.txt
  • calendar.txt
This image has an empty alt attribute; its file name is GTFS-2.jpg
Extracted GTFS file published by Mason Transit Authority {Image Source: Mason Transit Authority}
stop_times.txt 

Denotes the time that a vehicle arrives and departs from each stop during the course of a trip.

agency.txt

Denotes the data on the agency responsible for the feed.

trips.txt

Denotes specific trips along a route.

routes.txt

Denotes the different and multiple transit routes available.

stops.txt 

Outlines individual stops a certain transit run completes.

calendar.txt

Plan for when a trip is active.

A mind map showing the GTFS Files.

GTFS Data

Below is an example of GTFS data as captured from the routes.txt for TARC via a screengrab. The first line denotes column headers.

This image has an empty alt attribute; its file name is data-1.jpg
GTFS data as captured from the routes.txt for TARC. {Image Source: Tech Republic}

It is easy to pull GTFS data and put it to use because it is comma-delimited. Another aspect of GTFS data is that it is updated daily meaning that TARC places a new zip file on its site every morning. Consequently, old zip files are relocated to another directory hence the current zip files are at the root of the site.

How GTFS Has Transformed Public Transport

We can’t write about GTFS without discussing how it has left a mark on public transport.

Open Data

GTFS has made it easier for public transportation authorities to publish their transit data; first and foremost with the public and secondly with application developers. This allows for the data to be linked with data from other datasets.

Recently, Google rolled out an extension to the GTFS static which allows public transportation authorities to furnish developers with real-time updates. Part of these updates includes vehicle positions and service alerts. This in turn allows the developers to build on and upgrade their innovations. These innovations will eventually improve public transport and the quality of life of the citizens who depend on those means to go about their daily activities.

Multimodal means of transport as captured in Victoria, Canada. Victoria is among the global cities that publish their transportation data in GTFS format {Image Source: Daniel Bowen}

Federal and regional governments also benefit from open public transportation data as transportation problems are solved, economies grow, opportunities to collaborate and learn emerge from analyzing GTFS data.

Development of Revolutionary Transit Software Applications

As GTFS allows public or private transportation authorities to facilitate seamless exchange of their data with Google Services, this has accelerated GTFS’s popularity. The consequence is that many public transportation authorities subscribe to GTFS as a means to release their data to third-party developers.

That has in turn led to many transit apps warming up to the exchange of data in GTFS format.

Example:

Travel Assistance Device: This is a revolutionary mobile app that alerts users when they are closing in on their destination. The application uses GTFS as its input format to populate the schedules and stops.

Such applications are the future of public transport.

Efficiency For Commuters

The advent of GTFS and its evolution thereafter has come as a big boon to public transportation. For instance, in 2011, Google rolled out the GTFS real-time extension that avails real-time information to users.

A study dubbed Integrating Public Transportation Data: Creation and Editing of GTFS Data authored by Mario Braga, Maribel Yasmina Santos, and Adriano Moreira and published by Research Center, University of Minho Guimaraes, Portugal in 2014 states that; The availability of real-time data has brought much-needed convenience in public transportation sectors that employ the use of technology.

The aforementioned convenience includes the reduced time of travel, reduced costs, use of more efficient routes, and smart navigation of populous cities and towns.

The study sought to showcase the potential of GTFS data by using GTFS data from Calgary Transit as a case study.

The researchers settled on the user-centred approach to ensure engagement of end-users from the early stages of the research to the latter as well as to guarantee the iterative testing of the solutions and methodologies could be adjusted to and aligned to reflect real-life scenarios.

“With the availability of real-time data, public transportation users spend less time waiting, feel more safe and likely to use public transportation services. This new feature reinforced GTFS as an exchange reference in order to become, in fact, a standard for public authorities to exchange their data”

report: Integrating Public Transportation Data:
Creation and Editing of GTFS Data

Commuters stand to benefit the most with further analysis of GTFS data that will draw further recommendations to boost the efficiency of public transport.

A commuter looks at his phone while abord public means of transport. GTFS data has helped save on time and costs for the public.

Planning

With most public transportation authorities facing numerous problems with limited resources, GTFS is a good way to ensure that limited resources are prudently spent.

A study dubbed Visualizing public transit system operation with GTFS data: A case study of Calgary, Canada authored by Postavee Prommaharaj, Santi Phithakkitnukoon, Merkebe Getachew Demissie, Lina Kattan, and Carlo Ratti published in 2020 on the ScienceDirect portal observed that GTFS data analysis can draw useful insights to improve the operational planning public transportation services.

Transit buses make their way on the streets of Calgary, Canada. GTFS data can help public transit authorities better plan for the future. {Image Source: Dreamstime.com}

“For instance, Calgary Transit makes four major service changes (schedule plan) within a year. The changes are usually made based on feedback from passengers and drivers, political decisions, changing ridership levels, and new development areas”

Report: visualizing public transit system operation with gtfs data: a case study of calgary, canada

The study sought to demonstrate the potential of GTFS data. GTFS data from Calgary Transit, Canada was used as a case study.

Route clustering analysis was performed solely based on information extracted from GTFS data to assess how operational planning of public transportation services could be improved.

A New Dawn

Public transportation is challenging to organize. This problem is especially acute in urban areas. With millions of people heading in and out of metropolitan towns at the same time during hours, public transit agencies need to be smart in order to facilitate residents to go about their daily duties.

Publishing of GTFS data and analyzing it is yielding fruit in cities like Calgary, Canada. The city tailors its transportation schedules based on what it learns after examining GTFS data.

This looks like a step in the right direction.