Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

United Nations Bar Chart With React AND D3

Public visualization

United Nations Bar Chart With React AND D3

0 stars1🌍 Public
LLeandro Da Souza
Last edited Mar 29, 2021
Created on Mar 25, 2021

This example displays the top 10 countries by United Nations population estimates for 2020 as horizontal bars, using React to render SVG rectangles and D3 scales for layout. It loads data from a CSV file via `d3.csv`, parses the population column, and maps countries to a `scaleBand` y-axis and populations to a `scaleLinear` x-axis. React’s `useState` and `useEffect` manage the asynchronous data fetching, while `ReactDOM.render` mounts the visualization. The chart updates when data arrives, though it does not include axes or labels.

AI-generated description

using React to render and visualize United Nation Population in 2019

I dont know why this doesn't work

Comments

Sign in to join the discussion.

MIT Licensed