Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

UN population 2019

Public visualization

UN population 2019

0 stars1🌍 Public
Jjbruzzo
Last edited Jun 30, 2022
Created on Jun 30, 2022

A horizontal bar chart shows the ten most populous countries in 2020 based on UN population estimates. Each bar length encodes the population value, with country names on the y-axis and population scale on the x-axis, rendered as SVG rectangles. The code loads CSV data via `d3.csv`, transforms the 2020 column into numbers, and stores the first ten rows in React state with `useState` and `useEffect`. Scales are built using `d3.scaleBand` and `d3.scaleLinear` to map data to pixel positions and widths.

AI-generated description

A program that loads in some data using D3 utilities, and uses React state to keep track of the data.

Comments

Sign in to join the discussion.

MIT Licensed