Skip to main content
100%

Fatal Police Shootings Working Copy

✓ Published0🌍 Public
MMartin Blatz
Last edited Nov 3, 2020
Created on Nov 3, 2020

This interactive map visualizes fatal police shootings across the United States, using a geoAlbersUsa projection and d3.geoPath to render state boundaries. Users can select an attribute from a dropdown menu—such as race, gender, or threat level—to color-code incident locations, with a color legend that supports hover highlighting to isolate specific categories. A bar chart shows the count of events per selected category. Data comes from the Washington Post's CSV dataset, rendered as SVG circles, with d3.nest and scaleBand/scaleLinear for aggregation and the chart layout.

AI-generated description

A program that loads and parses some CSV data from the Fatal Police Shootings Database compiled by the Washington Post

I used the U.S. Geo Map of State Boundaries for the underlying map. In this iteration, I used the geoAlbersUsa projection to clean up and zoom in on the map. While other projection types appear to gracefully handle a lat/long input of 0, it returns null with this projection, which causes a fatal error when you reference the scaled pixel locations.

Adapted from Mass School District Boundaries from the DataVis class.

I've increased opacity compared to previous iterations of my work, and applied a color scale based on an attribute interactively selected by the user. This allows the user to explore any geographic trends in the data based on various attributes of each record. It is my intention to add a histogram to the bottom of the visualization to provide raw count data to provide additional insights.

What you can't see yet is that I've also improved the useData.js file to clean null data from fields I'll be using in future work. Blank data entries are now populated with "unknown" for the gender, race, flee, and armed fields. The age field is populated with a -1 for any blank entries. Finally, I switched the abbreviations for race with full words to be used in the legend.

MIT Licensed

Similar vizzes