🌍 Public
Viewing a saved revision (read-only)
c9d47cde7f1643b89bb301547b9a76de
dv2020-ep21-viz20 - bar chart
Zzach b.
Last edited Mar 15, 2023
Created on Mar 15, 2023
Forked from dv2020-ep20-viz19 - Rendering Data w/ React
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