🌍 Public
Viewing a saved revision (read-only)
3f879fd97454482fa641c9985223c615
Activity_6 Task 1
This example shows a horizontal bar chart of the top 30 countries by 2020 population, with the y-axis listing country names and the x-axis displaying population values in billions. Built with React and D3 v5, it uses `scaleBand` for the categorical y-axis and `scaleLinear` for the quantitative x-axis, rendering SVG rectangles via the `Marks` component. The data is loaded asynchronously from a CSV file using `d3.csv`, and axis ticks are generated with `xScale.ticks()`, formatted with the `d3.format` SI prefix to abbreviate large numbers.
AI-generated description