Rename passenger_events to device_events with expanded scope#251
Rename passenger_events to device_events with expanded scope#251chrisyamas wants to merge 6 commits into
Conversation
|
Documentation available at: |
|
Data Validation Report
|
botanize
left a comment
There was a problem hiding this comment.
Mostly great! Just a couple of clarifying questions.
| "title": "ID referencing devices.device_id", | ||
| "description": "Identifies the device that recorded the event. May be null if only a single device is reporting passenger events on a vehicle/ train car and the device_id is not distinct from vehicle_id/train_car_id." | ||
| "title": "Employee ID", | ||
| "description": "Identifies the employee operating a handheld device, such as a fare inspector or conductor with a mobile validator." |
There was a problem hiding this comment.
Should this also apply to vehicle-mounted devices? e.g., the bus operator associated with a bus boarding event?
| "type": "string", | ||
| "title": "ID referencing vehicles.vehicle_id", | ||
| "description": "Identifies a vehicle.", | ||
| "description": "Identifies a vehicle. Required for vehicle-mounted device events; optional for station-based or mobile device events." |
There was a problem hiding this comment.
vehicle_id should be optional for all device events, since device_id is required, and device_id links to vehicle_id in the devices table.
| "name": "latitude", | ||
| "type": "number", | ||
| "title": "Latitude", | ||
| "description": "Degrees North, in the WGS-84 coordinate system. Used for mobile device events not at a fixed location. References GTFS-Realtime.", |
There was a problem hiding this comment.
I'm not sure a reference to GTFS-Realtime provides any value. Also for longitude below.
| "description": "Degrees North, in the WGS-84 coordinate system. Used for mobile device events not at a fixed location. References GTFS-Realtime.", | |
| "description": "Degrees North, in the WGS-84 coordinate system. Used for mobile device events not at a fixed location.", |
| "type": "integer", | ||
| "title": "Positive integer referencing stop_visits.trip_stop_sequence", | ||
| "description": "The actual order of stops visited within a performed trip. The values must start at 1 and must be consecutive along the trip.<br/> Example: A bus departs the first stop and detours around the second and third scheduled stops, visiting one unscheduled stop and resuming regular service at the 4th scheduled stop. The `scheduled_stop_sequence` is [1, null, 4], and the `trip_stop_sequence` is [1, 2, 3].", | ||
| "description": "The actual order of stops visited within a performed trip. The values must start at 1 and must be consecutive along the trip. Required for vehicle-based events; optional for station-based or mobile device events not associated with a trip.", |
There was a problem hiding this comment.
Why remove the example here? I think the "performed" stop-sequence is a little bit of a strange concept, and the comparison of scheduled_stop_sequence to trip_stop_sequence is potentially helpful.
Summary
BREAKING CHANGE: This PR implements a significant architectural change that shifts TIDES from a vehicle-centered to a device-centered model. The
passenger_eventstable is renamed todevice_eventsto accommodate:Resolves #241
Related to:
Changes
Files Renamed
spec/passenger_events.schema.json-->spec/device_events.schema.jsonsamples/template/TIDES/passenger_events.csv-->samples/template/TIDES/device_events.csvSchema Changes (device_events)
Field Renames:
passenger_event_id-->device_event_idConstraint Changes:
device_id- now required (was optional)vehicle_id- now optional (was required)trip_stop_sequence- now optional (was required)New Fields:
latitudelongitudeemployee_id- for handheld device operatorsNote: this PR utilizes snake_case, as opposed to 'Sentence case', for enum values given the work parallel work occurring in #247
New event types:
passenger_entry- for station-based entry events (fare gate passages)passenger_exit- for station-based exit eventsOther Files Updated
spec/tides-datapackage-profile.json- updated enumsamples/template/TIDES/datapackage.json- updated resource referencesCHANGELOG.md- comprehensive breaking change documentationMigration Notes
Agencies migrating from v1.x will need to:
passenger_eventstable/file todevice_eventspassenger_event_idcolumn todevice_event_iddevice_idfor all records (now required)event_typevalues from Title Case to snake_caseReview checklist
Per change management policy, the following must be met before feature branch changes can merge to
developbranch: