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
12 changes: 10 additions & 2 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 All @@ -26,9 +34,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `vehicle_locations` - Timestamped vehicle locations and speeds.
- `passenger_events` - Timestamped passenger-related events, including boardings and alightings.
- `fare_transactions` - Timestamped fare transaction, associated with devices.
- `stop_visits` - Summarized boarding, alighting, arrival, departure, and other events (kneel engaged, ramp deployed, etc.) by trip and stop for each service date.
- `stop_visits` - Summarized boarding, alighting, arrival, departure, and other events (kneel engaged, ramp deployed, etc.) by trip and stop for each service date.
- `trips_performed` - Trips performed for each service date.
- `station_activities` - Summarized transactions, entries, and exits by stop or station and time period for each service date (for events not associated with a trip).
- `station_activities` - Summarized transactions, entries, and exits by stop or station and time period for each service date (for events not associated with a trip).
Comment on lines -29 to +39

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's some extra whitespace in these lines.

- `devices` - Measurement devices, such as AVL, APC, and AFC devices, associated with vehicles or stops or stations.
- `train_cars` - Assets that comprise vehicles, such as train cars, with descriptive information.
- `vehicle_train_cars` - Relationships between assets and vehicles.
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
12 changes: 3 additions & 9 deletions spec/trips_performed.schema.json

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you've accidentally removed trip_id_performed from trips_performed!

Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
}
},
{
"name": "trip_id_scheduled",
"name": "operator_id",
"type": "string",
"title": "ID referencing GTFS trips.trip_id",
"description": "Identifies the scheduled trip associated with the trip performed. One scheduled trip may be associated with multiple operated trips, or an operated trip may not be associated with a scheduled trip. References GTFS. If this trip was published in GTFS Schedule, this value should be consistent with the GTFS `trip_id`. If this trip was not scheduled, the value should be Null."
"title": "ID referencing operators.operator_id",
"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": "route_id",
Expand Down Expand Up @@ -202,12 +202,6 @@
]
}
},
{
"name": "operator_id",
"type": "string",
"title": "ID referencing operators.operator_id",
"description": "Identifies the vehicle’s operator."
},
{
"name": "block_id",
"type": "string",
Expand Down
99 changes: 99 additions & 0 deletions spec/vehicle_crew.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"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. Optional if crew assignment is at vehicle level only."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't trip_id_performed be required if it's part of the primary key?

},
{
"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"
}