Skip to main content
100%

Fork of Pathetic Bar Chart

✓ Published0🌍 Public
Mmrthnkwn
Last edited Jan 20, 2022
Created on Jan 20, 2022
Forked from Pathetic Bar Chart

This example visualizes the top 10 most populous countries as horizontal bars with no axes, using React and D3 v5 to fetch and render the data. It displays United Nations World Population Prospects 2019 data by mapping country names to a `d3.scaleBand` y-axis and population values to a `d3.scaleLinear` x-axis. The SVG rectangles are rendered directly in JSX, with bar widths proportional to each country’s 2020 population estimate. The code uses `d3.csv` to load the dataset and React hooks (`useState`, `useEffect`) to manage the asynchronous data loading.

AI-generated description

A program that shows the top 10 most populous countries as a pathetic bar chart with no axes.

Data: United Nations World Population Prospects 2019.

MIT Licensed

Similar vizzes