1
1
# Analyzing New York City Motor Vehicle Collisions
2
-
2
+ #### [ https://ray310.github.io/NYC-Vehicle-Collisions/ ] ( https://ray310.github.io/NYC-Vehicle-Collisions/ )
3
+
3
4
In this project, we analyze motor vehicle collisions in New York City (NYC) to:
4
5
- Understand the magnitude of the problem they represent
5
6
- Determine when and where collisions occur
7
+ - Evaluate when collisions are elevated relative to traffic levels
6
8
- Make it easier to see where serious collisions (collisions with deaths and injuries) are occurring
7
9
- Suggest causes and interventions to investigate
8
10
- Highlight problematic locations and areas that may not be obvious
@@ -12,16 +14,43 @@ In this project, we analyze motor vehicle collisions in New York City (NYC) to:
12
14
[ https://ray310.github.io/NYC-Vehicle-Collisions/ ] ( https://ray310.github.io/NYC-Vehicle-Collisions/ )
13
15
<br ><br >
14
16
17
+ ### Supplemental Analysis
18
+ __ Vehicle Activity Index__
19
+
20
+ - The vehicle activity index is constructed to identify when collisions are
21
+ elevated relative to the level of driving.
22
+ - The index is based on traffic volumes in the Metropolitan
23
+ Transit Authority (MTA) Bridge and Tunnel dataset.
24
+ - Yearly, monthly, weekly, and daily traffic patterns in the MTA dataset were profiled
25
+ - Relationships between toll crossings was evaluated using cross-correlation and
26
+ by examining the weekly traffic pattern of select crossings.
27
+ patterns was performed
28
+ - Gaps were identified in the MTA dataset and imputed using XGBoost regression.
29
+ - Please see the following notebooks:
30
+ - [ 1b-profiling-mta-traffic-index.ipynb] ( https://nbviewer.org/github/ray310/NYC-Vehicle-Collisions/blob/main/1b-profiling-mta-traffic-index.ipynb )
31
+ - [ 2a-preparing-mta-data-xgboost.ipynb] ( https://nbviewer.org/github/ray310/NYC-Vehicle-Collisions/blob/main/2a-preparing-mta-data-xgboost.ipynb )
32
+
33
+ __ Cycling Activity Index__
34
+
35
+ - The cycling activity index is constructed to identify when collisions with cyclists
36
+ are elevated relative to the level of cycling.
37
+ - The index is based on cycling volumes at several bicycle counters throughout NYC in
38
+ the NYC Bicycle Counts dataset
39
+ - The 30+ bicycle counters were reviewed for completeness of data
40
+ - The index was constructed using a composite of counters to provide a consistent index
41
+ going back to 2015
42
+ - Yearly, monthly, weekly, and daily traffic patterns in the cycling index were profiled
43
+ - Please see the following notebooks:
44
+ - [ 1c-profiling-nyc-bike-counter-data.ipynb] ( https://nbviewer.org/github/ray310/NYC-Vehicle-Collisions/blob/main/1c-profiling-nyc-bike-counter-data.ipynb )
45
+
15
46
### To Directly View Notebooks with Full Content
16
47
Project notebooks with maps can best be viewed using Jupyter's nbviewer.
17
- [ View project notebooks with nbviewer] ( https://nbviewer.org/github/ray310/NYC-Vehicle-Collisions/tree/main/ )
48
+ [ View project notebooks with nbviewer] ( https://nbviewer.org/github/ray310/NYC-Vehicle-Collisions/tree/main/ )
18
49
19
50
_ Note that some notebooks may be slow to display or may not display well on mobile devices_
20
51
<br ><br >
21
52
22
53
### Data Sources
23
- Collision data and NYPD precinct shapefiles were obtained from NYC OpenData
24
-
25
54
NYC Collisions <br >
26
55
https://data.cityofnewyork.us/Public-Safety/Motor-Vehicle-Collisions-Crashes/h9gi-nx95
27
56
@@ -31,18 +60,24 @@ https://data.cityofnewyork.us/Public-Safety/Police-Precincts/78dh-3ptz
31
60
MTA Bridge and Tunnel Toll Data <br >
32
61
https://data.ny.gov/Transportation/Hourly-Traffic-on-Metropolitan-Transportation-Auth/qzve-kjga/about_data
33
62
63
+ NYC Bicycle Counts <br >
64
+ https://data.cityofnewyork.us/Transportation/Bicycle-Counts/uczf-rk3c/about_data
65
+
66
+ NYC Bicycle Counters <br >
67
+ https://data.cityofnewyork.us/Transportation/Bicycle-Counters/smn3-rzf9/about_data
68
+
34
69
NYC City Council District Shapefiles <br >
35
70
https://data.cityofnewyork.us/City-Government/City-Council-Districts/yusd-j4xi
36
71
<br ><br >
37
72
38
73
### Reproducing Processed Data and Analysis
39
74
1 ) Clone repo
40
75
2 ) Download and save data to local directory, e.g. ` /data/raw `
41
- 3 ) Create and activate project virtual environment
76
+ 3 ) Create and activate project virtual environment
42
77
- Python 3.12.3 is used
43
78
- Virtual environment can be created from either
44
79
` conda_environment.yaml ` or ` requirements.txt `
45
80
4 ) Update data input and output parameters in ` process_raw_data.py ` as appropriate
46
81
5 ) Run ` process_raw_data.py ` (this script may take a while)
47
82
6 ) To obtain City Council point of contact information, run ` src/scrape_city_council.py ` with required command line arguments
48
- 7 ) Run notebooks
83
+ 7 ) Run notebooks
0 commit comments