Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Activity6_Question2

Public visualization

Viewing a saved revision (read-only)

64a3f218dc2b4e728684a920bfaf85ea

Activity6_Question2

0 stars1🌍 Public
Kkartheekgrpt@gmail.com
Last edited Oct 22, 2024
Created on Oct 20, 2024

This bar chart displays the top 20 countries by population in 2010, using a horizontal layout with red bars scaled linearly from zero to the maximum value. The visualization is built with React and D3 v5, using `scaleBand` for the categorical y-axis, `scaleLinear` for the quantitative x-axis, and SVG rectangles for the marks. Data is loaded asynchronously from a CSV file via `d3.csv`, with population values converted from thousands. Axes are custom React components, and hover tooltips show the formatted population using D3’s `format` with SI prefixes.

AI-generated description

A demonstration of how to start using D3 version 6.