Fork of Simple Bar Chart
This example visualizes the top 10 most populous countries as of January 1, 2024, using a horizontal bar chart. It highlights each country’s total population in thousands, sorted in descending order to emphasize the largest nations. The visualization is built with D3.js, employing `scaleBand` for categorical country labels and `scaleLinear` for population values, while custom axis-label components from `@curran/axis-labels` clarify the axes. Data comes from the `@curran/un-population-estimates-2024` dataset, filtered to include only country-level entries. The chart renders SVG rectangles for bars, with a gray inner background, and uses D3’s selection and join methods to bind data efficiently.
AI-generated descriptionA bar chart showing the top 10 most populous countries on Earth as of January 1st 2024.
Challenge
- Fork this viz and modify it to show your own data