🌍 Public
Viewing a saved revision (read-only)
cc35327ec75f41d3bcc97c933dccb0f6
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