Line Chart in D3
✓ Published0🌍 Public
This line chart displays the number of police shootings in the United States per year from 2015 to mid-2020. The x-axis shows years as discrete values using `d3.scaleBand`, while the y-axis uses `d3.scaleLinear` with a range of 400 to 1200 incidents. The data is loaded from a remote CSV file via `d3.csv`, parsed with `d3.timeParse`, and aggregated by year using `d3.rollups`. The line is drawn with `d3.line`, and axes are rendered using `d3.axisBottom` and `d3.axisLeft`, with SVG output.
AI-generated descriptionA line chart displaying the number of police shootings from 2015 to mid-2020.
The x axis represents the years, and the y axis represents the number of incidents (shootings) that occurred.
MIT Licensed