Skip to main content
100%

Activity6_population_Q1.1

✓ Published0🌍 Public
Sshettisowmya01@gmail.com
Last edited Oct 20, 2024
Created on Oct 18, 2024
Forked from Hello VizHub

This example shows the population of ten countries in the year 2000 using a horizontal bar chart, where bar length encodes population and a tooltip displays the formatted value. The visualization is built with React and D3 v5, using `d3.scaleBand` for the country categories on the y-axis and `d3.scaleLinear` for the population scale on the x-axis. The chart loads CSV data from a GitHub repository via `d3.csv`, formats axis tick labels with `d3.format`, and renders the bars and axes as SVG elements. The code demonstrates the use of local ES6 modules for axis and mark components, alongside React’s `useData` hook for data loading.

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