Open INSTRUCTIONS.pdf for more details about the project.
The link to the dataset is https://www.kaggle.com/cityofLA/los-angeles-traffic-collision-data. We added this dataset in the repo as a compressed zip file since the dataset exceeds the max size in GitHub. To use the dataset, extract the dataset from the zip folder and then run the python script in database.py. Then, use excel to delete the 1st column and the location column and then run the python script in quadrantCalculator.py to get all the data we use for this project.
Instructions to run the application.
- To run, make sure all dependencies are installed (npm installs and pips).
- Then run npm start in the src folder in frontend and make sure it runs on localhost 3000.
- Make sure MongoDB Compass is connected to the localhost:27017 server.
- Create a Database and name it LATrafficCollisions and go inside it and create a collection named collisions.
- Import data.csv into the collisions collection and make sure all the fields are the same type and name as the fields in Schema.js.
- If using Mac, run brew services start mongodb-community. If this doesn't work, then run brew services restart mongodb-community.
- Then run node server.js in the src folder in frontend and make sure it runs on localhost 5000.
- If you do not see the collections, then refresh MongoDB Compass.
- Then, go to localhost 3000 and the website should be running and working.
The images below show an example of the website working and with a dataset running correctly.









