Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `vehicle_crew` table for multiple crew members per trip, including mid-trip reliefs ([#220](https://github.com/TIDES-transit/TIDES/issues/220))

### Changed

- `trips_performed.operator_id` description clarified to reference vehicle_crew table for multi-operator trips ([#220](https://github.com/TIDES-transit/TIDES/issues/220))

## [1.0] - 2025-12-23

### Changed
Expand Down
14 changes: 14 additions & 0 deletions samples/template/TIDES/datapackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,20 @@
}
]
},
{
"name": "vehicle_crew",
"profile": "tabular-data-resource",
"path": "vehicle_crew.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/vehicle_crew.schema.json",
"sources": [
{
"title": "Where did data come from?",
"component": "Type of technology component, i.e. `CAD/AVL`",
"product": "Product used.",
"vendor": "Vendor selling product."
}
]
},
{
"name": "station_activities",
"profile": "tabular-data-resource",
Expand Down
1 change: 1 addition & 0 deletions samples/template/TIDES/vehicle_crew.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service_date,trip_id_performed,vehicle_id,crew_id,crew_role,start_time,end_time
1 change: 1 addition & 0 deletions spec/tides-datapackage-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@
"stop_visits",
"train_cars",
"trips_performed",
"vehicle_crew",
"vehicle_locations",
"vehicle_train_cars",
"vehicles"
Expand Down
2 changes: 1 addition & 1 deletion spec/trips_performed.schema.json
Comment thread
botanize marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
"name": "operator_id",
"type": "string",
"title": "ID referencing operators.operator_id",
"description": "Identifies the vehicles operator."
"description": "Identifies the vehicle's operator. Optional; for trips with multiple operators, use the first operator or reference the vehicle_crew table for complete crew assignments."
},
{
"name": "block_id",
Expand Down
102 changes: 102 additions & 0 deletions spec/vehicle_crew.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"primaryKey": [
"service_date",
"trip_id_performed",
"crew_id",
"start_time"
],
"missingValues": [
"NA",
"NaN",
""
],
"fields": [
{
"name": "service_date",
"type": "date",
"description": "Service date. References GTFS",
"constraints": {
"required": true
}
},
{
"name": "trip_id_performed",
"type": "string",
"title": "ID referencing trips_performed.trip_id_performed",
"description": "Identifies the trip performed. Required as part of the primary key.",
"constraints": {
"required": true
}
},
{
"name": "vehicle_id",
"type": "string",
"title": "ID referencing vehicles.vehicle_id",
"description": "Identifies the vehicle.",
"constraints": {
"required": true
}
},
{
"name": "crew_id",
"type": "string",
"title": "ID referencing operators.operator_id",
"description": "Identifies the crew member. References operators table.",
"constraints": {
"required": true
}
},
{
"name": "crew_role",
"type": "string",
"description": "Role of the crew member on the vehicle.",
"constraints": {
"enum": [
"operator",
"conductor",
"fare_inspector",
"other"
]
}
},
{
"name": "start_time",
"type": "datetime",
"description": "Timestamp when the crew member's assignment began.",
"constraints": {
"required": true
}
},
{
"name": "end_time",
"type": "datetime",
"description": "Timestamp when the crew member's assignment ended. Null if assignment is ongoing."
}
],
"foreignReferences": [
{
"fields": ["service_date", "trip_id_performed"],
"reference": {
"resource": "trips_performed",
"fields": ["service_date", "trip_id_performed"]
}
},
{
"fields": "vehicle_id",
"reference": {
"resource": "vehicles",
"fields": "vehicle_id"
}
},
{
"fields": "crew_id",
"reference": {
"resource": "operators",
"fields": "operator_id"
}
}
],
"name": "vehicle_crew.schema.json",
"description": "Crew member assignments to vehicles and trips, supporting multiple crew members and mid-trip reliefs.",
"_table_type": "Supporting"
}
Loading