Skip to main content

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.

License: GPL v3 Python 3.13+ PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mtatabase-0.2.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mtatabase-0.2.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

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

Hashes for mtatabase-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7d4f4f3c343dc85b58114ecaba9c6985201326c1aaadc5c788723c9d05ae4ea4
MD5 014d0dc84de0da4565a1fcc3970254c5
BLAKE2b-256 2352b5641a346445df390adb903a97b9416834e35ecfe51ab5fbb66ab42e19b7

See more details on using hashes here.

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

Hashes for mtatabase-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c5581baf322b4fcacda2b7c08c62bf2f56dba9909c2482e5c93ec2e68495f1
MD5 ce8e1bab639abbf87a6fdc89fb14ca47
BLAKE2b-256 8f2121f9dfa535fbf87740e7129499e20f57cf35f31a25fcf0933fdcd76c2b3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page