Re: Suggestion: Please restructure L Stops CSV for more granularity

51 views
Skip to first unread message

ctaweb

unread,
Jul 30, 2012, 12:33:39 PM7/30/12
to cta...@googlegroups.com
Thanks for your comments. We'll look at how to provide better direction information.
 
Would you like to suggest how to do it in a way that would be useful? We're open to suggestions on our APIs and supporting data.
 
-Tony C, CTA

On Monday, July 23, 2012 12:24:06 PM UTC-5, Marlon wrote:
Hello, 

I'm working on a transit tracker mobile app and this API is easily the best I've seen from any major city. I was a little surprised, however to realize that the stops data csv for L Stops doesn't include any useful direction information. I certainly understand the fact that so many lines share platforms and in alot of scenarios a rider can take any train that arrives to their platform, but the face is, there are many benefits to offering the granularity and there's really no reason that the two have to be mutually exclusive. 

The 'DIRECTION_ID' referenced in the file is essentially worthless. Mostly because of the Blue Line and it's U-shaped route. There needs to be an easy way to get a list of stops for a train line/direction of travel and also identify train eta's by train line and direction of travel and I think with a few slight modifications to stops csv and the train tracker api, it could be immensely more useful and flexible.  

Marlon

unread,
Aug 6, 2012, 4:12:03 PM8/6/12
to cta...@googlegroups.com
What I did for my app was modify to enumerate each line's destinations:

Red Line:
to Howard = 1
to 95th = 2

Orange Line:
to Loop = 1
to Midway = 2

Blue Line:
to Forest Park = 1
to O'Hare = 2

Brown:
to Kimball = 1
to Loop = 2

Green Line:
to Harlem/Lake = 1
to Ashland/63 = 2
to East 63rd = 3

Purple:
to Linden = 1
to Howard = 2
to Loop = 3

Then inside each line's cell, I changed the 1's to a list of numbers that correspond to the directions that service that stop. For orange,brown, and purple lines in the loop, I set both the Loop AND its respective destination in the list to make sure they all show up for users.  For green line trains, most 63rd bound stations have multiple entries.  Not sure if this is the best solution, but it was easy for me to work with and updating it would be fairly minimal as stations changes.  Couple of examples:

Adams/Wabash
30132,S,Adams/Wabash (Inner Loop),-87.626037,41.879507,Adams/Wabash,"Adams/Wabash (Brown, Green, Orange, Pink & Purple Lines)",40680,0,0,0,0,"2,3","1,3","1,3",0,"1,2","1,2"
30131,N,Adams/Wabash (Outer Loop),-87.626037,41.879507,Adams/Wabash,"Adams/Wabash (Brown, Green, Orange, Pink & Purple Lines)",40680,0,0,0,"1,2",1,1,0,0,0,0,0

Belmont
30256,S,Belmont (95th-bound),-87.65338,41.939751,Belmont,"Belmont (Red, Brown & Purple Lines)",41320,1,2,0,0,0,0,0,0,0,0
30255,N,Belmont (Howard-bound),-87.65338,41.939751,Belmont,"Belmont (Red, Brown & Purple Lines)",41320,1,1,0,0,0,0,0,0,0,0
30257,N,Belmont (Kimball-Linden-bound),-87.65338,41.939751,Belmont,"Belmont (Red, Brown & Purple Lines)",41320,1,0,0,1,0,1,1,0,0,0
30258,S,Belmont (Loop-bound),-87.65338,41.939751,Belmont,"Belmont (Red, Brown & Purple Lines)",41320,1,0,0,2,0,3,3,0,0,0

TreKing

unread,
Sep 8, 2012, 12:07:28 AM9/8/12
to cta...@googlegroups.com
On Mon, Jul 23, 2012 at 12:24 PM, Marlon <marlon....@gmail.com> wrote:
The 'DIRECTION_ID' referenced in the file is essentially worthless.

This is a little unrelated, but while you've brought up the DIRECTION_ID item in the files, I'll add two other issues with the CTA GTFS:

1 - The trips.txt file has a column called "direction" which is not a valid column field in this file according to the spec. I believe it should be "trip_headsign".

2 - The values for some entries for this field seems incorrect. For the Red, Blue, and Green lines they are correctly set as "north" or "south". For the Pink, Purple, Yellow, Orange, and Brown lines, it's set as "0".

It's hard to believe this file would be so incorrectly formatted. Are these bugs or am I just missing something?

I hope this is something that can be fixed. I'm already adding a workaround for the "direction" column - I really don't want to have to clean up the trip data for all of these routes each time I re-download the feed.

Thanks.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices

Reply all
Reply to author
Forward
0 new messages