Skip to main content
100%

Pathetic Bar Chart

✓ Published222🌍 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.

MIT Licensed

Similar vizzes