🌍 Public
Viewing a saved revision (read-only)
f29bcf1e4bca4bc0ba163cd9ef6c98c4
The Margin Convention
This visualization displays the top 10 most populous countries in 2020 as horizontal bars, with each bar’s length proportional to its population. The chart is rendered as an SVG using React components, with data loaded via D3’s `csv` utility. Margins are applied to position the inner group, while `scaleBand` and `scaleLinear` map country names and population values to pixel coordinates. The code also includes commented-out logic for generating pie arcs with `arc()` and `pie()`, though the active view uses simple rectangles.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!