Fatal Police Shootings Grouped Bar Chart
This grouped bar chart visualizes fatal police shootings from the Washington Post database, counting victims by age range along the x-axis and race as color-coded grouped bars. The visualization reveals that Black non-Hispanic and Hispanic individuals account for disproportionately more shooting victims under age 40 compared to U.S. Census demographics. Built with d3.v5 and Vega-Lite, the code loads CSV data via `d3.csv` and renders the chart using `vl.markBar()` with column and x field encodings for binning, y-axis count aggregation, and tooltip interactions. The interface uses Vega-Lite API methods like `vl.column().fieldN()` and `vl.color().fieldN()` to construct the visual encoding programmatically.
AI-generated descriptionA fork of the same data visualized as a stacked bar chart.
A program that loads and parses some CSV data from the Fatal Police Shootings Database compiled by the Washington Post
The visualization shows the count of fatal police shootings represented in a grouped bar chart, grouped by age range and then race along the X axis and color coded based on the race of the victim.
This graphic explores the second question in my previous assignment, "What is the demographic breakdown of fatal police shootings in the US, and how does it compare to the demographics of the entire US population?" In 2019, US Census data shows that the U.S. is 60% white alone (not Hispanic or Latinx). The U.S. is 13% Black or African American alone, and 19% Hispanic or Latinx. Just under 3% of the U.S. identifies with more than one race.
The visualization clearly shows that Black non-Hispanic and Hispanic individuals account for a much more significant percentage of shooting victims in the under 40 age ranges.
I'd like to spend more time working with this visualization to improve the legend and try completing the data binning within the embedded javascript. Normalizing the data and showing a faded chart in the background with the actual U.S. demographics would be a powerful way to visually compare the shooting data to the overall population.
I'd also like to work towards completing the first sketch I created which requires mapping data to a US map.
Key:
- W: White, non-Hispanic
- B: Black, non-Hispanic
- A: Asian
- N: Native American
- H: Hispanic
- O: Other
- None: unknown