🌍 Public
Viewing a saved revision (read-only)
a982fb49b4234e258bfa9b9bae79a6ea
United Nations Bar Chart With React AND D3
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 descriptionusing React to render and visualize United Nation Population in 2019
I dont know why this doesn't work