🌍 Public
Fork of Pathetic Bar Chart
This example displays the ten most populous countries as a pathetic bar chart with no axes or labels, using horizontal rectangles sized by each country’s 2020 population estimate. The visualization is built with React and D3 v5, where `d3.csv` loads the United Nations World Population Prospects data, `d3.scaleBand` positions the bars vertically, and `d3.scaleLinear` maps population values to bar widths. Rendered as an SVG, the chart updates from a loading state once the data is fetched, using React’s `useState` and `useEffect` hooks. Data is sorted by population in descending order before the top ten are selected.
AI-generated descriptionA program that shows the top 10 most populous countries as a pathetic bar chart with no axes.
MIT Licensed








Comments
Sign in to join the discussion.