Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Task8

Public visualization

Viewing a saved revision (read-only)

651e0e3d565f4bffb80c598a0e8ebc9b

Fork of Task8

0 stars0🌍 Public
VVijay Sheru
Last edited Apr 18, 2024
Created on Apr 18, 2024
Forked from Task8

This pie chart displays the breakdown of CO2-equivalent emissions by gas type using data from the Our World in Data CO2 dataset. The visualization uses D3.js v7 with the `d3.pie()` layout to generate arc segments and `d3.rollup()` to aggregate emission sums per gas category. Each slice is rendered as an SVG path via the `d3.arc()` generator, with a categorical color scale (`d3.scaleOrdinal` and `d3.schemeSet3`) distinguishing gas types, and text labels positioned using `arcGenerator.centroid()`. A legend is appended to identify each gas category.

AI-generated description