Activity 7 Pie Chart
✓ Published1🌍 Public
This pie chart visualizes the Happiness Dataset, showing the happiness scores of the top 20 countries with all remaining countries aggregated into an "Others" slice. D3's `pie` and `arc` generators create the SVG slices, while `scaleOrdinal` with `schemeCategory10` assigns colors, and a custom legend is drawn alongside. The data is loaded asynchronously via D3's `csv` method from a GitHub gist, with the `processData` function sorting and aggregating scores before rendering.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed