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
On Monday, July 30, 2012 11:33:39 AM UTC-5, ctaweb wrote:
> 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.