Skip to main content
100%

Ep. 21-22 | Pathetic Bar Chart

✓ Published1🌍 Public
YYee Han
Last edited Dec 24, 2020
Created on Dec 23, 2020

The example displays a horizontal bar chart of the top 10 countries by 2020 population, rendered as SVG rectangles. It uses React with hooks to fetch and store the data, while D3’s `scaleBand` and `scaleLinear` map country names to y-positions and population values to bar widths. The data comes from the United Nations World Population Prospects 2019 CSV, loaded via D3’s `csv` method. A loading state is shown until the asynchronous fetch completes.

AI-generated description

A program that loads in some United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes