🌍 Public
Viewing a saved revision (read-only)
b4d00a35940e456d91d80d1b5643db2f
myViz
This pie chart displays the distribution of accidents by type, with each slice labeled directly on the visualization. The code loads CSV data from a GitHub gist, uses `d3.rollup` to count accidents per category, and `d3.pie()` to generate the arc layout. Slices are rendered as SVG paths via `d3.arc()`, colored with `d3.scaleOrdinal` and `d3.schemeCategory10`, while labels are positioned using `arc.centroid()`. The chart is built with D3 v6 and rendered entirely in SVG.
AI-generated description