Skip to main content
100%

Activity 6 Q 1.2

✓ Published0🌍 Public
RRukmini Devi Y
Last edited Oct 22, 2024
Created on Oct 22, 2024

This visualization displays the population of the top 20 countries in 2010 as a horizontal bar chart. Using D3 v5’s `scaleBand` and `scaleLinear` for the y and x axes, respectively, it maps each country to a light green rectangle. The code imports these utilities directly from "d3" via UNPKG and builds the SVG in React with ES6 modules. Data is fetched from a CSV dataset and formatted with D3’s `.2s` format, converting G to B for millions.

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