--- title: "Guess the Footprint" slides: 10 source: presentation present_url: https://www.niori.app/present/rErGinKMJ18x7ZE7 json_url: https://www.niori.app/api/decks/rErGinKMJ18x7ZE7 --- # Guess the Footprint This deck is code. Each slide below is the complete JSX source of what renders on a 1280x720 canvas, so it says exactly what the audience sees. - Each slide is one self-contained React component; the function it declares renders on a fixed 1280x720 canvas. - React hooks are imported from 'react'. Chart components are imported from 'recharts' but served by the app's own implementation. - An import of the form `import "font:Family Name"` loads a Google Font for the slide. - An import of the form `import "palette:Name"` declares the slide colour palette; charts and diagrams inherit its accent and tones through CSS variables. - Tailwind classes cover layout, spacing, sizing, typography and neutral colours only; colours, borders, shadows and custom values are inline styles. - notes are the speaker notes and targetDuration is the intended time on the slide in seconds; both are present only when set, and notes only for someone with a role on the deck or its agent link. ## Slide 1: Question: coffee water footprint ```jsx import { useState } from 'react'; import { Frame } from 'deck'; import 'palette:Slate'; import 'font:FiraGO'; const INK = '#2A2160'; const CREAM = '#FFF7EC'; function CoverSlide() { const [s, setS] = useState(() => { const ans = (typeof window !== 'undefined' && window.__quizAns) || []; const KEY = [2, 2, 2, 3, 2, 1, 1]; return KEY.filter((k, i) => ans[i + 1] === k).length; }); const chips = [ ['Coffee', '#FF7A45'], ['Burger', '#FF4E4E'], ['T-shirt', '#FFD23F'], ['Phone', '#7C5CFF'], ['Jeans', '#2E86FF'], ['Streaming', '#F63E9C'], ['Flight', '#00C2A8'], ]; return (
An interactive quiz · 7 questions · no photos, just numbers

Guess the
footprint

1 Pick an answer
2 See if you nailed it
3 Watch the real number land
{s} / 7 · Score resets here
{chips.map(([name, c]) => ( {name} ))}
); } ``` ## Slide 2: Question: burger water footprint ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const IDX = 1, ANSWER = 2; const BG = '#FF7A45', INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368', BAD = '#C1123A'; const OPTS = [ { label: '13 L', value: 13 }, { label: '37 L', value: 37 }, { label: '132 L', value: 132 }, { label: '400 L', value: 400 }, ]; const Q = 'How much water does it take to make one cup of coffee?'; const REAL = '132 litres'; const FACT = 'Almost all of it goes into growing and processing the beans. The water in the cup is a rounding error.'; const CAP = 'Water footprint of each answer, litres'; const SOURCE = 'Water Footprint Network, via DW (2022)'; const HREF = 'https://www.dw.com/en/how-big-is-your-water-footprint/a-61171792'; function Cup() { return ( ); } function QuizSlide() { const [pick, setPick] = useState(null); const [shown, setShown] = useState(false); const [score, setScore] = useState(0); useEffect(() => { const ans = window.__quizAns || (window.__quizAns = []); let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); if (ans[IDX] !== undefined) { setPick(ans[IDX]); setShown(true); } setScore(s); }, []); const choose = (i) => { if (pick !== null) return; const ans = window.__quizAns || (window.__quizAns = []); ans[IDX] = i; let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); setPick(i); setScore(s); setTimeout(() => setShown(true), 40); }; const correct = pick === ANSWER; return (
Question {IDX} of 7 Score {score}/7

{Q}

{OPTS.map((o, i) => { const isCorrect = i === ANSWER; let bg = CREAM, fg = INK, sh = '0 5px 0 rgba(42,33,96,0.3)'; if (shown && isCorrect) { bg = GOOD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } else if (shown && i === pick && !correct) { bg = BAD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } return ( ); })}
{REAL} {correct ? 'Nailed it!' : 'Not this time'}

{FACT}

{pick === null ? (

The comparison chart appears once you answer. No peeking.

) : (
{OPTS.map((o, i) => )}
)}

{pick === null ? 'Water footprint of each answer, litres' : CAP}

); } ``` ## Slide 3: Question: cotton t-shirt water footprint ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const IDX = 2, ANSWER = 2; const BG = '#FF4E4E', INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368', BAD = '#C1123A'; const OPTS = [ { label: '250 L', value: 250 }, { label: '700 L', value: 700 }, { label: '2,500 L', value: 2500 }, { label: '6,000 L', value: 6000 }, ]; const Q = 'How much water does one beef burger cost?'; const REAL = '2,500 litres'; const FACT = 'About 99% of it is the beef. Raising a cow takes years of feed, grass and drinking water before it reaches a bun.'; const CAP = 'Water footprint of each answer, litres'; const SOURCE = 'Water Footprint Calculator (2022)'; const HREF = 'https://www.watercalculator.org/footprint/what-is-the-water-footprint-of/'; function Burger() { return ( ); } function QuizSlide() { const [pick, setPick] = useState(null); const [shown, setShown] = useState(false); const [score, setScore] = useState(0); useEffect(() => { const ans = window.__quizAns || (window.__quizAns = []); let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); if (ans[IDX] !== undefined) { setPick(ans[IDX]); setShown(true); } setScore(s); }, []); const choose = (i) => { if (pick !== null) return; const ans = window.__quizAns || (window.__quizAns = []); ans[IDX] = i; let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); setPick(i); setScore(s); setTimeout(() => setShown(true), 40); }; const correct = pick === ANSWER; return (
Question {IDX} of 7 Score {score}/7

{Q}

{OPTS.map((o, i) => { const isCorrect = i === ANSWER; let bg = CREAM, fg = INK, sh = '0 5px 0 rgba(42,33,96,0.3)'; if (shown && isCorrect) { bg = GOOD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } else if (shown && i === pick && !correct) { bg = BAD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } return ( ); })}
{REAL} {correct ? 'Nailed it!' : 'Not this time'}

{FACT}

{pick === null ? (

The comparison chart appears once you answer. No peeking.

) : (
{OPTS.map((o, i) => )}
)}

{pick === null ? 'Water footprint of each answer, litres' : CAP}

); } ``` ## Slide 4: Question: smartphone water footprint ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const IDX = 3, ANSWER = 2; const BG = '#FFD23F', INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368', BAD = '#C1123A'; const OPTS = [ { label: '90 L', value: 90 }, { label: '270 L', value: 270 }, { label: '2,700 L', value: 2700 }, { label: '7,000 L', value: 7000 }, ]; const Q = 'How much water does one cotton t-shirt take to make?'; const REAL = '2,700 litres'; const FACT = 'Growing and irrigating the cotton is most of it. A polyester tee would use far less water, at the cost of more oil.'; const CAP = 'Water footprint of each answer, litres'; const SOURCE = 'Water Footprint Network, via Stacker (2020)'; const HREF = 'https://stacker.com/stories/environment/how-much-water-it-takes-create-30-common-items'; function Tee() { return ( ); } function QuizSlide() { const [pick, setPick] = useState(null); const [shown, setShown] = useState(false); const [score, setScore] = useState(0); useEffect(() => { const ans = window.__quizAns || (window.__quizAns = []); let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); if (ans[IDX] !== undefined) { setPick(ans[IDX]); setShown(true); } setScore(s); }, []); const choose = (i) => { if (pick !== null) return; const ans = window.__quizAns || (window.__quizAns = []); ans[IDX] = i; let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); setPick(i); setScore(s); setTimeout(() => setShown(true), 40); }; const correct = pick === ANSWER; return (
Question {IDX} of 7 Score {score}/7

{Q}

{OPTS.map((o, i) => { const isCorrect = i === ANSWER; let bg = CREAM, fg = INK, sh = '0 5px 0 rgba(42,33,96,0.3)'; if (shown && isCorrect) { bg = GOOD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } else if (shown && i === pick && !correct) { bg = BAD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } return ( ); })}
{REAL} {correct ? 'Nailed it!' : 'Not this time'}

{FACT}

{pick === null ? (

The comparison chart appears once you answer. No peeking.

) : (
{OPTS.map((o, i) => )}
)}

{pick === null ? 'Water footprint of each answer, litres' : CAP}

); } ``` ## Slide 5: Question: jeans water footprint ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const IDX = 4, ANSWER = 3; const BG = '#7C5CFF', INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368', BAD = '#C1123A'; const OPTS = [ { label: '320 L', value: 320 }, { label: '1,200 L', value: 1200 }, { label: '5,000 L', value: 5000 }, { label: '12,760 L', value: 12760 }, ]; const Q = 'How much water goes into manufacturing one smartphone?'; const REAL = '12,760 litres'; const FACT = 'Every chip inside is rinsed dozens of times, and mining and refining the metals is thirsty work. A phone is essentially born from water.'; const CAP = 'Water footprint of each answer, litres'; const SOURCE = 'Water Footprint Network, via Stacker (2020)'; const HREF = 'https://stacker.com/stories/environment/how-much-water-it-takes-create-30-common-items'; function Phone() { return ( ); } function QuizSlide() { const [pick, setPick] = useState(null); const [shown, setShown] = useState(false); const [score, setScore] = useState(0); useEffect(() => { const ans = window.__quizAns || (window.__quizAns = []); let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); if (ans[IDX] !== undefined) { setPick(ans[IDX]); setShown(true); } setScore(s); }, []); const choose = (i) => { if (pick !== null) return; const ans = window.__quizAns || (window.__quizAns = []); ans[IDX] = i; let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); setPick(i); setScore(s); setTimeout(() => setShown(true), 40); }; const correct = pick === ANSWER; return (
Question {IDX} of 7 Score {score}/7

{Q}

{OPTS.map((o, i) => { const isCorrect = i === ANSWER; let bg = CREAM, fg = INK, sh = '0 5px 0 rgba(42,33,96,0.3)'; if (shown && isCorrect) { bg = GOOD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } else if (shown && i === pick && !correct) { bg = BAD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } return ( ); })}
{REAL} {correct ? 'Nailed it!' : 'Not this time'}

{FACT}

{pick === null ? (

The comparison chart appears once you answer. No peeking.

) : (
{OPTS.map((o, i) => )}
)}

{pick === null ? 'Water footprint of each answer, litres' : CAP}

); } ``` ## Slide 6: Question: streaming carbon footprint ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const IDX = 5, ANSWER = 2; const BG = '#2E86FF', INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368', BAD = '#C1123A'; const OPTS = [ { label: '750 L', value: 750 }, { label: '2,000 L', value: 2000 }, { label: '7,500 L', value: 7500 }, { label: '15,000 L', value: 15000 }, ]; const Q = 'How much water does it take to make a pair of jeans?'; const REAL = '7,500 litres'; const FACT = 'It is the cotton again: irrigation, dyeing and finishing. Levi\u2019s own study puts one pair at 3,781 litres; the full supply-chain figures run higher.'; const CAP = 'Water footprint of each answer, litres'; const SOURCE = 'Water Footprint Network / Levi Strauss & Co.'; const HREF = 'https://www.watercalculator.org/footprint/what-is-the-water-footprint-of/'; function Jeans() { return ( ); } function QuizSlide() { const [pick, setPick] = useState(null); const [shown, setShown] = useState(false); const [score, setScore] = useState(0); useEffect(() => { const ans = window.__quizAns || (window.__quizAns = []); let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); if (ans[IDX] !== undefined) { setPick(ans[IDX]); setShown(true); } setScore(s); }, []); const choose = (i) => { if (pick !== null) return; const ans = window.__quizAns || (window.__quizAns = []); ans[IDX] = i; let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); setPick(i); setScore(s); setTimeout(() => setShown(true), 40); }; const correct = pick === ANSWER; return (
Question {IDX} of 7 Score {score}/7

{Q}

{OPTS.map((o, i) => { const isCorrect = i === ANSWER; let bg = CREAM, fg = INK, sh = '0 5px 0 rgba(42,33,96,0.3)'; if (shown && isCorrect) { bg = GOOD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } else if (shown && i === pick && !correct) { bg = BAD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } return ( ); })}
{REAL} {correct ? 'Nailed it!' : 'Not this time'}

{FACT}

{pick === null ? (

The comparison chart appears once you answer. No peeking.

) : (
{OPTS.map((o, i) => )}
)}

{pick === null ? 'Water footprint of each answer, litres' : CAP}

); } ``` ## Slide 7 ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const IDX = 6, ANSWER = 1; const BG = '#F63E9C', INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368', BAD = '#C1123A'; const OPTS = [ { label: '5 g', value: 5 }, { label: '55 g', value: 55 }, { label: '550 g', value: 550 }, { label: '5 kg', value: 5000 }, ]; const Q = 'What is the carbon footprint of one hour of streaming in Europe?'; const REAL = '55 g CO\u2082e'; const FACT = 'That is roughly three kettle boils. Your screen, not the video quality, is the biggest part of it. Dropping HD to SD barely moves the number.'; const CAP = 'Emissions of each answer, grams CO\u2082e per hour'; const SOURCE = 'Carbon Trust / DIMPACT, Carbon impact of video streaming (2021)'; const HREF = 'https://www.carbontrust.com/our-work-and-impact/guides-reports-and-tools/carbon-impact-of-video-streaming'; function Play() { return ( ); } function QuizSlide() { const [pick, setPick] = useState(null); const [shown, setShown] = useState(false); const [score, setScore] = useState(0); useEffect(() => { const ans = window.__quizAns || (window.__quizAns = []); let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); if (ans[IDX] !== undefined) { setPick(ans[IDX]); setShown(true); } setScore(s); }, []); const choose = (i) => { if (pick !== null) return; const ans = window.__quizAns || (window.__quizAns = []); ans[IDX] = i; let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); setPick(i); setScore(s); setTimeout(() => setShown(true), 40); }; const correct = pick === ANSWER; return (
Question {IDX} of 7 Score {score}/7

{Q}

{OPTS.map((o, i) => { const isCorrect = i === ANSWER; let bg = CREAM, fg = INK, sh = '0 5px 0 rgba(42,33,96,0.3)'; if (shown && isCorrect) { bg = GOOD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } else if (shown && i === pick && !correct) { bg = BAD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } return ( ); })}
{REAL} {correct ? 'Nailed it!' : 'Not this time'}

{FACT}

{pick === null ? (

The comparison chart appears once you answer. No peeking.

) : (
{OPTS.map((o, i) => )}
)}

{pick === null ? 'Emissions of each answer, grams CO\u2082e per hour' : CAP}

); } ``` ## Slide 8: Question: flight London to New York carbon ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const IDX = 7, ANSWER = 1; const BG = '#00C2A8', INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368', BAD = '#C1123A'; const OPTS = [ { label: '65 kg', value: 65 }, { label: '648 kg', value: 648 }, { label: '1,300 kg', value: 1300 }, { label: '2,500 kg', value: 2500 }, ]; const Q = 'One economy seat, London to New York, one way. How much CO\u2082e?'; const REAL = '648 kg CO\u2082e'; const FACT = 'One passenger, one way, economy, using UK government 2026 factors including the extra warming that happens at altitude. A return trip is about 1.3 tonnes.'; const CAP = 'Emissions of each answer, kg CO\u2082e per passenger'; const SOURCE = 'UK DESNZ greenhouse gas conversion factors 2026'; const HREF = 'https://www.gov.uk/government/collections/government-conversion-factors-for-company-reporting'; function Plane() { return ( ); } function QuizSlide() { const [pick, setPick] = useState(null); const [shown, setShown] = useState(false); const [score, setScore] = useState(0); useEffect(() => { const ans = window.__quizAns || (window.__quizAns = []); let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); if (ans[IDX] !== undefined) { setPick(ans[IDX]); setShown(true); } setScore(s); }, []); const choose = (i) => { if (pick !== null) return; const ans = window.__quizAns || (window.__quizAns = []); ans[IDX] = i; let s = 0; ans.forEach((a) => { if (a === ANSWER) s += 1; }); setPick(i); setScore(s); setTimeout(() => setShown(true), 40); }; const correct = pick === ANSWER; return (
Question {IDX} of 7 Score {score}/7

{Q}

{OPTS.map((o, i) => { const isCorrect = i === ANSWER; let bg = CREAM, fg = INK, sh = '0 5px 0 rgba(42,33,96,0.3)'; if (shown && isCorrect) { bg = GOOD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } else if (shown && i === pick && !correct) { bg = BAD; fg = '#FFFFFF'; sh = '0 3px 0 rgba(0,0,0,0.25)'; } return ( ); })}
{REAL} {correct ? 'Nailed it!' : 'Not this time'}

{FACT}

{pick === null ? (

The comparison chart appears once you answer. No peeking.

) : (
{OPTS.map((o, i) => )}
)}

{pick === null ? 'Emissions of each answer, kg CO\u2082e per passenger' : CAP}

); } ``` ## Slide 9: Results: score and full ranking ```jsx import { useState, useEffect } from 'react'; import { Frame } from 'deck'; import { BarChart, Bar, XAxis, YAxis, Grid, Cell } from 'charts'; import 'palette:Slate'; import 'font:FiraGO'; const INK = '#2A2160', CREAM = '#FFF7EC', GOOD = '#00B368'; const WATER = [ { label: 'Phone', value: 12760 }, { label: 'Jeans', value: 7500 }, { label: 'T-shirt', value: 2700 }, { label: 'Burger', value: 2500 }, { label: 'Coffee', value: 132 }, ]; const CARBON = [ { label: 'Flight (one-way)', value: 648 }, { label: 'Streaming 1 hr', value: 0.055 }, ]; function ResultsSlide() { const [ans, setAns] = useState([]); useEffect(() => { setAns(window.__quizAns || []); }, []); const KEY = [2, 2, 2, 3, 2, 1, 1]; const score = KEY.filter((k, i) => ans[i + 1] === k).length; const verdict = score === 7 ? 'Certified footprint oracle.' : score >= 5 ? 'You can smell hidden water from a mile away.' : score >= 3 ? 'Half oracle, half optimist.' : 'The footprints remain suspiciously well hidden.'; return (
{score}/7

{verdict}

The phone wins the water prize. On carbon, one flight seat beats roughly 12,000 hours of streaming.

{WATER.map((o, i) => )}

Hidden water, litres. Green bar = the biggest surprise.

Hidden carbon, kg CO₂e per person. Streaming barely registers.

); } ``` ## Slide 10: About: made in Niori ```jsx import { Frame } from 'deck'; import 'palette:Slate'; import 'font:FiraGO'; const INK = '#2A2160'; const CREAM = '#FFF7EC'; function AboutSlide() { return (
About this quiz

This quiz was made in Niori

The questions, drawings, charts and scoring all came from a short brief and one round of feedback in Niori's chat. The figures are real and sourced on each slide.

Make your own at niori.app →
Niori logo
); } ```