Skip to main content
100%

Climate Change and Energy Consumption Change in U.S.

✓ Published0🌍 Public
Xxiaojingwu138
Last edited Jul 31, 2023
Created on Jul 30, 2023
Forked from barGraph

A stacked bar chart shows the annual change in U.S. primary energy source growth rates (Solar, Coal, Gas, Nuclear) from 2012 to 2021, with tooltips revealing exact values on hover. Built with D3 v5, it uses `d3.layout.stack()` and `d3.scale.ordinal()` to render SVG rectangles, with axes and a legend. The visualization highlights how energy consumption patterns shift over the decade, reflecting climate-related trends. Data is embedded directly in the code as arrays, and interactivity is implemented via mouseover and mousemove events.

AI-generated description
MIT Licensed

Similar vizzes