Determining Local North/South Direction Labels for Subway Trips

97 views
Skip to first unread message

Kevin Cole

unread,
May 14, 2025, 2:55:23 PMMay 14
to mtadeveloperresources
Hello,

I'm developing a transit application that utilizes the MTA GTFS static data and GTFS-RT feeds along with a supplementary Station Details CSV file, which contains the "North Direction Label" and "South Direction Label" columns for each station.

I'm trying to debug what seems like an inconsistency between the human-friendly direction labels in the Stations.csv file provided by MTA and what's displayed in the official MTA app for certain stations.

Specific Example:
- Station: Lorimer St J/M (M13)
- Trip ID: 084000_M...N
- Platform: Northbound platform (M13N)
- Destination: Forest Hills-71 Av (derived from the last station in the trip updates array, G08)
- In Station Details CSV: The "North Direction Label" for M13 indicates "Outbound"
- In MTA App: This same train direction is displayed as "Manhattan"

This inconsistency creates confusion for users of my application, as they expect to see the same direction labels they're familiar with from the official MTA app. Is there a more up-to-date source of North / South direction labels on a per station basis available?

Thank you!

jamesp...@gmail.com

unread,
May 14, 2025, 3:27:57 PMMay 14
to mtadeveloperresources
This is a bug in the realtime GTFS data for the M train specifically. If you only look at stations.csv and the realtime GTFS data for the J train (which also calls at these stations) everything is correct.

In the Go GTFS package that I co-maintain, we handle this by altering the stop IDs for the M train for 6 stations. For M trains we switch M13N to M13S and vice-versa. Only for M trains; J trains are kept intact. This is the code: https://github.com/jamespfennell/gtfs/blob/b513ba451030e7452722368fc00292971b1e725e/extensions/nycttrips/nycttrips.go#L118-L148

The result seems to be correct; e.g.: https://realtimerail.nyc/stops/M16

James

Kevin Cole

unread,
May 14, 2025, 4:27:35 PMMay 14
to mtadeveloperresources
Hi James,

Thanks for your reply and this valuable info. I was at wit's end trying to track down what was going on! It sounds like for the time being, a manual patch is necessary. Thanks also for linking to your code.

It seems like realtimerail uses the same departure direction indicator labels as the MTA app  which differ from those provided by the MTA in their stations.csv file (e.g., "Jamaica - Middle Village" in place of the generic "Outbound"). Are you aware if there another official source for this data, or do I need to manually patch these values as well?

Best,
Kevin

James Fennell

unread,
May 14, 2025, 5:39:02 PMMay 14
to mtadeveloperresources
realtimerail.nyc is using an old version of the CSV file that did have "Jamaica - Middle Village" and similar (better?) names. So I guess there's no source of truth for that anymore. I could create a CSV of the names realtimerail.nyc is using, if that would be useful...
--
You received this message because you are subscribed to the Google Groups "mtadeveloperresources" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mtadeveloperreso...@googlegroups.com.

Kevin Cole

unread,
May 15, 2025, 9:58:07 AMMay 15
to mtadevelop...@googlegroups.com
That would be helpful, if it's not too much trouble. Ideally, the data provided and maintained by the MTA would be reflective of their own internal usage but, I suppose that isn't the case. Thanks again for your pointers and help!

You received this message because you are subscribed to a topic in the Google Groups "mtadeveloperresources" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mtadeveloperresources/SQHAoiGxs2s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mtadeveloperreso...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mtadeveloperresources/6a3d9ccc-e4b9-40ad-a72a-27162fd85787%40app.fastmail.com.
Reply all
Reply to author
Forward
0 new messages