Activity 7_Part2
✓ Published0🌍 Public
This example shows a horizontal bar chart of population data for 20 countries in 2020, using purple bars to encode each country’s population value. The visualization loads population data from a GitHub-hosted CSV file via `d3.csv` and renders the chart as SVG elements using React components. It applies `d3.scaleBand` for the categorical country axis, `d3.scaleLinear` for the numeric population axis, and `d3.format` to abbreviate tick labels from billions to “B”. The code demonstrates local ES6 module imports and D3 integration within a React framework.
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.
MIT Licensed