World Populations
✓ Published1🌍 Public
This example displays a horizontal bar chart of the world’s top 20 most populous countries, using population data from the UN’s 2019 estimates. React components render SVG bars, scales, and axes, with d3.scaleBand and d3.scaleLinear mapping country names and population values. The d3.csv utility loads the dataset, while d3.format converts numeric labels into abbreviated “B” for billions. The chart highlights each bar’s exact population on hover via a native SVG `<title>` tooltip, with axis ticks styled through CSS.
AI-generated descriptionA program that loads in some data about CSS named colors using D3 utilities, and uses React to render the data as a radial burst!
MIT Licensed