Home » Projects » Somerville Schools Traffic Safety
Somerville Schools Traffic Analysis

Goal: To identify and prioritize Somerville public schools for safety interventions by analyzing crash data and traffic volumes.
Introduction
This project combines spatial analysis and data visualization to assess school zone safety. By integrating three years of crash records with traffic volume data, we developed a data-driven priority ranking for eight Somerville schools.
Data Sources
- Crash Data (2023-2025) : Obtained from the MassDOT IMPACT portal, filtered to Somerville.
- Traffic Volume Data (2024) : Accessed via the MassDOT Road Inventory API (line segments with AADT).
- School Locations: Geocoded addresses for eight selected Somerville public schools.
Methodology
- Data Collection: Downloaded crash data, pulled traffic data via API, and geocoded school addresses.
- Spatial Analysis: Created 0.25-mile school buffers and performed spatial joins to count crashes and sum traffic exposure per school.
- Priority Ranking: Developed a composite priority score weighting crash counts and total traffic volume (AADT) to rank schools.
- Visualization: Created static maps with Matplotlib and an interactive map with Leafmap.
Outputs
Technologies Used
Python, GeoPandas, Matplotlib, Leafmap, REST APIs
License
MIT License