luqmaan / Instabus

:bus::dash: There is no need to bus upset
http://instabus.org
GNU General Public License v3.0
74 stars 13 forks source link

Which routes are nearby? #206

Closed luqmaan closed 8 years ago

luqmaan commented 9 years ago

We need new data to answer this question. In the iOS version this could be done querying SQLite https://github.com/luqmaan/MetroRappid-iOS/blob/a-nu-start/MetroRappid/GTFSDB.m#L220-L248.

But since one of the goals of Instabus is to not have a server dependency, these queries need to be computed beforehand. Ideally the results would be stored as JSON.


Actually we can do this using the Transitime APIs. http://transitime-host.cloudapp.net/api/v1/key/f18a8240/agency/cap-metro/command/predictionsByLoc?lat=30.290556&lon=-97.747654

scascketta commented 9 years ago

You can see a proof-of-concept I made on the nearby-stops branch. It logs all the routes available on nearby stops to the console. This implementation depends on an extra ~240KB JSON file, and an npm module.