Skip to main content
100%

Fork of Activity 7

✓ Published0🌍 Public
Ppavanbellam@my.unt.edu
Last edited Apr 5, 2025
Created on Apr 5, 2025
Forked from Activity 7

This example visualizes the 2020 population of 30 countries using a horizontal bar chart. The SVG renders through React components, with d3.scaleBand positioning countries on the y-axis and d3.scaleLinear mapping population values to bar lengths on the x-axis. Axis tick labels use d3.format with the '.2s' specifier to abbreviate values, replacing 'G' with 'B' for billions. The data is loaded asynchronously via d3.csv from a GitHub-hosted CSV file, with each bar including a native SVG tooltip showing the formatted population value.

AI-generated description
MIT Licensed

Similar vizzes