Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

dv2020-ep21-viz20 - bar chart

Public visualization

dv2020-ep21-viz20 - bar chart

0 stars1🌍 Public
Zzach b.
Last edited Mar 15, 2023
Created on Mar 15, 2023

A horizontal bar chart displays the 20 most populous countries in 2020, ranked in descending order by population. The visualization uses React to render SVG rectangles, with D3's `scaleBand` and `scaleLinear` mapping country names to y-coordinates and population values to bar widths. Data comes from the UN World Population Prospects 2019, loaded via D3's `csv` parser and sorted with `d3.descending`. The chart updates dynamically as React re-renders when the asynchronous data fetch completes.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed