UN Population Bar Chart
✓ Published1🌍 Public
This example shows a horizontal bar chart of the top 10 countries by population from the UN’s 2019 dataset. It uses React state to load and store the CSV data, while D3’s `scaleBand`, `scaleLinear`, and `max` utilities compute the bar positions and widths. The SVG bars render across the full window height, sized proportionally to each country’s 2020 population. The code loads the data asynchronously with `d3.csv` and displays a loading message before the chart appears.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React state to keep track of the data.
MIT Licensed