Skip to main content
100%

("Pathetic bar chart) Countries by population (top 10)

✓ Published1🌍 Public
AAlexander Dorling
Last edited May 14, 2021
Created on May 13, 2021

This example displays the top 10 most populous countries as horizontal bars, with bar length proportional to each country’s 2020 population estimate. The data comes from a CSV file of UN population figures, loaded via `d3.csv` and processed with a custom row function. The visualization uses React state to manage the data, and D3’s `scaleBand` and `scaleLinear` to compute bar positions and widths. Each bar is rendered as an SVG `<rect>` element, with the chart updating once the data loads. The page shows a loading message until the dataset is ready.

AI-generated description

A program that creates a bar chart of the top 10 most populous countries. Using gist from Curran (datavis 2020).

MIT Licensed

Similar vizzes