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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- New `device_status` table for tracking device operational status changes over time ([#242](https://github.com/TIDES-transit/TIDES/issues/242))
- Tracks when devices go offline, return to service, or experience errors
- Two timestamps: `record_timestamp` (when recorded) vs `status_change_timestamp` (when status actually changed)
- Supports data quality analysis by distinguishing missing data due to device outages from actual service patterns

## [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 @@ -24,6 +24,20 @@
}
],
"resources": [
{
"name": "device_status",
"profile": "tabular-data-resource",
"path": "device_status.csv",
"schema": "https://raw.githubusercontent.com/TIDES-transit/TIDES/main/spec/device_status.schema.json",
"sources": [
{
"title": "Where did data come from?",
"component": "Type of technology component, e.g. `Device monitoring system`",
"product": "Product used.",
"vendor": "Vendor selling product."
}
]
},
{
"name": "devices",
"profile": "tabular-data-resource",
Expand Down
1 change: 1 addition & 0 deletions samples/template/TIDES/device_status.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
device_status_id,service_date,record_timestamp,status_change_timestamp,device_id,status_type,status_reason
80 changes: 80 additions & 0 deletions spec/device_status.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"primaryKey": "device_status_id",
"missingValues": [
"NA",
"NaN",
""
],
"fields": [
{
"name": "device_status_id",
"type": "string",
"title": "Device status ID",
"description": "Unique identifier for this device status record.",
"constraints": {
"required": true,
"unique": true
}
},
{
"name": "service_date",
"type": "date",
"title": "Service date",
"description": "Service date associated with this status record. Optional because device status may not align with transit service dates."
},
{
"name": "record_timestamp",
"type": "datetime",
"title": "Record timestamp",
"description": "Timestamp when this status record was created in the system. May differ from status_change_timestamp if status changes are recorded retroactively.",
"constraints": {
"required": true
}
},
{
"name": "status_change_timestamp",
"type": "datetime",
"title": "Status change timestamp",
"description": "Timestamp when the device status actually changed. This is the time the device went offline, came back online, or experienced the status change.",
"constraints": {
"required": true
}
},
{
"name": "device_id",
"type": "string",
"title": "ID referencing devices.device_id",
"description": "Identifies the device. References the devices table.",
"constraints": {
"required": true
}
},
{
"name": "status_type",
"type": "string",
"title": "Status type",
"description": "Type of device status. Examples: online, offline, maintenance, error, degraded. Agencies may define additional status types as needed.",
"constraints": {
"required": true
}
},
{
"name": "status_reason",
"type": "string",
"title": "Status reason",
"description": "Optional reason or description for the status change. Examples: scheduled maintenance, power failure, communication error, sensor malfunction."
}
],
"foreignReferences": [
{
"fields": "device_id",
"reference": {
"resource": "devices",
"fields": "device_id"
}
}
],
"name": "device_status.schema.json",
"description": "Records device operational status changes over time. This table tracks when devices (APCs, fare gates, AVL units, etc.) go offline, return to service, or experience errors. Enables data quality analysis by distinguishing between missing data due to device outages versus actual service patterns.",
"_table_type": "Event"
}
1 change: 1 addition & 0 deletions spec/tides-datapackage-profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@
},
"tides-table": {
"enum": [
"device_status",
"devices",
"fare_transactions",
"operators",
Expand Down