Fork of Food Production Stacked Bar Chart
This stacked bar chart displays the estimated 2021 food production across continents, with bars showing tonnage of various food categories. The visualization uses D3's `scaleOrdinal` with `schemeCategory10` for colors and `flatRollup` to reshape the CSV data from the Kaggle world food production dataset. The `stackedBarChart` function builds stacked rects using `stack()` and `scaleLinear` for x-values, while the adjacent `colorLegend` provides interactive highlighting, dimming non-hovered segments and drawing a stroke on the selected category.
AI-generated descriptionStacked bars showing estimated food production breakdown of the continents. Based on an example from the tutorial
https://www.kaggle.com/datasets/rafsunahmad/world-food-production
https://raw.githubusercontent.com/lukesavoie/dataviz/main/world%20food%20production.csv loaded and parsed as CSV.