Q1_Dataviz_Piechart
This pie chart visualizes the average car prices across different brands, segmented by fuel type, with data loaded from a CSV file. The visualization uses D3 v6’s `d3.pie` and `d3.arc` to generate SVG path slices, while labels show the brand name and average price using `labelArc.centroid`. The chart filters Tesla to show only electric models, and a separate SVG legend maps fuel types (Petrol, Diesel, Electric, Hybrid) to distinct colors. The code processes the CSV data with `d3.group` to compute averages per brand and fuel type before rendering.