In this project, we analyze motor vehicle collisions in New York City (NYC) to:
- Understand the magnitude of the problem they represent
- Determine when and where collisions occur
- Make it easier to see where serious collisions (collisions with deaths and injuries) are occurring
- Suggest causes and interventions to investigate
- Highlight problematic locations and areas that may not be obvious
https://ray310.github.io/NYC-Vehicle-Collisions/
Project notebooks with maps can best be viewed using Jupyter's nbviewer.
View project notebooks with nbviewer
Note that some notebooks may be slow to display or may not display well on mobile devices
Collision data and NYPD precinct shapefiles were obtained from NYC OpenData
NYC Collisions
https://data.cityofnewyork.us/Public-Safety/Motor-Vehicle-Collisions-Crashes/h9gi-nx95
NYPD Precinct Shapefiles
https://data.cityofnewyork.us/Public-Safety/Police-Precincts/78dh-3ptz
MTA Bridge and Tunnel Toll Data
https://data.ny.gov/Transportation/Hourly-Traffic-on-Metropolitan-Transportation-Auth/qzve-kjga/about_data
- Download and save data to local directory, e.g.
/data/raw
- Create and activate project virtual environment
- Python 3.12.3 is used
- Virtual environment can be created from either
conda_environment.yaml
orrequirements.txt
- Update data input and output parameters in
process_raw_data.py
as appropriate - Run
process_raw_data.py
(this script may take a while) - Run notebooks