Skip to main content
100%

Activity 7_Part2

✓ Published0🌍 Public
Rrikhitakoganti12
Last edited Jul 3, 2023
Created on Jul 2, 2023
Forked from Hello VizHub

This example shows a horizontal bar chart of population data for 20 countries in 2020, using purple bars to encode each country’s population value. The visualization loads population data from a GitHub-hosted CSV file via `d3.csv` and renders the chart as SVG elements using React components. It applies `d3.scaleBand` for the categorical country axis, `d3.scaleLinear` for the numeric population axis, and `d3.format` to abbreviate tick labels from billions to “B”. The code demonstrates local ES6 module imports and D3 integration within a React framework.

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