Projects proposed at the hackathon ranged from automating campaign finance forms for the City of Austin, mapping bike routes and amenities, creating a mobile app and API for the Aunt Bertha service which matches people to services, an online form for clients of the Homeless RV project, and improving bus transportation for riders.
I fell in with the bus group and the problem was presented by Glenn Gabois of Movability Austin. The problem we focused on was notifying riders the location and time of arrival of their bus while they wait at their stop. Capital Metro, Austin's transportation agency, currently does not provide a feed for their buses while they are in transit. So we divide the problem into three componentes:
- a crowd sourced bus tracking application
- the server side infrastructure to provide bus data
- a mobile application that tells rider a bus' current stop and the number of stops away
- would not require user to turn while on the bus or turn off when off the bus
- determine which stop where the user boarded the bus
- disambiguate between buses that used the same stops
agency.txtUsing the GTFS Reference, I was able to decode how to get from a route to a list of stops. In our case, we picked a route and a trip on that routed, we then needed to find the stops for that trip. Since stops are sequential we just needed a sorted list of stops of the application.
amenities.txt
calendar.txt
calendar_dates.txt
fare_attributes.txt
fare_rules.txt
routes.txt
shapes.txt
stop_times.txt
stops.txt
trips.txt
To get the list of stops, I went through the GTFS Reference to find the keys that would allow me to associated stops with a specific trip. The joins between the data tables looked like this.
- Routes are comprised of trips (northbound, southbound, and time). Select a route from routes.txt, then select a trip by the route_id.
- A single trip list stop_times. Select stop_times by trip_id.
- Stop_times are related to stops by stop_id in the stops.txt file. Select the the stops using the stop_id.
- the app determined the location of the rider via WiFi location or GPS and choose the closest stop
- the bus position feed was simulated and was snapped to the closest stop
- the app compared the rider's stop to the bus' stop, since it was an ordered list it was matter of counting the between the two stops







