gtfspy
is a Python package for working with public transport timetable data provided in the General Transit Feeds Specification (GTFS) format.
- Import one or multiple GTFS feeds into a SQLite database for efficient querying of the data.
- Augment the sqlite with real walking distances between PT stops using Open Street Map (OSM) data.
- Compute simple statistics for the public transport networks (number of stops, routes, network length).
- Filter databases spatially and temporally to match your area and time region of interst.
- Perform accessibility analyses using a routing/profiling engine
- Adapted from the Connection Scan Algorithm (CSA).
- Compute all Pareto-optimal journey alternatives between an origin-destination pair, and summarize connectivity with measures on travel time and number of transfers.
- Python 3.5 (or above)
- Supported platforms: Linux + OSX (Windows is currently not supported, please creat an issue in Github if you would be interested in running
gtfspy
on Windows) - Optional: git is used for development.
pip install gtfspy
Only use this if you want to be able to edit gtfspy
's source code.
git clone [email protected]:CxAalto/gtfspy.git
cd gtfspy/
pip install -r requirements.txt # install any requirements
nosetests . # run tests
Remember to also add the gtfspy
directory to your PYTHONPATH
environment variable.
- Importing a GTFS feed into a sqlite database
- TODO: Validate an imported feed
- Compute and plot temporal distance profiles between an origin--destination pair
- Visualizing the public transport network on map
- Filter GTFS feed spatially and temporally
- Extract a network / a temporal network from the GTFS database
- TODO! Run a simple accessibility analysis pipeline!
We welcome contributions as GitHub pull requests. In your pull request, please also add yourself as a contributor in the list below.
As this library is not yet stabilised, and new features are being developed, code organization and interfaces may change at a fast pace. More precise versioning scheme will be decided upon later.
- Rainer Kujala ([email protected], rmkujala)
- Richard Darst
- Christoffer WeckstrΓΆm
- Nils Haglund
-
Manuel Rios (marz7002)
-
You?
This source code of this project licensed under the MIT License - see the LICENSE.txt file for details.
The OpenStreetMap data (.osm.pbf file(s) under examples/data) is licenced under the Open Data Commons Open Database License (ODbL) by the OpenStreetMap Foundation (OSMF).
The GTFS data used for the examples is provided by the City of Kuopio (Finland), and have been downloaded from http://bussit.kuopio.fi/gtfs/gtfs.zip [data licensed under CC-BY 4.0].
If you use this code for scientific purposes, please cite our paper [TO BE ANNOUNCED].
- The development of this Python package has benefited from the support by Academy of Finland through the DeCoNet project.
If you have any problems using gtfspy
please create an issue in GitHub.
If you have any questions on regarding gtfspy
, feel free to send the package maintainers, see above) an e-mail!
Code using (an old version of) gtfspy
: (https://github.com/rmkujala/ptn_temporal_distances)