Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Piechart_Assignment2

Public visualization

Piechart_Assignment2

0 stars0🌍 Public
Rrishithagovini99@gmail.com
Last edited Apr 13, 2024
Created on Apr 12, 2024
Forked from Hello VizHub

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 description

Pie Chart Creation of Wind speed Distribution

Comments

Sign in to join the discussion.

MIT Licensed