🌍 Public
Viewing a saved revision (read-only)
5aa3074b11b44c3ab44fd7492afec8b6
Activity 6_Task 1
This visualization displays a horizontal bar chart comparing the populations of 30 countries for the year 2020, sourced from a GitHub-hosted CSV file. The bars are rendered as SVG rectangles using React, with D3 v5's `scaleBand` and `scaleLinear` for positioning along the categorical and linear axes. The chart’s axes are generated with the `AxisBottom` and `AxisLeft` components, which use D3’s scale ticks, and each bar includes a tooltip showing the population value formatted with `d3.format`. The data is loaded asynchronously via `d3.csv` and processed to multiply the 2020 values by 1000.
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.