Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pathetic Bar Chart

Public visualization

Viewing a saved revision (read-only)

3838c88f7b2c48b3a0589b3fc850852a

Pathetic Bar Chart

3 stars238🌍 Public
CCurran Kelleher
Last edited Dec 21, 2020
Created on Sep 12, 2019
Forked from Untitled

This example displays the ten most populous countries as a set of horizontal bars, with no axes or labels, hence the “pathetic” title. The bars are drawn as SVG rectangles, with their width proportional to each country’s 2020 population from the UN World Population Prospects 2019 dataset. The React app loads CSV data via `d3.csv`, then uses `d3.scaleBand` for the y-axis country categories and `d3.scaleLinear` with `d3.max` to map population values to pixel widths. The chart renders purely as positioned `rect` elements within a fixed 960×500 viewBox.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.