π Public
Viewing a saved revision (read-only)
21fb3137fab8424aada67b06c49146e7
Pie Chart
This example displays a pie chart of the top 10 countries by CO2 emissions, showing each country's share of the total and its emission amount in million tons. The chart is rendered in SVG using the D3 library, with the `pie`, `arc`, and `scaleOrdinal` functions to construct and color the slices and legend. Data is loaded from a remote CSV file containing country and co2_amount fields, and the D3 `csv` function parses the data. The legend lists each country with its percentage and tonnage, providing a detailed breakdown alongside the visual representation.
AI-generated descriptionWhich countries are the worldβs biggest carbon polluters? Data Reference