Bar Chart with React & D3
This visualization displays the ten most populous countries in 2020 as a horizontal bar chart, where bar length encodes population size. The code uses React hooks (useState, useEffect, useCallback) to manage asynchronous data loading via d3.csv, which fetches UN population data from a GitHub gist. D3 scales (scaleBand for countries, scaleLinear for population totals) position the SVG rectangles rendered as React components. While the HTML loads React and D3 from CDNs, the visible chart omits axes, labels, and color, showing only raw bars against a white background.