MTA GTFS parser and database system that bypasses the need for API feeds
Project description
MTAtabase
A Python library for parsing realtime MTA subway data and matching it against static GTFS schedules with no API key required.
Overview
Most MTA data tools require you to register for an API key and hit live endpoints to get realtime train information. MTAtabase parses an archive of MTA data feeds and correlates them with static GTFS schedule files locally, with no API credentials needed.
Third-party realtime data is sourced from subwaydata.nyc.
Features
- Parse MTA realtime train data without an API key
- Match live trip updates to static GTFS schedule data
- Works offline once data is fetched
- Built on pandas for easy data manipulation
- Includes a bundled schema for GTFS data structures
Requirements
- Python 3.13+
- uv (recommended) or pip
Installation
With pip
pip install MTAtabase
From source
git clone https://github.com/pacmanboss256/mtatabase.git
cd mtatabase
uv sync
Usage
from MTAtabase import MTAtabase
# Initialize the database
db = MTAtabase(subway_data_path,gtfs_path)
Project Structure
mtatabase/
├── mtatabase/ # Core library source
├── data/ # subwaydata.nyc data
├── gtfs/ # GTFS files
├── schema/ # Project schema definitions
└── pyproject.toml
Data Sources
- Realtime data: subwaydata.nyc — a third-party archive of MTA subway feeds
- Static GTFS: MTA's published schedule files (stops, routes, trips, etc.)
License
This project is licensed under the GNU General Public License v3.0.
This project is not affiliated with or endorsed by the Metropolitan Transportation Authority (MTA).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mtatabase-0.2.0.tar.gz.
File metadata
- Download URL: mtatabase-0.2.0.tar.gz
- Upload date:
- Size: 20.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d4f4f3c343dc85b58114ecaba9c6985201326c1aaadc5c788723c9d05ae4ea4
|
|
| MD5 |
014d0dc84de0da4565a1fcc3970254c5
|
|
| BLAKE2b-256 |
2352b5641a346445df390adb903a97b9416834e35ecfe51ab5fbb66ab42e19b7
|
File details
Details for the file mtatabase-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mtatabase-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3c5581baf322b4fcacda2b7c08c62bf2f56dba9909c2482e5c93ec2e68495f1
|
|
| MD5 |
ce8e1bab639abbf87a6fdc89fb14ca47
|
|
| BLAKE2b-256 |
8f2121f9dfa535fbf87740e7129499e20f57cf35f31a25fcf0933fdcd76c2b3e
|