🌍 Public
Viewing a saved revision (read-only)
cacb1a2fb0d04499a8c16b22fd2c8c9f
Activity 6_Task 1
This visualization displays the populations of 30 countries for the year 2020 as a horizontal bar chart, with each bar’s length proportional to its population value. The chart is rendered as an SVG using React components, with D3 v5’s `scaleBand` and `scaleLinear` handling the y-axis categories and x-axis scaling respectively. Population values are formatted with D3’s `format('.2s')` to abbreviate large numbers, converting gigabytes to billions for tick labels. The data is loaded via `d3.csv` from a GitHub-hosted CSV file, and axis ticks and bars are styled with custom CSS classes.
AI-generated descriptionA demonstration of how to start using D3 version 6.