Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Population Bar Chart Basic

Public visualization

Fork of Population Bar Chart Basic

0 stars1🌍 Public
SSam Hege
Last edited Sep 13, 2022
Created on Sep 13, 2022

This example displays a horizontal bar chart of the top 10 countries by population for 2020. It uses React hooks to load and store the data, which comes from a CSV file of United Nations population estimates. The chart renders as SVG rectangles, with scales created using `d3.scaleBand` and `d3.scaleLinear` to map country names and population values to pixel positions. The `d3.csv` method parses the data, and the `xScale` and `yScale` dimensions are set to fixed width and height values.

AI-generated description

A program that loads and visualizes some data

Comments

Sign in to join the discussion.

MIT Licensed