Reproducing the Bar Chart
✓ Published2🌍 Public
This example reproduces a bar chart ranking the ten most populous countries in 2020, sourced from the United Nations World Population Prospects 2019. It shows horizontal bars of varying lengths with a zero line, axis ticks, and a population title, using React components for rendering to SVG. The code employs D3 v6 scales (`scaleBand`, `scaleLinear`) for positioning, D3’s `format` for tick labels, and `csv` for data loading. Custom React components (`AxisBottom`, `AxisLeft`, `Marks`, `ZeroLine`) manage the visualization layout and styling.
AI-generated descriptionReplicating from scratch the bar chart created in Datavis 2020 (episodes 21-24).
- Original visualization: https://vizhub.com/curran/32dfc8d2393844c6a5b9d199d9a35946
- Data source: United Nations World Population Prospects 2019
MIT Licensed