NYPD Complaints - Age of Officer and Ethnicity of Complainant
This bar chart shows the distribution of officer ages at the time of civilian complaints, with bars segmented by officer ethnicity. The visualization uses a stacked bar chart where each complaint is counted, and the color encoding maps the officer’s ethnicity. Built with d3.v5 and the vega-lite-api library, the code loads the NYPD Complaints CSV from a GitHub gist, then renders the chart with Vega-Lite’s markBar and count aggregation, styled with a custom dark theme.
AI-generated descriptionA visualization constructed using the vega-lite-api.
The stacked bar chart above depicts the age of the officer named in the complaint. The different colors indicate the ethnicity of the officer (refer to legend on right of chart).
This is based on a database of more than 12,000 complaints filed by civilians against NYC police officers. The data is available on ProPublica. The original data source is the New York City's Civilian Complaint Review Board. Each row of the data contains one complaint filed. Each complaint includes (but is not limited to) the following: officer first and last name, officer age, officer rank at time of incident, officer current rank, date of incident, and ethnicity of officer. The data contains similar information for each complainant, as well as a description of the offense and whether the complaint was substantiated.
Data is ported from NYPD Complaints dataset.