j-ro / BusTrackDC-old

An app for iOS and Android to find out when your Metro or Circulator bus or Metro train is coming to a stop near you, using WMATA and NextBus prediction data.
http://bustrackdc.com
18 stars 8 forks source link

e st & 7th st sw bus stop doesn't load #31

Closed jvillago closed 11 years ago

jvillago commented 11 years ago

No predictions are made for the bus stop at e st & 7th st sw. For example, the 52 and 54 northbound stop there and it doesn't display times. If you go to the WMATA website though, it shows real time listings.

Thanks,

Jeff

j-ro commented 11 years ago

This appears to be an issue with the data WMATA provides in their open data feeds.

The stop you want appears to be stop number 1003666 -- that's what WMATA's real time website says, anyway.

And that stop exists in the Predictions API call -- you can see it yourself here:

http://api.wmata.com/NextBusService.svc/json/JPredictions?StopID=1003666&api_key=your_api_key

(you can grab your own free API key here: http://developer.wmata.com/)

However, that stop doesn't seem to show up when you search for bus stops near an area, such as in this API call:

http://api.wmata.com/Bus.svc/json/JStops?lat=38.883208&lon=-77.02196&radius=500&api_key=your_api_key

That call should get you all the stops within a 500 meters of that lat/lon point, which is 7th and E SW. The stop that shows up for 7th and E is number 4632, according to this API call, not number 1003666.

And that's how the app works -- it queries the stops API endpoint to find stops nearby, and then adds pins to the map. When a pin is clicked, the app takes the stop number for that pin, as defined by the stops API endpoint, and queries the predictions API for that stop number. If nothing is found, it shows the routes for that stop (which it gets from the stops API endpoint) with the "no prediction available" text.

j-ro commented 11 years ago

Also to note, there's a handful of other stops that never seem to have prediction information, even though surrounding stops on those lines do. Connecticut and L NW is one that I use all the time.

Maybe it's something I can bring up with WMATA...

jvillago commented 11 years ago

Right, so I'm not really clear if you're saying there's something I can do on my part to get this fixed. I just know that before the other app (NextBus DC) went dead, I could see the time arrivals for this specific bus stop. For some reason it hasn't been working since around that time point. If there was a way that could be fixed that would be really great! :)

j-ro commented 11 years ago

Unfortunately, nothing you or I can do in the immediate term.

I'll email my contact at WMATA about this -- the issue is with the data they're providing, there's some kind of mistake in it. My app will only ever be as good as the data they release. If they fix it, this will start working again!

My understanding is the old NextBus app used an earlier version of the data feed, so presumably the data could be different, which might explain why it worked then but doesn't on this new feed.