Repository navigation
Include MTA Bus Company static GTFS feed for bus routes - #15
Merged
Merged
Conversation
Routes operated by MTA Bus Company (e.g. Q18, Q52+, BxM1, QM2) are published in a separate static GTFS feed, not the NYCT borough feeds, so get_stops raised "route not found" for them and get_arrivals had no stop names for their destinations. Add the feed and share a single BUS_STATIC_GTFS_FEEDS list between both methods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OnFreund
force-pushed
the
claude/q18-route-stops-failure-ebccd0
branch
from
October 10, 2026 14:36
e977880 to
f856094
Compare
This was referenced Oct 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
BusFeed.get_stops("Q18")raisedMTAFeedError: Route Q18 not found in any borough GTFS feed.Q18 is operated by MTA Bus Company (agency
MTABC), not NYC Transit. MTA Bus Company publishes its own static GTFS feed (http://web.mta.info/developers/data/busco/google_transit.zip), and the library only searched the five NYCT borough feeds. About 90 routes were affected the same way, including Q06–Q115 (several of them), Q52+/Q53+/Q70+, B100, B103, BX23, and all BM/BXM/QM express routes.get_arrivalsalso builds its stop-name lookup from the same five feeds, so arrivals for these routes had no destination names.Changes
constants.py: addbus_companytoSTATIC_GTFS_URLS, and add aBUS_STATIC_GTFS_FEEDSlist (the five NYCT borough feeds plus MTA Bus Company).__init__.py:get_stopsandget_arrivalsboth useBUS_STATIC_GTFS_FEEDS, replacing two duplicated inline lists. The error message now says "bus GTFS feed".get_stopsnote.Notes for reviewers
get_stops("Q18")against the real feed files: 58 stops in two directions (69 ST/GRAND AV,1 ST/27 AV).🤖 Generated with Claude Code