Question 2
This stacked bar chart visualizes energy consumption by source across five countries (USA, China, India, Germany, Brazil) for 2023. The chart uses D3 v7 with `d3.scaleBand` for the x-axis and `d3.scaleLinear` for the y-axis, rendering stacked segments via `d3.stack().keys()` to represent Coal, Oil, Natural Gas, Renewable, and Nuclear proportions. Data loads from `energy_data.csv` using `d3.csv()`. A legend, generated with SVG groups, identifies each energy source, while custom colors are assigned through `d3.scaleOrdinal`.