Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Question1_Task9

Public visualization

Question1_Task9

0 stars0🌍 Public
Vvidiyalasahithi1999@gmail.com
Last edited Apr 29, 2024
Created on Apr 29, 2024

This D3.js v5 visualization presents a pie chart of the Air Quality Index by country, using SVG rendering. The chart encodes each country's Air_Index value as a pie slice, with colors assigned via the d3.scaleOrdinal and schemeCategory10 color scale, and includes a legend showing country names and their formatted index values. The code loads CSV data from a GitHub gist, converts the Air_Index field to numbers, sorts countries by index, and uses d3.pie and d3.arc to generate the slices. The chart is titled "Air Quality Index by Country."

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed