Assignment7 Pie Chart
✓ Published0🌍 Public
This pie chart displays the distribution of energy use across five sources—Petroleum, Natural Gas, Renewables, Coal, and Nuclear—using data from the energy_use.csv file. The visualization loads data with `d3.csv`, calculates the arc paths using `d3.pie` and `d3.arc`, and renders each slice as a `path` element in SVG with an ordinal color scale. A legend on the right side, built with `selectAll` and `append`, maps each colored rectangle to its corresponding energy source.
AI-generated descriptionMIT Licensed