Ep. 21-22 | Pathetic Bar Chart
✓ Published1🌍 Public
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 descriptionA program that loads in some United Nations World Population Prospects 2019.
MIT Licensed