🌍 Public
Viewing a saved revision (read-only)
ed7fcbc1a9774ace9f9f36ac8a8ef2c6
UN Visualization
This example presents a horizontal bar chart of the ten most populous countries in 2020, using data loaded from a CSV file of UN population estimates. The visualization maps each country's name to a vertical band with d3.scaleBand, and its population count to a horizontal bar length with d3.scaleLinear. React hooks manage the asynchronous data loading state, displaying a “Loading...” message until the CSV is fetched, after which the SVG bars are rendered. The chart uses d3.csv for data parsing and ReactDOM to render the SVG elements.
AI-generated descriptionA program that loads in some data about CSS named colours with d3 and uses react to reder data