UN World Population 2020
✓ Published1🌍 Public
This example shows the top 10 most populous countries in 2020 using a horizontal bar chart, with each bar’s length proportional to the population from the UN World Population Prospects 2019 dataset. It loads the CSV data with d3.csv, transforms the 2020 column into numbers, and renders the bars as SVG rectangles using React’s useState and useEffect hooks. The chart uses d3.scaleBand for the categorical y-axis and d3.scaleLinear for the population scale, with the bars positioned and sized via the React map function.
AI-generated descriptionA program that loads in some UN World Population Prospect 2019 using D3 utilities, and uses React to render the data as a pathetic Bar Chart
MIT Licensed