Python for Transit: Get the Most Out of Your GTFS With This Python Package

An introduction to gtfs_functions

Santiago Toso
Dec 5, 2020 · 8 min read

What this article is about

About GTFS (skip if you already know about it)

GTFS functions, the package

Package installation and import

1. Read the GTFS

2. Calculate stop frequencies

GeoDataFrame output for the function stops_freq().

3. Calculate line frequencies

GeoDataFrame output for the function lines_freq().

4. Cut the shapes into segments

GeoDataFrame output for the function cut_gtfs().

5. Calculate segments speeds

6. Calculate segment frequencies

7. Show results on a map

8. Export your work

9. Some other possible interactive plots

Acknowledgments & References

The Startup

Get smarter at building your thing. Join The Startup’s +800K followers.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store