-
Notifications
You must be signed in to change notification settings - Fork 6
Orion Trip Generator
Eddy Ionescu edited this page Jun 7, 2018
·
21 revisions
- takes in JSON S3 files (API output) to generate trips
What is a trip?
- uniqueness is defined by (vehicle_id, route_id, direction_id) staying consistent with every transit state.
- If this tuple is different in the next state, then we end the trip. If we see a tuple that we didn't see last state, we start a new trip.
- when a trip ends, we write it to a JSON file in S3. We can worry about compressing it or loading it into some databases later.
Why?
-
our goal is to get the speed & reliability of routes.
-
An easy way of approaching this problem is to look at individual trips and then get data about them along route segments.
-
Storing trip metrics also makes it easier to eventually quickly handle more complex analysis due to aggregated metrics.
-
our goal is to make Muni's GPS data open and accessible to use.
-
making trip data accessible via S3 keeps individual file sizes small and is straightforward & logical for open-data users to retrieve.