Skip to main content
100%

A4 Barchart (D3)

✓ Published11🌍 Public
NNoah C.
Last edited Apr 9, 2024
Created on Feb 19, 2024

This bar chart visualizes total opioid deaths per year from 1999 to 2019, using data from the CORGIS dataset. The chart displays red bars for each year, with a hover tooltip (via SVG `title` elements) showing the exact death count. It uses D3 v7 with `d3.scaleBand` for the x-axis, `d3.scaleLinear` for the y-axis, and `d3.axisBottom` and `d3.axisLeft` for axes. The SVG rendering is responsive to the window size, and the data is loaded asynchronously via `d3.csv`.

AI-generated description

Visualization of total opioid deaths from the CORGIS dataset made with D3. Implementation learned from DataVizDad on Youtube

Hover over bars to see precise values.

MIT Licensed

Similar vizzes