Skip to main content
100%

Population Line Chart

✓ Published1🌍 Public
Kkbrookshire420
Last edited May 8, 2022
Created on May 8, 2022

This visualization displays population figures for the top 10 countries in 2020 using a horizontal bar chart. The chart maps country names to a `d3.scaleBand` y-axis and population values to a `d3.scaleLinear` x-axis, rendering each bar as an SVG `rect` element. Data is loaded asynchronously via `d3.csv` from a UN Population dataset, with React state managing the loaded data through `useState` and `useEffect`. The visualization is built using React 18 and D3 v7, rendered entirely as SVG within a fixed 960×500 viewport.

AI-generated description

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

MIT Licensed

Similar vizzes