transitmatters / gobble

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

Add scheduled headways to bus events #7

Closed hamima-halim closed 1 year ago

hamima-halim commented 1 year ago

Adding scheduled headways and timetables to bus events as per https://github.com/transitmatters/gobble/issues/3.

Nothing fancy, except that I've set the headway for the first stop of a trip to -1. Can also make that 0 or NaN y'all prefer.

hamima-halim commented 1 year ago

AMAZING I AM SO GLAD YOU'RE HERE YESSSSSS

Can the first be empty string?

$ aws s3 cp s3://tm-mbta-performance/Events/monthly-bus-data/66-0-1378/Year=2023/Month=6/events.csv.gz - | zcat | head -n 2
service_date,route_id,trip_id,direction_id,stop_id,stop_sequence,vehicle_id,vehicle_label,event_type,event_time,scheduled_headway,scheduled_tt
2023-06-01,66,59647325.0,0,1378,6,,,ARR,2023-06-01 05:02:36,,840.0

Ofc!! To clarify, does this mean that you'd like me to remove the initial header row from the daily bus event logs?

mathcolo commented 1 year ago

Oh, sorry, no—I mean can the scheduled headway for the first trip of the day be empty string? I think that's what the system is expecting

hamima-halim commented 1 year ago

Oh, sorry, no—I mean can the scheduled headway for the first trip of the day be empty string? I think that's what the system is expecting

oh sweet, done 👍