Skip to content

Commit a093e33

Browse files
committed
Update readme and requirements.txt
1 parent b260456 commit a093e33

File tree

2 files changed

+42
-6
lines changed

2 files changed

+42
-6
lines changed

README.md

+41-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Analyzing New York City Motor Vehicle Collisions
2-
2+
#### [https://ray310.github.io/NYC-Vehicle-Collisions/](https://ray310.github.io/NYC-Vehicle-Collisions/)
3+
34
In this project, we analyze motor vehicle collisions in New York City (NYC) to:
45
- Understand the magnitude of the problem they represent
56
- Determine when and where collisions occur
7+
- Evaluate when collisions are elevated relative to traffic levels
68
- Make it easier to see where serious collisions (collisions with deaths and injuries) are occurring
79
- Suggest causes and interventions to investigate
810
- 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:
1214
[https://ray310.github.io/NYC-Vehicle-Collisions/](https://ray310.github.io/NYC-Vehicle-Collisions/)
1315
<br><br>
1416

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+
1546
### To Directly View Notebooks with Full Content
1647
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/)
1849

1950
_Note that some notebooks may be slow to display or may not display well on mobile devices_
2051
<br><br>
2152

2253
### Data Sources
23-
Collision data and NYPD precinct shapefiles were obtained from NYC OpenData
24-
2554
NYC Collisions <br>
2655
https://data.cityofnewyork.us/Public-Safety/Motor-Vehicle-Collisions-Crashes/h9gi-nx95
2756

@@ -31,18 +60,24 @@ https://data.cityofnewyork.us/Public-Safety/Police-Precincts/78dh-3ptz
3160
MTA Bridge and Tunnel Toll Data <br>
3261
https://data.ny.gov/Transportation/Hourly-Traffic-on-Metropolitan-Transportation-Auth/qzve-kjga/about_data
3362

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+
3469
NYC City Council District Shapefiles <br>
3570
https://data.cityofnewyork.us/City-Government/City-Council-Districts/yusd-j4xi
3671
<br><br>
3772

3873
### Reproducing Processed Data and Analysis
3974
1) Clone repo
4075
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
4277
- Python 3.12.3 is used
4378
- Virtual environment can be created from either
4479
`conda_environment.yaml` or `requirements.txt`
4580
4) Update data input and output parameters in `process_raw_data.py` as appropriate
4681
5) Run `process_raw_data.py` (this script may take a while)
4782
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

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ scipy==1.13.1
2323
seaborn==0.13.2
2424
shapely==2.0.1
2525
statsmodels==0.14.2
26+
xgboost==2.0.3

0 commit comments

Comments
 (0)