Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Pathetic Population Bar Chart

Public visualization

Pathetic Population Bar Chart

0 stars1🌍 Public
Sshresthabhi
Last edited Oct 18, 2021
Created on Oct 16, 2021
Forked from React Starter

This visualization displays the populations of the top ten countries using a horizontal bar chart, with each bar’s length proportional to its 2020 population value. The chart renders as SVG via React, using `useState` and `useEffect` to fetch and parse a CSV from a GitHub gist. D3’s `scaleBand` positions the country categories along the y-axis, while `scaleLinear` maps population counts to bar widths on the x-axis. The data is loaded using `d3.csv` and truncated to the first ten rows.

AI-generated description

React Starter code.

Comments

Sign in to join the discussion.

MIT Licensed