🌍 Public
Viewing a saved revision (read-only)
d98fb08498b24b1d904c7b5e686f51b5
Piechart_Assignment2
This example shows the distribution of wind speeds across cities using a pie chart, categorizing values into three ranges: 0-10, 10-15, and above 15. The visualization loads a CSV dataset from a GitHub repository using `fetch` and `d3.csvParse`, then aggregates the data. It renders an SVG pie chart with `d3.pie()` and `d3.arc()`, applying custom colors via `d3.scaleOrdinal`. Labels are placed at arc centroids using `path.centroid`, and an HTML legend is built dynamically beneath the chart.
AI-generated descriptionPie Chart Creation