Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve siri-add-ride-durations etl logic for retrieving ride first and last stops #6

Open
ShayAdler opened this issue Jun 11, 2022 · 1 comment

Comments

@ShayAdler
Copy link
Contributor

ShayAdler commented Jun 11, 2022

Current state -
The first and last siri_vehicle_location records per siri ride are taken.
Sometimes some of the records are taken before the bus actually started moving (see example from line 480, line ref 7022). the same is probably correct for the last stop (didn't investigate yet).

image

First stop possible solutions -

  • Filtering distance_from_journey_start != 0, which is a raw data from MOT siri data. This is not an hermetic solution, because as we can see in the example, the 2 selected rows are actually 350m away from each other (and by looking at google maps you can see that the bus has left the first station), but the value is still 0.
  • Filtering by the first movement (by the first coordination change) - this is also not an hermetic solution in cases where the bus might be moving in a big "central station".
  • Further investigation of those patterns in more examples - for example, here we can see that the exact same time was recorded until there was an actual move.

Last stop - this is even trickier, because we need to verify that the last location is related to the actual last stop in gtfs (if this is just a random stop in the middle, it means that this route was not completed successfully).

@ShayAdler
Copy link
Contributor Author

ShayAdler commented Aug 15, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant