Activity 6
This example presents a horizontal bar chart of population data from the year 2000 for ten countries, using an SVG rendering within a React component. The visualization loads a CSV from GitHub and processes the data with d3.csv, then uses d3.scaleBand and d3.scaleLinear to map categorical and quantitative values to positions. The chart includes custom axes built with map functions, displaying population values in billions with formatted tick labels, alongside interactive tooltips generated through SVG `<title>` elements. The code leverages React’s useState and useEffect hooks for asynchronous data loading, and imports D3 functions like `max`, `format`, and `scaleBand` directly.