Viewing a saved revision (read-only)
1736f70a37464d378f420ffc45780bb8
Activity 6 Question 1.2
This example visualizes the 2010 population estimates for the top 20 countries as a horizontal bar chart, with each bar’s length proportional to population and tooltips showing the formatted value on hover. The visualization encodes country names along the y-axis and population along the x-axis, using green SVG rectangles rendered via React components. The implementation leverages d3’s `scaleBand` and `scaleLinear` for coordinate mapping, d3’s `csv` parser for data loading, and d3’s `format` for tick labeling (converting values to billions). The chart’s axes are custom-built with SVG, and the data is fetched from a CSV hosted on GitHub.
AI-generated descriptionA demonstration of how to start using D3 version 6.