Pie Chart
✓ Published0🌍 Public
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
MIT Licensed