transitmatters / gobble

🦃 Process MBTA events into a format that can be consumed by the Data Dashboard
MIT License
2 stars 3 forks source link

Calculate scheduled headway per event #3

Closed mathcolo closed 1 year ago

mathcolo commented 1 year ago

In order to display colored dots in the data dashboard, scheduled_headway needs to be filled in.

Unfortunately, we don't immediately know what the scheduled headway is from a particular vehicle, so we need to calculate it ourselves from GTFS. It also might be possible to request them on-demand, once per day, from the MBTA v3 API.

hamima-halim commented 1 year ago

What's the preferred way to define the scheduled_headway for the first stop in a route for a given day? There's about 4 hours of dead time. We could grab yesterday's stop_times.txt if we have the previous trip_id for that route, but I'd also buy if this is somewhat of a nonsensical notion and we are happy to slap a NaN on it.

hamima-halim commented 1 year ago

This was fixed in https://github.com/transitmatters/gobble/pull/7!