Inspiration
We were inspired by NJ Transit and the millions of people that it services. In order to help some of these people, we decided to make a web app that predicts delay times of NJ Transit trains.
What it does
This web application reads in a csv file provided by NJTransit. It uses this data to train a RandomForestRegression modeled. It then provides the data in a visually appealing manner through a react app and shows how many delayed trains there will be.
How we built it
We built this web app using Flask for our backend. It was easier to supply our backend API with values that way since we use python for easy scripting. We used react for a visually appealing frontend. We used scikit-learn to train our model.
Challenges we ran into
We ran into issues with the Flask backend interfacing with the react app. We fixed this by adding "proxy" to package.json
We had some difficulty with getting the model spun up and working; since this was the backend developer's second time working on it. We also had to clean the datasets and derive some data on our own to fit our purposes (specifically the cancellations data table, which is unused for now but can easily be added).
We ran into issues with the Flask backend interfacing with the react app. We fixed this by adding "proxy" to package.json.
Accomplishments that we're proud of
We are proud of making a functional web app, especially because this is the first hackathon that we've all participated in.
What we learned
We learned how to use Flask, React, joblib, and Scikit learn, as these heavily contribute to the core basis of our project, and we were unfamiliar with these before.
What's next for Delay Detective
In the future, we may add some more user-friendly features such as alerts to phones about possible delays for the day! We may also want to integrate the live data (GTFS data) to try and predict daily trends; we had trouble accessing the live API. Additionally, the data provided for the daily prediction is difficult to match up with the cancellation/delay data which is only tracked monthly. In addition, we also gained access to the API provided by the National Weather Service, and by linking this API to the Delay Detective's, we can utilize weather data for each day, generalize it for each month, and then factor the generalized data into our predictions for future delays. It could be possible to derive such a prediction from the monthly prediction if we had more time to analyze all the data. We also may want to update our frontend so that it looks nicer.
Log in or sign up for Devpost to join the conversation.