(axis w/ react & d3) Countries by population (top 10)
This example visualizes the top 10 most populous countries in 2020 as a bar chart, using a horizontal layout. It shows the population counts along the x-axis and country names along the y-axis, with gridlines and tick labels generated manually. The code loads data from a CSV file using `d3.csv`, processes it in a React component with hooks (`useState`, `useEffect`), and uses `scaleBand` for the y-axis, `scaleLinear` for the x-axis, and `max` from d3. React elements are used to render SVG bars, text labels, and lines, with ReactDOM mounting the component.