🌍 Public
Viewing a saved revision (read-only)
5392d601dcdb49afac3ffc465db7b022
Activity6_Task1Question2
This visualization displays the top 20 most populous countries in 2010 as a horizontal bar chart, with population values encoded by bar width and country names listed on the y-axis. The chart uses React with D3 v5 APIs, including `scaleBand` for the categorical y-axis, `scaleLinear` for the quantitative x-axis, and SVG `<rect>` elements rendered through a custom `Marks` component. Population data is loaded from a CSV file using `d3.csv`, sorted descending, and formatted with D3's `format('.2s')` to convert numbers into billions. Axis ticks are styled with CSS classes.
AI-generated descriptionA demonstration of how to start using D3 version 6.