Fork of Iterated Earthquake Bar Plot
This bar chart presents earthquake-related deaths by region, with data sourced from a CSV file. The visualization stacks rectangles representing multiple years on top of each other, though the current y-axis domain extends to 750,000 without summing the values across years. The chart uses d3.csv to load the data, d3.scaleBand for the x-axis regions, and d3.scaleLinear for the y-axis deaths, rendering as SVG via d3.select and rect elements. The code suggests refining the y-axis to show cumulative deaths using d3.group and d3.rollup.
AI-generated descriptionA shallow fork of the original viz, showing that multiple years are plotted on top of each other.
Suggested approach: figure out what you really want to show as the Y axis. Is it cumulative deaths across all years? In that case, you'll need to sum the data across the years for each country, and plot that (you can use d3.group and d3.rollup for that).