Import GTFS Schedule data into PostgreSQL for efficient querying and analysis, with support for GraphQL and REST APIs.
gtfs-via-postgres is a tool that imports GTFS Schedule (static) datasets into a PostgreSQL database, transforming raw transit data into queryable tables and views. It solves the problem of efficiently analyzing public transit schedules by providing correct handling of GTFS time semantics and pre-built analytical views.
Developers and analysts working with public transit data who need to query, analyze, or build applications on top of GTFS datasets using a relational database.
Developers choose gtfs-via-postgres for its strict adherence to GTFS time semantics, performance optimizations for large datasets, and built-in support for GraphQL and REST APIs, making it a robust foundation for transit analysis and applications.
Analyse GTFS Schedule data by importing it into a PostgreSQL database.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Accurately processes GTFS time values relative to noon -12h, supporting times over 24 hours and daylight saving time, as emphasized in the README's correctness section.
Provides views like arrivals_departures and connections that join multiple GTFS tables, simplifying common transit analysis queries without manual SQL joins.
Offers GraphQL and REST API endpoints through PostGraphile and PostgREST with optional flags, enabling easy data exposure for applications directly from the database.
Includes spatial indexes on stops and helper functions like dates_filter_min for efficient date filtering, ensuring reasonable query times even with large datasets, as shown in benchmarks.
Requires PostgreSQL >=14 with PostGIS extension, specific user permissions (e.g., CREATE permission for extensions), and careful configuration of environment variables, which can be error-prone for newcomers.
Queries can be slow without using provided helper functions, and the README admits that correctness prioritization leads to performance trade-offs, requiring developers to optimize filters manually.
The dual license includes the Prosperity Public License, which restricts commercial use to a 30-day trial, necessitating a paid license for production—a barrier for many businesses.