Skip to content

s0nalagarwal/collision-risk-python-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

collision-risk-python-analysis

The goal is to create a function that takes an input of collision data points and street centerline data and will output a color-coded interactive map of roads with high risk of collision. This measure will be based on collisions per length in meters for each road.

Overall Project workflow:

  • Read in road and collision data
  • Set an extent in long/lat and then convert back into a regional CRS.
  • Crop all datasets to correct extent
  • Conduct a spatial join based on distance
  • Find outliers, make boxplots, and other descriptive stats
  • Merge spatial join dataset back to original roads dataset
  • Divide counts by length column
  • Plot based on quantiles, or any other specified break method
  • Plot on interactive map using leafmap
  • Make a function that does all of these steps automatically so that this workflow can work for other parts of San Francisco, and other datasets too, if possible.

Example Output:

San Francisco Downtown: Screenshot 2026-03-09 at 12 40 08 AM

Close Up: Screenshot 2026-03-09 at 12 40 19 AM

Residential Area in SF:

Screenshot 2026-03-09 at 12 41 11 AM

About

The goal is to create a function that takes an input of collision data points and street centerline data and will output a color-coded interactive map of roads with high risk of collision. This measure will be based on collisions per length in meters for each road.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors