Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Activity6_Task1_Question2

Public visualization

Viewing a saved revision (read-only)

dcf8856c73584ad5b822a05f285088c6

Fork of Activity6_Task1_Question2

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

This bar chart displays the population of the top 20 countries in 2020, with countries listed on the vertical axis and population values on the horizontal axis. The visualization uses React components to render SVG elements, with D3’s `scaleBand` and `scaleLinear` mapping data to positions. Each bar’s width reflects the population value, and hovering reveals a tooltip via the SVG `<title>` element. Data is loaded asynchronously from a GitHub-hosted CSV using D3’s `csv` function, formatted with `format('.2s')` to abbreviate large numbers. The chart includes custom axis components for bottom and left ticks.

AI-generated description