🌍 Public
Viewing a saved revision (read-only)
b0e269d34a3e48949907f912731537c9
ACTIVITY8
This interactive scatter plot ranks the top 30 countries by population in 2020, rendered as horizontal bars using SVG. The visualization uses React with D3 v5’s `scaleBand` and `scaleLinear` to map country names and population values to screen positions, while custom `AxisBottom` and `AxisLeft` components generate tick marks. Data is loaded asynchronously from a CSV file via `d3.csv`, with population values formatted in billions using `d3.format`. A tooltip appears on hover, displaying each bar’s population in abbreviated form.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.