San Francisco

This map visualizes the 307 bicycle crashes
in San Francisco, CA from 2012 and 2013 ... more

This map visualizes the 307 reported bicycle crashes in the city of San Francisco from 2012 and 2013.

This map helps to show where crashes tend to happen — like Market Street and Mission Street and Valencia Street — in the hope that those streets might be made safer for riders.

You can explore this map on three levels: city, street and location. City: Each reported bike crash is recorded as a dot on the map. Streets on which bike crashes are common are outlined in red. You may hover over an crash to see the street or intersection on which it occurred. Street: Pull out the infographic panel from the top right of the map to make street-wise comparison of crashes. You can click on each bar to visualize only the crashes on that particular street Location: Use the streetview tab and hover over an crash point to get a localized view of the crash site.

All crashes were placed on the map as a point at the place where they occurred. Not all bike crashes are reported to the police, and this map only shows those that are reported. In order to show those streets where crashes were common, we used an average-link agglomerative clustering algorithm to cluster the crashes. The large clusters, in which many crashes on a single street length, are shown by a red line. Green lines on the map indicate existing bike paths.

The data extraction and geolocation was written in Python, and the visualization was written in JavaScript and D3. We used the Google Maps API to geolocate every crash point, since the data was given to us as street addresses or intersections.

Data Sources

  1. San Francisco Police Department Bicycle Crash Reports (Raw Data)
  2. Google Maps Geolocation API
  3. Google Maps StreetView Image API

View map

Crashes by Street

Hover over a crash to view its location.