Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

task-9-1

Public visualization

Viewing a saved revision (read-only)

1410880c95c949ecb466e613d5c4f6aa

task-9-1

0 stars0🌍 Public
Ssiri2001j@gmail.com
Last edited Apr 28, 2024
Created on Apr 28, 2024
Forked from Hello VizHub

This visualization is a pie chart showing the Air Quality Index by country, with each slice representing a country and its color encoded to a categorical scale. The chart includes a legend on the right side listing each country with its corresponding Air Index value, and the slices are sorted from largest to smallest value. Built with D3 v5, the code uses `d3.pie`, `d3.arc`, and `d3.scaleOrdinal` to generate the SVG paths and colors. The data is loaded from a remote CSV file using `d3.csv`, with the `Air_Index` values parsed as numbers for the computation.

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.