OTP Long Island Rail Road On-Time Performance Shiny
Project GitHub | LinkedIn: Niki Moritz Hao-Wei Matthew Oren
The skills we demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
Motivation
As a Long Island Rail Road (LIRR) commuter for many years, I've experienced frustrating delays, cancellations and terminations. I wanted to investigate if my branch, Port Jefferson, was more prone to performance issues than other branches. I further set out to discover if On-Time Performance (OTP) is associated with time of year and how OTP has developed over the past decade. Since other commuters may have similar interests, I've created an interactive web application to visualize performance data.
Data
The dataset was gathered from data.ny.gov and comes from the MTA’s Performance Dashboard. The data is used to increase transparency at the MTA. Key Performance Indicators (KPI) are used to track performance in areas such as OTP. OTP is defined as the percent of commuter trains that arrive at their destinations within 5 minutes and 59 seconds of their scheduled arrival time.
Application Features & Results
In the Yearly OTP By Branch tab, a user can select any year over the past decade to visualize how a branch performed in a given year and compare to other branches. Alternatively, a user can select the Overall OTP By Branch tab to visualize the average performance of all branches over the past decade.
-
Yearly OTP By Branch
From the Overall OTP By Branch comparison chart, the Port Jefferson branch is the lowest performer of the past decade with a 89.97% OTP. This means that more than one in ten trains are either delayed, cancelled or terminated on average during the given time period.
-
Overall OTP By Branch
To investigate if OTP is associated with time of year or to visualize how OTP has developed over the past ten years, a user can select a branch from a drop down menu and the corresponding plots will update accordingly giving a trend-line.
According to the data, the Port Jefferson branch represented by the blue trend-line on average performs best during April and worst during November. The best performing year of the past decade was 2009 and the worst was 2015. Looking at the overall performance of the LIRR over the past decade represented by the red trend-line, a distinct downward trend is observed indicating that performance is decreasing over time. Since 2009, the average overall OTP has decreased by nearly five percent. With nearly 250,000 scheduled trains per year, that is an annual increase of nearly 12,500 trains delayed, cancelled or terminated.
Additional Insights
After visualizing branch OTP over the past decade, the worst performing branches appeared to have the longest track distances and largest number of stations. Conversely, the best performing branches appeared to be have the shortest track distances and least number of stations. It seemed reasonable to hypothesize that as track distance increases and/or number of stations increase, that the opportunity to accumulate delays would also be greater. To visualize this relationship, I plotted OTP as a function of track distance and number of stations under the Performance Association tab. According to the data, it appears branches with less track distance typically perform better than those with more track distance. Similarly, branches with fewer stations typically perform better than those with a greater number of stations.
Future Work
As a commuter who typically takes the same trains each day, I am more interested to know how my particular train performs in comparison to the rest of the branch and LIRR. The dataset available from nyc.gov did not provide enough information to illustrate such granularity. However, MTA releases information each month on their website illustrating all delayed and cancelled trains with individual train tags. I intend to web-scrape this data and add a tab where a user can select their particular train to obtain OTP statistics.
The LIRR OTP application can be accessed here: https://joseph-c-fritch.shinyapps.io/Shiny_Project/