Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- **BREAKING:** `vehicle_groups` table normalizing shared vehicle attributes (capacities, and additional attributes to be defined) ([#269](https://github.com/TIDES-transit/TIDES/issues/269), [#272](https://github.com/TIDES-transit/TIDES/pull/272))
- `vehicle_assignments` table representing vehicles and consists in operation, to which operational data and devices may be associated ([#269](https://github.com/TIDES-transit/TIDES/issues/269))
- `consist_vehicles` table documenting the cars of each consist with order and orientation ([#269](https://github.com/TIDES-transit/TIDES/issues/269))
- `vehicle_direction` field on `vehicle_locations`, `passenger_events`, `fare_transactions`, `stop_visits`, and `trips_performed` ([#269](https://github.com/TIDES-transit/TIDES/issues/269))

### Changed

- **BREAKING:** `vehicles` table repurposed as the registry of physical vehicles (buses and individual train cars); attribute fields moved to `vehicle_groups`, and `vehicle_label`, `license_plate`, `start_date`, `end_date`, and `vehicle_group_id` fields added ([#269](https://github.com/TIDES-transit/TIDES/issues/269))

### Removed

- **BREAKING:** `train_cars` and `vehicle_train_cars` tables, superseded by `vehicles`, `vehicle_assignments`, and `consist_vehicles` ([#269](https://github.com/TIDES-transit/TIDES/issues/269))

## [1.0] - 2025-12-23

### Changed
Expand Down
1 change: 1 addition & 0 deletions samples/template/TIDES/consist_vehicles.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
consist_id,car_vehicle_id,car_order,car_orientation
45 changes: 30 additions & 15 deletions samples/template/TIDES/datapackage.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
]
},
{
"name": "train_cars",
"name": "operators",
"profile": "tabular-data-resource",
"path": "train_cars.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/train_cars.schema.json",
"path": "operators.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/operators.schema.json",
"sources": [
{
"title": "Where did data come from?",
Expand All @@ -81,10 +81,10 @@
]
},
{
"name": "operators",
"name": "stop_visits",
"profile": "tabular-data-resource",
"path": "operators.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/operators.schema.json",
"path": "stop_visits.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/stop_visits.schema.json",
"sources": [
{
"title": "Where did data come from?",
Expand All @@ -95,10 +95,10 @@
]
},
{
"name": "stop_visits",
"name": "vehicles",
"profile": "tabular-data-resource",
"path": "stop_visits.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/stop_visits.schema.json",
"path": "vehicles.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/vehicles.schema.json",
"sources": [
{
"title": "Where did data come from?",
Expand All @@ -109,10 +109,10 @@
]
},
{
"name": "vehicle_train_cars",
"name": "vehicle_groups",
"profile": "tabular-data-resource",
"path": "vehicle_train_cars.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/vehicle_train_cars.schema.json",
"path": "vehicle_groups.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/vehicle_groups.schema.json",
"sources": [
{
"title": "Where did data come from?",
Expand All @@ -123,10 +123,24 @@
]
},
{
"name": "vehicles",
"name": "vehicle_assignments",
"profile": "tabular-data-resource",
"path": "vehicles.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/vehicles.schema.json",
"path": "vehicle_assignments.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/vehicle_assignments.schema.json",
"sources": [
{
"title": "Where did data come from?",
"component": "Type of technology component, i.e. `AVL`",
"product": "Product used.",
"vendor": "Vendor selling product."
}
]
},
{
"name": "consist_vehicles",
"profile": "tabular-data-resource",
"path": "consist_vehicles.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/consist_vehicles.schema.json",
"sources": [
{
"title": "Where did data come from?",
Expand All @@ -136,6 +150,7 @@
}
]
},

{
"name": "trips_performed",
"profile": "tabular-data-resource",
Expand Down
2 changes: 1 addition & 1 deletion samples/template/TIDES/fare_transactions.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
transaction_id,date,timestamp,location_ping_id,amount,currency_type,fare_action,trip_id_performed,stop_sequence,vehicle_id,device_id,fare_id,stop_id,group_size,media_type,rider_category,fare_product,fare_period,fare_capped,fare_media_id,fare_media_id_purchased,balance,service_date,event_timestamp
transaction_id,date,timestamp,location_ping_id,amount,currency_type,fare_action,trip_id_performed,stop_sequence,vehicle_id,vehicle_direction,device_id,fare_id,stop_id,group_size,media_type,rider_category,fare_product,fare_period,fare_capped,fare_media_id,fare_media_id_purchased,balance,service_date,event_timestamp
2 changes: 1 addition & 1 deletion samples/template/TIDES/passenger_events.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
passenger_event_id,service_date,event_timestamp,location_ping_id,trip_id_performed,trip_id_scheduled,trip_stop_sequence,scheduled_stop_sequence,event_type,vehicle_id,device_id,train_car_id,stop_id,pattern_id,event_count
passenger_event_id,service_date,event_timestamp,location_ping_id,trip_id_performed,trip_id_scheduled,trip_stop_sequence,scheduled_stop_sequence,event_type,vehicle_id,vehicle_direction,device_id,train_car_id,stop_id,pattern_id,event_count
2 changes: 1 addition & 1 deletion samples/template/TIDES/stop_visits.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
service_date,trip_id_performed,trip_stop_sequence,scheduled_stop_sequence,pattern_id,vehicle_id,dwell,stop_id,timepoint,schedule_arrival_time,schedule_departure_time,actual_arrival_time,actual_departure_time,distance,boarding_1,alighting_1,boarding_2,alighting_2,departure_load,door_open,door_close,door_status,ramp_deployed_time,ramp_failure,kneel_deployed_time,lift_deployed_time,bike_rack_deployed,bike_load,revenue,number_of_transactions,schedule_relationship
service_date,trip_id_performed,trip_stop_sequence,scheduled_stop_sequence,pattern_id,vehicle_id,vehicle_direction,dwell,stop_id,timepoint,schedule_arrival_time,schedule_departure_time,actual_arrival_time,actual_departure_time,distance,boarding_1,alighting_1,boarding_2,alighting_2,departure_load,door_open,door_close,door_status,ramp_deployed_time,ramp_failure,kneel_deployed_time,lift_deployed_time,bike_rack_deployed,bike_load,revenue,number_of_transactions,schedule_relationship
1 change: 0 additions & 1 deletion samples/template/TIDES/train_cars.csv

This file was deleted.

2 changes: 1 addition & 1 deletion samples/template/TIDES/trips_performed.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
date,trip_id_performed,vehicle_id,trip_id_scheduled,route_id,route_type,shape_id,direction_id,operator_id,block_id,trip_start_stop_id,trip_end_stop_id,schedule_trip_start,schedule_trip_end,actual_trip_start,actual_trip_end,trip_type,schedule_relationship,service_date
date,trip_id_performed,vehicle_id,vehicle_direction,trip_id_scheduled,route_id,route_type,shape_id,direction_id,operator_id,block_id,trip_start_stop_id,trip_end_stop_id,schedule_trip_start,schedule_trip_end,actual_trip_start,actual_trip_end,trip_type,schedule_relationship,service_date
1 change: 1 addition & 0 deletions samples/template/TIDES/vehicle_assignments.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vehicle_assignment_id,service_date,type,vehicle_id,vehicle_group_id,assignment_start_time,assignment_end_time,operational_status
1 change: 1 addition & 0 deletions samples/template/TIDES/vehicle_groups.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vehicle_group_id,capacity_seated,capacity_full,capacity_wheelchair,capacity_bike
2 changes: 1 addition & 1 deletion samples/template/TIDES/vehicle_locations.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
location_ping_id,date,timestamp,trip_id_performed,stop_sequence,vehicle_id,device_id,stop_id,current_status,latitude,longitude,gps_quality,heading,speed,odometer,schedule_deviation,headway_deviation,trip_type,schedule_relationship,event_timestamp
location_ping_id,date,timestamp,trip_id_performed,stop_sequence,vehicle_id,vehicle_direction,device_id,stop_id,current_status,latitude,longitude,gps_quality,heading,speed,odometer,schedule_deviation,headway_deviation,trip_type,schedule_relationship,event_timestamp
1 change: 0 additions & 1 deletion samples/template/TIDES/vehicle_train_cars.csv

This file was deleted.

2 changes: 1 addition & 1 deletion samples/template/TIDES/vehicles.csv
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vehicle_id,vehicle_start,vehicle_end,model_name,facility_name,capacity_seated,capacity_wheelchair,capacity_bike,bike_rack,capacity_standing
vehicle_id,start_date,end_date,vehicle_group_id,vehicle_label,license_plate
69 changes: 69 additions & 0 deletions spec/consist_vehicles.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"primaryKey": [
"consist_id",
"car_vehicle_id"
],
"missingValues": [
"NA",
"NaN",
""
],
"fields": [
{
"name": "consist_id",
"type": "string",
"title": "ID referencing vehicle_assignments.vehicle_assignment_id",
"description": "Identifies the vehicle assignment record for the consist.",
"constraints": {
"required": true
}
},
{
"name": "car_vehicle_id",
"type": "string",
"title": "ID referencing vehicles.vehicle_id",
"description": "Identifies the train car vehicle record in the vehicles table.",
"constraints": {
"required": true
}
},
{
"name": "car_order",
"type": "integer",
"description": "The assigned order of the car within the consist.",
"constraints": {
"minimum": 1
}
},
{
"name": "car_orientation",
"type": "string",
"description": "Indicates the orientation of the car within the consist.",
"constraints": {
"enum": [
"forward",
"backward"
]
}
}
],
"foreignReferences": [
{
"fields": "consist_id",
"reference": {
"resource": "vehicle_assignments",
"fields": "vehicle_assignment_id"
}
},
{
"fields": "car_vehicle_id",
"reference": {
"resource": "vehicles",
"fields": "vehicle_id"
}
}
],
"name": "consist_vehicles.schema.json",
"description": "Assignment of vehicles/cars into consists.",
"_table_type": "Supporting"
}
13 changes: 0 additions & 13 deletions spec/devices.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
"type": "string",
"description": "Identifies the vehicle on which the device is located. May be null if the device is at a stop or station."
},
{
"name": "train_car_id",
"title": "ID referencing train_cars.train_car_id",
"type": "string",
"description": "Identifies the train car or asset on which the device is located. May be null if the device is at a stop or station or if the Train_cars file is not used."
},
{
"name": "device_type",
"type": "string",
Expand Down Expand Up @@ -78,13 +72,6 @@
"resource": "vehicles",
"fields": "vehicle_id"
}
},
{
"fields": "train_car_id",
"reference": {
"resource": "train_car",
"fields": "train_car_id"
}
}
],
"name": "devices.schema.json",
Expand Down
11 changes: 11 additions & 0 deletions spec/fare_transactions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@
"title": "ID referencing vehicles.vehicle_id",
"description": "Identifies the vehicle. May be null if collection device is NOT located on a vehicle. May be null if on a vehicle but vehicle data is unavailable, in which case the data would be associated with a trip and/or stop."
},
{
"name": "vehicle_direction",
"type": "string",
"description": "Indicates the direction of travel of the vehicle for this event.",
"constraints": {
"enum": [
"forward",
"backward"
]
}
},
{
"name": "device_id",
"type": "string",
Expand Down
24 changes: 11 additions & 13 deletions spec/passenger_events.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,21 @@
}
},
{
"name": "device_id",
"name": "vehicle_direction",
"type": "string",
"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."
"description": "Indicates the direction of travel of the vehicle for this event.",
"constraints": {
"enum": [
"forward",
"backward"
]
}
},
{
"name": "train_car_id",
"name": "device_id",
"type": "string",
"title": "ID referencing train_cars.train_car_id",
"description": "Identifies the train car."
"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 and the device_id is not distinct from vehicle_id."
},
{
"name": "stop_id",
Expand Down Expand Up @@ -174,13 +179,6 @@
"fields": "device_id"
}
},
{
"fields": "train_car_id",
"reference": {
"resource": "train_cars",
"fields": "train_car_id"
}
},
{
"fields": "stop_id",
"reference": {
Expand Down
11 changes: 11 additions & 0 deletions spec/stop_visits.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@
"title": "ID referencing vehicles.vehicle_id",
"description": "Identifies the vehicle."
},
{
"name": "vehicle_direction",
"type": "string",
"description": "Indicates the direction of travel of the vehicle for this event.",
"constraints": {
"enum": [
"forward",
"backward"
]
}
},
{
"name": "dwell",
"type": "integer",
Expand Down
7 changes: 4 additions & 3 deletions spec/tides-datapackage-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,23 +293,24 @@
},
"tides-table": {
"enum": [
"consist_vehicles",
"devices",
"fare_transactions",
"operators",
"station_activities",
"passenger_events",
"stop_visits",
"train_cars",
"trips_performed",
"vehicle_assignments",
"vehicle_groups",
"vehicle_locations",
"vehicle_train_cars",
"vehicles"
],
"description": "An identifier string corresponding to the name of one of the table specs in the TIDES data package",
"type": "string",
"examples": [
"fare_transactions",
"train_cars"
"vehicles"
]
},
"schema": {
Expand Down
Loading
Loading