Compiling and analyzing Toronto's cycling volumes and accidents to create an accessible measure of cyclist safety
Streamlit Web App: https://share.streamlit.io/andrewzl/opencommutev2/visualization.py
- Python
- Numpy
- Pandas
- sklearn
- Streamlit
- Pydeck
- Data for cyclist volumes was compiled from City of Toronto Transportation Services
- Raw Data is found in /Data/raw
- Data was manually compiled and geocoded
- Temperature and precipitation data were excluded
- In theory, the sampling should represent the average weather patterns in Toronto and thus the average volumes took into account cyclist counts on all days, including those with harsher weather
- The second CSV which excludes data from trails and parks is used, as this project is concerned with commuting accidents rather than recreational ones
- A third CSV which averages data into a general weekday and weekend volume is in progress
- Data for commuter accidents is from the Toronto Police Service Public Safety Data Portal
- Data includes: intersection name, longitude, latitude, average cyclist volume per hour for each day in a week
- Open Data License: Open Government License - Toronto
Since data for volume is sparse (only collected at certain intersections), hotspots were extrapolated using kernel density estimation from the sklearn library. Based on https://doi.org/10.1016/j.aap.2008.12.014.