Skip to content

Welcome to GTFS Segments Documentation

Logo

GTFS Segments

A fast and efficient library to generate bus stop spacings

About The Project

The gtfs-segments is a Python package that represents GTFS data for buses in a concise tabular manner using segments. The distribution of bus stop spacings can be viewed by generating histograms. The stop spacings can be visualized at the network, route, or segment level. The segment data can be exported to well known formats such as .csv or .geojson for further analysis. Additionally, the package provides commands to download the latest data from @mobility data sources.

The package condenses the raw GTFS data by considering the services offered only on the busiest day(in the data). More discussion on the interpretation of different weightings for stop spacings, and the process in which the package condenses information can be seen in our arXiv paper. The usage of the package is detailed in documentation. The stop spacings dataset containing over 540 transit providers in the US generated using this package can be found on Harvard Dataverse.

(back to top)

Acknowledgments

  • Parts of the code use the Partridge library
  • Do check out gtfs_functions which was an inspiration for this project
  • Shoutout to Mobility Data for compiling GTFS from around the globe and constantly maintaining them