reading GTFS files

1,129 views
Skip to first unread message

Kevin Chiu

unread,
Oct 28, 2017, 8:52:48 PM10/28/17
to mtadeveloperresources
I'm a newbie in this. I'm not a programmer but going to teach myself how to build an real-time app, especially an MTA one. Only problem is, how do you parse the GTFS feed? I mean I downloaded the raw data. how does one parse that information because I can't read the GTFS file when I open it in Notepad. I know that file isn't a plain text format but is there a free application that can read GTFS files?

Justin Ryan

unread,
Oct 29, 2017, 10:35:30 AM10/29/17
to mtadeveloperresources
Using GTFS and Protobufs requires fairly advanced programming skills, and is not well documented, let alone for beginners. I wouldn't do this as a first project. You might have a look at http://nycpulse.herokuapp.com/api, which isn't from the MTA but uses their data. It will give you easy to parse JSON like http://mtaapi.herokuapp.com/api?id=120S. There are lots of tutorials out there to help you get started -- search for how to use a REST API.

N.M. F.

unread,
Nov 30, 2017, 9:39:57 AM11/30/17
to mtadeveloperresources
I have a key and use the Bustime GTFS data. But no one shows the link of the subway. What is the link if I wanted to check up real-time GTFS data of the Q train toward coney island?

Geoffrey Wilkinson

unread,
Jan 3, 2018, 10:47:08 PM1/3/18
to mtadeveloperresources
Hi Kevin

Ignore the discouraging comments on here. 

I'm not sure what language you are using, but you want to check out this link. Scroll down to the README file and read it and select the language you are using and there will be an example piece of code for you to perform a request to the URL you use to get the GTFS file and read it:



On Saturday, October 28, 2017 at 8:52:48 PM UTC-4, Kevin Chiu wrote:

Steven Raaen

unread,
Feb 11, 2018, 5:53:32 PM2/11/18
to mtadeveloperresources
If you're using Node, theres a simple package that works nicely. https://www.npmjs.com/package/mta-gtfs.  FWIW, if you're just starting out, Javascript transpiles into Android/Java as well as ios. React still seems to be the rage.


On Saturday, October 28, 2017 at 8:52:48 PM UTC-4, Kevin Chiu wrote:
Message has been deleted

Daniel Ramteke

unread,
Mar 15, 2018, 2:19:14 PM3/15/18
to mtadeveloperresources
For Underway we use Apple's Protobuf parser on the server https://github.com/apple/swift-protobuf Remember to get the MTA's NYCT protobuf extensions.

Daniel

Jon Thornton

unread,
Mar 16, 2018, 11:11:07 AM3/16/18
to mtadeveloperresources
Check out https://github.com/jonthornton/MTAPI for an example of GTFS in Python
Reply all
Reply to author
Forward
0 new messages