Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Ep. 21-22 | Pathetic Bar Chart

Public visualization

Viewing a saved revision (read-only)

af935872b5994779b69e33f7e4e1635a

Ep. 21-22 | Pathetic Bar Chart

0 stars1🌍 Public
YYee Han
Last edited Dec 24, 2020
Created on Dec 23, 2020

The example displays a horizontal bar chart of the top 10 countries by 2020 population, rendered as SVG rectangles. It uses React with hooks to fetch and store the data, while D3’s `scaleBand` and `scaleLinear` map country names to y-positions and population values to bar widths. The data comes from the United Nations World Population Prospects 2019 CSV, loaded via D3’s `csv` method. A loading state is shown until the asynchronous fetch completes.

AI-generated description

A program that loads in some United Nations World Population Prospects 2019.