Three interactive buttons reorder a bar chart of 2023 data by alphabetical country name, numeric value of CO₂ per capita, or a derived ratio of CO₂ per capita to GDP. The reusable bar chart function, implemented with D3 v7, uses `d3.scaleBand` and `d3.scaleLinear` for positioning, while SVG renders rotated axis labels and bars. Data loads from a GitHub CSV containing country-level energy, economic, and emissions metrics, and the buttons trigger redraws through chainable getter/setter methods.
AI-generated descriptionMIT Licensed
Comments
Sign in to join the discussion.