(margin convention) Countries by population (top 10)
✓ Published1🌍 Public
AAlexander Dorling
Last edited May 14, 2021
Created on May 14, 2021
A horizontal bar chart displays the top 10 most populous countries in 2020, with bar length encoding population size. The visualization uses React to manage state and render SVG elements, while d3-scale’s `scaleBand` and `scaleLinear` compute the y and x positions. Data is loaded asynchronously via d3.csv from a UN population dataset, then sorted and sliced to the first ten rows. The chart applies a margin convention, translating the inner group by `margin.left` and `margin.top` to position bars within the SVG canvas.
AI-generated descriptionA program that creates a bar chart of the top 10 most populous countries. Using gist from Curran (datavis 2020).
MIT Licensed