🌍 Public
Viewing a saved revision (read-only)
ce722d3e58384689a0ff7711fbf9a1a7
Tutorial 1 Question 1
This visualization presents a horizontal bar chart comparing the populations of ten countries in the year 2000. Built with React and D3 v5, it uses `d3.scaleBand` for the categorical y-axis and `d3.scaleLinear` for the numeric x-axis, rendering bars as SVG `rect` elements with tooltips. The code creates axes using custom components that call `d3.axisBottom` and `d3.axisLeft`, while data is loaded from a GitHub-hosted CSV file via `d3.csv`. Population values are formatted using D3's `format` function, transforming labels like "G" to "B" for billions.
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.