Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

ICE7_11703795_PieChart

Public visualization

Viewing a saved revision (read-only)

523c9427482c4d8aaf3ea1768f20c103

ICE7_11703795_PieChart

0 stars0🌍 Public
MMeghanaChowdaryVelaga@my.unt.edu
Last edited Apr 2, 2025
Created on Apr 2, 2025

This pie chart displays the distribution of smokers versus non-smokers from a health information dataset, revealed through two labeled slices. The visualization aggregates the dataset’s `smoker` column by counting occurrences of “yes” and “no” values. Using D3 v7, the code applies the `d3.pie()` layout and `d3.arc()` generator to render SVG paths, with `d3.schemeCategory10` coloring each slice. A legend, constructed manually with SVG rectangles and text, maps colors to categories. The chart loads remote CSV data via `d3.csv()` and includes a fixed 400x400 pixel SVG canvas.

AI-generated description