eyecatch

Visualize Public Transit Data with GTFS-GO

Published: Last updated:
This article uses QGIS 3.16. The current LTR is 3.44.

What you'll learn


  • How to install the GTFS-GO QGIS plugin
  • How to use the GTFS-GO QGIS plugin
  • Features of the GTFS-GO QGIS plugin

Recommended for


  • Anyone who wants to visualize public transit timetable information on a map

Introduction

As part of its contribution to open source, MIERUNE publishes several QGIS plugins free of charge. This article introduces one of them, GTFS-GO, and shows how to use it and what it is good for.

This article is a revised version of the “QGIS Blog” content that was published on the MIERUNE Inc. website.

What is GTFS?

GTFS stands for General Transit Feed Specification. It is an international standard for storing all kinds of public transit information: timetables, stop locations, routes, fares, and more. Bus operators in particular are increasingly preparing and publishing GTFS as open data (see GTFS.JP). GTFS is made up of multiple CSV files. This makes it a highly machine-readable standard, but people cannot read it directly, so you need an application to check and use the data. This is why MIERUNE developed GTFS-GO.

GTFS-GO

GTFS holds stop locations and route information (that is, the order in which a route passes its stops), so you can plot them on a map by analyzing the data. GTFS also holds time-based information, so you can, for example, aggregate the traffic frequency as of October 1 of a given year. GTFS-GO is a plugin that runs these processes through a simple user interface. The sections below cover everything from installing the plugin to using each of its features.

Install the plugin

From the menu bar, open Plugins → Manage and Install Plugins.

Select Manage and Install Plugins
Select Manage and Install Plugins

Select All on the left and enter GTFS in the search field. The matching plugins appear in the list. Select GTFS-GO and click Install Plugin.

Install GTFS-GO
Install GTFS-GO

GTFS-GO is installed, and its icon appears in the toolbar.

The icon appears in the toolbar after installation
The icon appears in the toolbar after installation

The installation is complete.

Plot stops and routes

In GTFS-Datasource, select the GTFS data you want from the drop-down list, or specify a ZIP file you downloaded in advance.

Select GTFS data
Select GTFS data

Set the processing options you want, then click Extract on QGIS.

Click Extract on QGIS
Click Extract on QGIS

The processing result appears on the map.

The processing result appears
The processing result appears

Aggregate traffic frequency

Select the GTFS data you want, as in the steps above. Select aggregate route frequency and enter the aggregation conditions, such as the date to aggregate.

Select aggregate route frequency
Select aggregate route frequency

Click Extract on QGIS to display the processing result on the map.

The processing result appears
The processing result appears

For technical details such as the rules for unifying stops, see the Qiita article below.

Connect to the GTFS Data Repository

GTFS-GO is designed to process GTFS data that you download in advance. The latest version, however, can connect to the GTFS Data Repository, which the Association for Promotion of Infrastructure Geospatial Information Distribution (AIGID) is currently running on a trial basis. It lets you search for and download GTFS data.

To use it, start the plugin and select [Japan]GTFS data repository from the Repository drop-down list at the top of the dialog. Click Search to list the GTFS data uploaded to the repository.

Select [Japan]GTFS data repository and click Search
Select [Japan]GTFS data repository and click Search

Select the GTFS data you want (you can select more than one) and click Extract on QGIS as before. The processing result appears on the map.

The processing result appears
The processing result appears

Conclusion

Once GTFS data exists, an operator's service information appears in Google Maps, which gives operators a strong incentive to prepare it. GTFS-GO is developed in the hope of going one step further, so that GTFS as open data is widely used beyond Google Maps. MIERUNE hopes that many people will try it, including those involved in public transportation and urban planning, open data enthusiasts, and anyone interested in visualization, and that the potential uses of GTFS become widely known.

GTFS-GO is developed as open source and welcomes every kind of contribution, from patches to bug reports. You do not need to be a developer: if you find a bug or an improvement while using the plugin, you can report it in GitHub Issues, and it can be reflected in the development plans.

About the author
QGIS LAB Editorial Team
QGIS LAB Editorial Team

QGIS LAB is a comprehensive information hub for QGIS, the open-source GIS software. Under the concept of “Geospatial for Greater Good,” we share the knowledge and skills to open up the world through location data.