🌍 Public
Viewing a saved revision (read-only)
925bc1d9a66e497a8488c9bba5909a0c
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 descriptionA demonstration of how to start using D3 version 6.