Skip to main content
100%

activity6_Task1

✓ Published0🌍 Public
Aaparnachalumuri@gmail.com
Last edited Oct 22, 2024
Created on Oct 21, 2024

This horizontal bar chart displays the top 30 countries by 2020 World Bank population data, drawn using React and D3 v5. The visualization converts raw population values (stored as CSV data from a GitHub repository) into D3 scaleBand and scaleLinear scales for the y-axis and x-axis respectively, rendering SVG rectangles via the Marks component. Population formatting uses D3's format function to abbreviate large numbers (e.g., 'G' for billions, replaced with 'B'). Hovering over each bar reveals the exact population value in a tooltip, while blue tick lines and green bars provide clear visual separation.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes