Add device_status table for tracking device availability#253
Open
chrisyamas wants to merge 5 commits intodevelopfrom
Open
Add device_status table for tracking device availability#253chrisyamas wants to merge 5 commits intodevelopfrom
chrisyamas wants to merge 5 commits intodevelopfrom
Conversation
Contributor
|
Documentation available at: |
Contributor
|
Data Validation Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new
device_statustable for tracking device operational status changes over time. The reason for this change is to enable agencies to understand data gaps due to device outages versus actual service patterns.This is a non-breaking change (new optional table).
Resolves #242
Schema Design
Fields:
device_status_id(required, unique) - primary keyservice_date(optional) - service date for the status recordrecord_timestamp(required) - when the status record was created in the systemstatus_change_timestamp(required) - when the device status actually changeddevice_id(required) - foreign key to devices tablestatus_type(required) - type of status (online, offline, maintenance, error, degraded, etc.)status_reason(optional) - reason for the status changeDesign Decisions (per Dec 2025 working group):
record_timestampvsstatus_change_timestamp- this allows for retroactive recordingservice_dateis optional, as device status may not align with transit service datesFiles Changed
New:
spec/device_status.schema.json- new table schemasamples/template/TIDES/device_status.csv- template csv fileModified:
spec/tides-datapackage-profile.json- added to tides-table enumsamples/template/TIDES/datapackage.json- added resource entryCHANGELOG.md- documented new table- See related discussion in #242 and Fall 2025 TIDES Issues Working Group follow-up meeting notes from December 10.
Usage Notes
Each record represents a single status change event. To determine device availability over a time period, consumers query status changes and apply logic based on the most recent
status_change_timestamp.Review checklist
Per change management policy, the following must be met before feature branch changes can merge to
developbranch: