Gist 61199307353f07c3a982a00974bfa187
✓ Published0🌍 Public
CCurran Kelleher
Last edited Feb 24, 2021
Created on Feb 24, 2021
This visualization compares greenhouse gas emissions across food products by life-cycle stage, using a horizontal bar chart for each food item with color-coded segments for land use change, farm, processing, transport, and other stages. The data, sourced from Our World in Data, is rendered as stacked bars using D3’s `d3.scaleOrdinal` for color mapping and `d3.axisLeft` for food labels. The code uses `d3.csv` to parse the uploaded CSV file and `d3.stack` to compute the stacked series, with each bar’s length representing total emissions in kilograms of CO₂-equivalent per kilogram of food.
AI-generated description