Fork of Activity_6_question-1.2
✓ Published0🌍 Public
This example visualizes the 2020 populations of 20 countries as a horizontal bar chart, using SVG rectangles rendered through React components. It loads data from a GitHub-hosted CSV file via d3.csv, then maps each country’s population (converted from thousands) to bar widths using d3.scaleLinear, while d3.scaleBand positions the categorical y-axis labels. D3’s format method abbreviates large numbers, and custom AxisBottom and AxisLeft components generate styled ticks. The chart is built with React functional components and d3 v5, featuring green bars and blue tick lines.
AI-generated descriptionA demonstration of how to start using D3 version 6.
MIT Licensed