Inspiration

We were inspired by our own experience riding with NJ Transit, using the rail system for daily or weekly commutes have led to some of our members having tens of thousands of points! However pretty often, we experience unexpected delays in arrival times, which have the potential to mess up a tight schedule. Upon learning about the NJ Transit track, we were determined to improve the NJ Transit experience for riders by creating a program that can predict the expected delay for a train at any given destination.

What it does

Our application prompts the user with their starting station and their destination station to figure out the route and line that the user wants to take. We determine how many extra minutes the user can expect to wait until they arrive at their destination using real-time weather data correlated to historical delays.

How we built it

Our application's frontend is built using React, chosen so that anyone with a browser can access it, regardless of their platform. We also use flask to create a simple backend server that we can request our data from when the user enters their information into the site. The server holds our machine learning model that we trained as well as the code to make a new prediction based on the data received from the website. We use various machine learning techniques to calculate our expected delay, and the information we used to train our model combines historical NJ Transit train delays and the historical weather corresponding with each delay.

Challenges we ran into

We ran into challenges with our UI and successfully connecting it with our backend server. More importantly, we realized that it would be too costly to train our model using all NJ Transit lines, so we made the tough decision to limit the user to choosing stations only along the Raritan Valley rail line. This ensures we can still demo our project but restricts the user for now.

Accomplishments that we're proud of

We are proud of our successful training of past data to accurately predict the expected delay for a given route. Our user interface and backend work seamlessly, and the program runs quickly and smoothly. We are proud of our use of relevant and real data, which can definitely accurately convey current delay information.

What we learned / What's next

We learned a lot about what actually causes delays in trains, and usually the weather conditions are not the only contributing factor. There are a lot of things at play to maintain a rail, and we hope to improve our project with more data and also predict failure chances of the tracks and trains. In the future, we want to improve our project with those features and have the chance to work with NJTransit to obtain the relevant information necessary.

Share this project:

Updates