-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Analyzing the latency in Vehicle Position Messages #1157
Open
fsalemi
wants to merge
5
commits into
main
Choose a base branch
from
latency
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
nbviewer URLs for impacted notebooks: |
…y per every 20 sec per day for one week.
nbviewer URLs for impacted notebooks: |
nbviewer URLs for impacted notebooks: |
1 similar comment
nbviewer URLs for impacted notebooks: |
nbviewer URLs for impacted notebooks: |
evansiroky
approved these changes
Sep 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fsalemi feel free to merge this whenever you're ready!
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.
GTFS-RT Vehicle Position Latency Research Project
The objective of this research project is to examine the current latency of vehicle position data. Latency is defined as the time between a transit vehicle obtaining a GPS reading request and the Cal-ITP data pipeline receiving the response.
As per the California Transit Data Guidelines, the recommended latency is as follows:
“Updates should be published to the Trip Updates and Vehicle Positions feeds at least once every 20 seconds, including updated timestamps and data for each trip and vehicle in service.”
Preliminary analysis of the entire feeds indicates that most fall significantly short of this expectation. This research project aims to quantify the extent of the latency issues, identify any patterns, and evaluate the current industry's capacity to improve latency.
Implementation
Several tables form cal-itp-data-infra has been utilized in preparation for this project. However the main table which majority of the analysis is based on is: fct_vehicle_positions_messages .
Due to the magnitude of this dataset, the Metabase app could not be used with this table, necessitating the execution of complex queries in BigQuery to extract the required data. We are collaborating with the Data Engineering team to develop new models and tables for the data warehouse. This will support vehicle position analysis and any future reporting needs for ongoing monitoring of vehicle position data, eliminating the need for complex queries each time. A ticket has been opened for this issue: see Vehicle Position Data Modelling #3408.
The project was coded primarily in two data languages: R and Python. Most of the plots were created using the R language and the Tidyverse package. However, the lack of RStudio IDE in the CalITP cloud and limitations in R coding within the Jupyter environment required us to install additional packages, which delayed the project's completion. We are currently working on installing RStudio on the CalITP cloud to rectify this issue.
The second part of the project, which involved creating a geographical map of vehicle position latencies, was written in Python. This decision was made due to issues we encountered with installing the Leaflet R package in Jupyter.
The plots from this project was used in preparation of a Power Point Presentation which can be found here.
Next step
Efforts to reduce latency are ongoing. In the second phase of this project, we are reaching out to transit RT vendors for further remediation as this report is being published.