Repository navigation
Add vehicle_crew supporting table - #246
chrisyamas wants to merge 23 commits into
Conversation
|
Documentation available at: |
|
Data Validation Report
|
|
Data Validation Report
|
This warning is because the frictionless validation check can't find the |
There was a problem hiding this comment.
I believe this meets the needs discussed in the issue. However, it looks like this PR accidentally removes trip_id_performed from the trips_performed table. I also suspect that trip_id_performed should be required if it's part of the primary key. Though to be fair, it doesn't strictly need to be, service_date, crew_id and start_time should be sufficient for the primary key. Including trip_id_performed just makes it easier to use.
- undo removal of
trips_performed.trip_id_performed
…hicle_crew, clean up CHANGELOG whitespace
|
Data Validation Report
|
Anchor vehicle_crew key on vehicle and make trip_id_performed optional
|
Data Validation Report
|
|
Heads up @jlstpaul @botanize @jaygordon @laurie-jarvus @jabhij @wtimmerman-fitp @mpaine-act that this proposal has been revised again in response to the review here, so it's re-circulating per the change management policy (at least 72 hours, previous reviewers notified). With this round of changes, the If nothing here gives you pause, it will proceed, and fresh reviews are welcome either way. We still need one more scored review from outside the original working group on this one. |
|
The vehicle-anchored key appropriately supports continuous crew assignments across interlined trips and mid-trip reliefs, with an optional trip reference where applicable. I support the broader crew terminology, including contractors, and the proposed crew_role values. Before finalizing, please:
Accepted with minor changes. |
Update field descriptions to clarify that * crew assignments may overlap, * vehicle_crew role assignments supersede crew role assignments, * vehicle_crew assignments may overlap when there are multiple crew, but the same crew member should not be assigned to multiple vehicles at the same time, * vehicle_crew.start_time is inclusive and end_time is exclusive
|
Data Validation Report
|
@mpaine-act Please review changes in f46d182 and 746135a |
…e, restore plain characters
|
It was mentioned on a call yesterday that my review was requested -- I have not fully tracked the changes here and defer to the existing reviewers, please let me know if I'm specifically needed for quorum and I can review more carefully? But I don't have any concerns and don't intend to be a blocker. |
botanize
left a comment
There was a problem hiding this comment.
I think the enums for crew_role are too limited and I'm not sure if they should be expanded or just free text fields.
| "constraints": { | ||
| "required": true, | ||
| "enum": [ | ||
| "operator", | ||
| "conductor", | ||
| "fare_inspector", | ||
| "other" | ||
| ] | ||
| } |
There was a problem hiding this comment.
Not sure it's worth making this an enum. I can already think of a couple additional roles that really shouldn't be grouped into other, e.g., "police", "trainer", "supervisor"
| "constraints": { | ||
| "enum": [ | ||
| "operator", | ||
| "conductor", | ||
| "fare_inspector", | ||
| "other" | ||
| ] | ||
| } |
There was a problem hiding this comment.
Same here, either expand the enum options or make this a string.
I agree that we should expand the list of roles. I don't think it is necessary to do this immediately, as I think it would be better to do this over time, informed by implementation experience. In particular, while there are a lot of roles within an agency, we should consider more carefully which are ones that agencies want to capture in connection with the operational data contained in TIDES I would not make this just a text field. There is a lot of consistency within the industry on the types of crew roles. I think it is reasonable to agree on the pre-defined list, and I think this approach provides greater clarity to users of the data about what those values mean. f we find the need for more freeform role details, I would rather add an additional descriptive text field in the future. For example, while most agencies have the role of a vehicle operator (driver), the different types of operators vary greatly within and across agencies. If an agency wants to captures the type of operator, that should be a secondary text field. My biggest remaining concern is that we have two |
|
I'm assigned as a reviewer but I missed several conversations, so if my suggestions have already been discussed and resolved please disregard.
Taking both points together, we'd have a |
|
Thanks @botanize for taking a look, and @jlstpaul for the thoughtful answer. I think John's approach makes sense for alpha.1: keep |
|
Thanks @jaygordon, that's a really good point, and you're right that a crew is the group rather than the individual. I think the rename is worth taking up, but renaming both tables is a bigger change than this revision round, and the current names came out of the group discussion Gabriel summarized back in August. So for alpha.1 I'd like to keep |
|
Just wanted to give a heads up to @laurie-jarvus @botanize @wtimmerman-fitp @jaygordon @mpaine-act @jabhij that this proposal has been revised again, this time in response to Michael Paine's review (thank you Michael!), so it's re-circulating per the change management policy (at least 72 hours, previous reviewers notified). With this round of changes, John has worked the clarifications Michael asked for into the spec text. When The table names stay as they are for alpha.1, and Jay's suggestion to rename them ( If nothing here gives you pause, it will go ahead and proceed through review in accordance with the CMP, and fresh reviews are welcome either way. @botanize thanks for the approval! The only changes since then are the wording fixes listed above and the subset line, so a fresh approval on the new head whenever you have a moment would be great, and @laurie-jarvus no need for a deep dive given your comment, but if a fresh approval on the new head works for you, it would definitely help. Thank you all! |
Summary
Adds new
vehicle_crewtable to support multiple crew members per vehicle/trip, including mid-trip reliefs. This addresses the limitation wheretrips_performed.operator_idcould only reference a single operator.Resolves #220
Changes
spec/vehicle_crew.schema.json(new) defines thevehicle_crewtable with:[service_date, trip_id_performed, crew_id, start_time]service_date,vehicle_id,crew_id,start_timetrip_id_performed(for vehicle-level assignments),crew_role,end_timecrew_roleenum:operator,conductor,fare_inspector,other(uses snake_case consistent with 🐛📄 – Improve event_type naming convention in passenger_events #235)trips_performed,vehicles, andoperatorssamples/template/TIDES/vehicle_crew.csv(new) provides header-only templatespec/trips_performed.schema.jsonupdatedoperator_iddescription to clarify optional usage and reference tovehicle_crewtable for multi-operator scenariosspec/tides-datapackage-profile.jsonaddedvehicle_crewtotides-tableenumsamples/template/TIDES/datapackage.jsonaddedvehicle_crewresource entryCHANGELOG.mdadded entries under[Unreleased]for new table and description changeReason for this change
Rail systems commonly have multiple crew members (operators, conductors) on a single trip, and operator reliefs mid-trip are standard practice. The current
trips_performed.operator_idfield can only reference one operator, forcing agencies to either lose crew data or pick an arbitrary operator to record.The new
vehicle_crewtable allows agencies to capture complete crew assignment history while keeping the existingoperator_idfield for simple single-operator cases.- See related discussion in Issue #220 and Fall 2025 TIDES Issues Working Group notes from December 1 and December 10.
Review checklist
Per change management policy, the following must be met before feature branch changes can merge to
developbranch:Community review status (updated September 2, 2026)
How community review works: Per the TIDES Change Management Policy, a proposal moves forward once at least three TIDES Contributors outside the originating working group publicly comment with a score: Accepted, Accepted with minor changes, or Substantially revised. A few sentences with your read of the proposal is a complete review.
Originating working group (Fall 2025 Issues Working Group, December 1 and 10, 2025 sessions): Christopher Yamas, Gabriel Sánchez Martínez, Ian Thistle, Jay Gordon, John Levin, Joey Reid, Spenser Sutinen. Their work is reflected in the proposal itself; community review comes from Contributors beyond this group.
Review so far: Laurie Merrell (@laurie-jarvus) and @jabhij have posted scored reviews (Accepted; Accepted with minor changes, with clarifications answered in the thread). One more review from a Contributor outside the working group completes community review.
Community review remains open, and reviews are welcome while we finalize v2.0. If you have not yet weighed in, a short comment closing with where you land (Accepted / Accepted with minor changes / Substantially revised) is all we need.
The full v2.0 map lives on #271.