assigment-2
This example displays a pie chart comparing the frequency of diabetes outcomes from a CSV dataset, distinguishing between individuals with and without diabetes using light blue and red slices. It also includes a legend beside the chart that repeats the category labels and counts. The visualization is built with D3.js v6, using d3.pie and d3.arc to generate the slices, d3.scaleOrdinal for colors, and SVG elements for rendering. Labels are positioned at each slice’s centroid, and the data is loaded asynchronously via d3.csv from a GitHub gist URL.