🌍 Public
Viewing a saved revision (read-only)
50e3e593501b4248854df7d46b2df79e
Assignment 7 Q1C
Two interactive bar charts explore the arrangement of tabular data. The first chart sorts a single categorical key by alphabetical order, value, or a derived attribute, using buttons to toggle the ordering. The second chart visualizes two keys—country and year—as either stacked or grouped bars, with buttons switching the alignment. Both charts load CSV data via `d3.csv` and render with SVG, using `d3.scaleBand`, `d3.scaleLinear`, and `d3.axisBottom`/`d3.axisLeft`. The code uses reusable closure patterns for the chart functions and D3 v7 for selections and joins.
AI-generated description