Penguin's Transit Toolbox : a simple python toolbox for managing GTFS data. Work in progress
- Features
- Planned roadmap
- Installation
- Usage examples
- Documentation
- Requirements
- License
- Project Status
- References
- Loading of GTFS files, either individually or in a dictionnary ;
- Compatibility with the GTFS Fares-v2 extension proposal ;
- Support of both standard and spatial tables ;
- Export of
stopsandshapesas GIS-ready files ; - Detection of available files ;
- Geometry validation ;
- Compatibility with
pandas,geopandasandshapely.
- v0.2.0 (coming december 2025) :
newmodule to create an empty GTFS feed ;editmodule to modify an existing feed.
- v0.3.0 (coming early 2026) :
spatialmodule to perform spatial operations on the feed, including routing.
From PyPI
pip install penguinstransittoolboxFor local development from the latest build on Github.
git clone https://github.com/mxncmrchnd/penguinstransittoolbox.git
pip install -e .Importing the package :
import penguinstransittoolbox as pttLoading a feed and exporting its geographical features to GIS-ready files :
feed = ptt.zip.load_feed('example/feed.zip')
# export the stops as GeoPackage (the default output format)
ptt.gis.export_stops(feed['stops'], output='stops.gpkg')
# export the shapes as ESRI Shapefile
ptt.gis.export_shapes(feed['shapes'], output='shapes.shp', format='Shapefile')Reading stops and shapes from GIS files :
stops_gdf = ptt.gis.stops_from_gis('stops.gpkg')
shapes_gdf = ptt.gis.shapes_from_gis('shapes.shp')The documentation is available here.
- Python >= 3.9
- pandas >= 1.5
- geopandas >= 0.13
- shapely >= 2.0
- requests >= 2.30
This project is released under The Unlicense, dedicated to the public domain.
This project is in early development and subject to change. Contributions, feedback and issue reports are welcome.