Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

UN Population

Public visualization

UN Population

0 stars1🌍 Public
TTaweewat Somboonpanyakul
Last edited May 25, 2021
Created on May 24, 2021

This example visualizes the top 10 countries by population in 2020 using a horizontal bar chart rendered with SVG. It loads UN population data from a CSV file via `d3.csv` and uses React hooks (`useState`, `useEffect`) to manage the asynchronous data loading. The chart employs `d3.scaleBand` for the y-axis country labels and `d3.scaleLinear` for the x-axis population values, with gridlines generated from `xScale.ticks()`.

AI-generated description

Load data about named colors with React and D3

Comments

Sign in to join the discussion.

MIT Licensed