Skip to main content
100%

assignment2

✓ Published0🌍 Public
1188r1a0559@gmail.com
Last edited Apr 11, 2024
Created on Apr 11, 2024
Forked from 123

This interactive pie chart visualizes the number of deaths by country, using data loaded from a CSV file hosted on GitHub. The chart displays each country as a colored arc segment, with the death count labeled directly on each slice, and includes a legend for identification. Built with D3.js v7, the visualization uses `d3.pie()` to compute arc segments, `d3.arc()` to generate paths, and `d3.schemeCategory10` for coloring. Hovering over a slice triggers a tooltip showing the country name and death count, implemented with mouseover/mouseout events and opacity transitions. The SVG-based chart employs `d3.csv()` for data loading and positions labels via `arc.centroid()` for accurate placement.

AI-generated description
MIT Licensed

Similar vizzes