Export Image
Export Code

Fatal Police Shootings Pie Chart Working Copy

Martin Blatz

Last edited Oct 27, 2020
Created on Oct 27, 2020

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

The intent is to map each event to it's location within the U.S. with a semitransparent circle to show darker regions as the areas with higher event density. This helps to answer the question "are there more fatal police shootings in certain parts of the country?" There are clearly areas with more events, though at a glance they appear to be in population centers.

I realized that my project timeline for this week involves cleaning up the charts, but next week I have adding additional menu functionality to the charts. That seemed backwards, so I focused on building a menu to select a variable and the functionality to dynamically regroup and count the data based on the selected value. For now the data is in a bar chart, but I'd like to try to put it into a pie chart.

I borrowed heavily from the Polished Scatter Plot with Menus posted by the professor.

To do:

  • <input checked="" disabled="" type="checkbox"> Build a menu based on interesting data fields
  • <input checked="" disabled="" type="checkbox"> write the code to group and aggregate the data based on the dynamic selection
  • <input disabled="" type="checkbox"> reintroduce aggregation of data per state in addition to the new functionality
  • <input disabled="" type="checkbox"> adjust to build a pie chart with this data
  • <input disabled="" type="checkbox"> develop a module to plot pie charts in the center of each state
  • <input disabled="" type="checkbox"> use the path.centroid() function to plot aggregated data
MIT Licensed