🌍 Public
Viewing a saved revision (read-only)
1d07f8c08b9f49ebb72b4e15fa4f8737
Activity6_Ques1(1)
This visualization displays population data from the year 2000 for ten countries as a horizontal bar chart using React and D3 v5. The bars are rendered as SVG rectangles, with the x-axis showing population values formatted in billions and the y-axis listing country names. The code uses D3's `scaleBand` and `scaleLinear` for axis scaling, `csv` for data loading from a GitHub repository, and React hooks to fetch and process the data. Hovering over each bar reveals its exact population value through a tooltip.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.