Closed alankessler closed 7 years ago
Hey @alankessler! Try taking a look at https://github.com/CUTR-at-USF/ontime-performance-calculator.
That tool, given data collected from a GTFS-rt VehiclePositions feed, will calculate schedule deviation for each vehicle position and the closest bus stop and store this as another database field. Once you have schedule deviations calculated, in theory you should be able to do a SQL query to grab the fields with the largest deviations (negative values are bus running ahead of schedule, positive values are bus running behind schedule), and I think this will give you what you're looking for. (An aside - you can't simply use archived TripUpdate delays or predicted times to calculate schedule deviations, because they are just that - predictions - and there is no guarantee they are accurate).
Please see the chapter "Producing On-time Performance from GTFS-realtime Data" in this final report for more info on how the tool works, including some caveats.
PTAL and let me know if you have any questions! I'll close out the issue for now, but feel free to re-open or comment with additional questions.
Thank you for making this available. I'm working with https://portlandb.us trying to improve transit in Portland, OR. One thing that would help us is if we could process the saved data to locate congestion points in the city. We would like to be able to show the transportation department where some quick fixes might be possible. Have you already written any tools that might identify where slowdowns are occurring?
Thanks!