This is an experiment to combine data from a bus operator and answer some sample questions with a simple UI. The input data includes GTFS, discrepencies from the schedule, bus GPS trackers, and boarding events. One way of joining this data is to come up with a higher-level "schema" describing things like:
- the trajectory of a vehicle, segmented into semantic stages like traveling between stops and waiting at a stop or depot
- multi-leg journeys a person takes, making heuristic guesses about where they alight, waiting times, how they transfer, etc
- a boarding event pairing passengers waiting at a stop with a particular vehicle
Viewing vehicles and passengers as having a state machine, a day can be "simulated" (played back from recorded events). This is useful for visualization.
See these slides for more.
See the user guide. This project is under development during June and July 2022. When the dust settles, I'll write up documentation for everything.
See here for more recent notes.
- Generally assuming the unit of analysis is one day at a time
- Agnostic to the transit agency; as soon as we have ticketing or GPS data from another group, we can transform it into the same common formats
- Assuming the data stays small, no need for a database. The data never needs to hit a network; the user can transform their raw input once, then run the UI against the simplified schema.
- There's a simple UI using widgetry. It can run natively or in a web browser.
- An API to read the schema and work with it could be wired up to another language, if needed.
Basic data exploration:
- Playback bus movement over a day
- Explore stops, routes, timetables, etc. (To my knowledge, there's no free GTFS viewer that lets you answer something like "for a route ID, see all the variations in stop sequence and the timetable for this")
And particular questions:
- Which bus routes are used most frequently as the last leg of a journey?
- For journeys ending in a user-drawn region, where do the trips start and what route does the first leg use?
- Per bus stop and route, draw a waiting time graph for passengers there
- Where are buses most frequently delayed in traffic or at intersections?
- widgetry for the UI and some other core A/B Street geometry libraries
- osm2streets to optionally show the street network and (partly) snap bus routes to it
- Material icons
- Common Rust libraries like serde, structopt, zip, etc