Skip to content

An AI skill that turns books into animated, narrated, interactive web experiences

wip(pandemic-shorts): ch05 round 2 before base merge

yzr2be1a1db905a
diff --git a/site/pandemic-shorts/ch05/audio/bgm/ep5.mp3 b/site/pandemic-shorts/ch05/audio/bgm/ep5.mp3
index a2bd471..4871c7b 100644
Binary files a/site/pandemic-shorts/ch05/audio/bgm/ep5.mp3 and b/site/pandemic-shorts/ch05/audio/bgm/ep5.mp3 differ
diff --git a/site/pandemic-shorts/ch05/audio/en/quiet.mp3 b/site/pandemic-shorts/ch05/audio/en/quiet.mp3
index 65102c2..80a387e 100644
Binary files a/site/pandemic-shorts/ch05/audio/en/quiet.mp3 and b/site/pandemic-shorts/ch05/audio/en/quiet.mp3 differ
diff --git a/site/pandemic-shorts/ch05/audio/en/timings.js b/site/pandemic-shorts/ch05/audio/en/timings.js
index 73e50ec..f4323da 100644
--- a/site/pandemic-shorts/ch05/audio/en/timings.js
+++ b/site/pandemic-shorts/ch05/audio/en/timings.js
@@ -1 +1 @@
-window.TIMINGS = {"hook": {"dur": 6.548, "marks": {"official": 0.0, "seven": 1.882, "best": 3.745, "twentyseven": 5.264}, "cues": [[0.0, "Officially, COVID killed seven point one million people."], [3.673, "The best estimate is closer to twenty-seven million."]]}, "card": {"dur": 2.882, "marks": {"series": 0.0, "title": 2.091}, "cues": [[0.0, "The Pandemic."], [1.055, "Part five:"], [2.091, "the count."]]}, "uncounted": {"dur": 5.673, "marks": {"never": 0.8, "all": 2.855, "normal": 4.745}, "cues": [[0.0, "Many deaths were never counted."], [1.964, "So researchers took all deaths, and compared them with a normal year."]]}, "estimate": {"dur": 4.862, "marks": {"gap": 0.127, "eighteen": 0.582, "twentyseven": 4.067}, "cues": [[0.0, "The gap:"], [0.582, "eighteen to thirty-five million."], [2.764, "Most likely, around twenty-seven."]]}, "ten": {"dur": 5.696, "marks": {"evenly": 0.655, "ten": 2.282, "two": 3.964, "hundredk": 5.331}, "cues": [[0.0, "It didn't strike evenly."], [1.6, "Catch it at ten, and the risk of dying was about two in a hundred thousand."]]}, "eightyfive": {"dur": 5.54, "marks": {"eightyfive": 0.818, "fifteen": 1.227, "times": 3.45}, "cues": [[0.0, "At eighty-five:"], [1.227, "fifteen in a hundred."], [3.45, "Seven and a half thousand times higher."]]}, "saved": {"dur": 6.983, "marks": {"vax": 0.673, "first": 1.891, "fourteen": 4.327}, "cues": [[0.0, "Then came the vaccines."], [1.691, "In their first year alone, they prevented an estimated fourteen to twenty million deaths."]]}, "over": {"dur": 10.323, "marks": {"may5": 0.145, "who": 2.2, "emergency": 3.764, "heard": 5.673, "pover": 5.964, "never": 8.527}, "cues": [[0.0, "On May 5th, 2023, the World Health Organization said the emergency was over."], [5.4, "Many people heard:"], [5.964, "the pandemic is over."], [8.164, "The WHO did not say that."]]}, "quiet": {"dur": 5.131, "marks": {"stopped": 1.873, "quiet": 4.327}, "cues": [[0.0, "By that autumn, many countries had stopped counting cases at all."], [3.709, "The map went quiet."]]}, "end": {"dur": 8.455, "marks": {"biggest": 0.0, "millions": 2.945, "where": 5.782, "next": 6.909}, "cues": [[0.0, "The biggest crisis of our generation."], [2.4, "Some twenty-seven million lives."], [4.836, "And we still don't know where it came from."], [6.909, "Next:"], [7.564, "the origin."]]}};
+window.TIMINGS = {"hook": {"dur": 6.548, "marks": {"official": 0.0, "seven": 1.54, "best": 3.745, "twentyseven": 5.264}, "cues": [[0.0, "Officially, COVID killed seven point one million people."], [3.673, "The best estimate is closer to twenty-seven million."]]}, "card": {"dur": 2.882, "marks": {"series": 0.0, "title": 2.091}, "cues": [[0.0, "The Pandemic."], [1.055, "Part five:"], [2.091, "the count."]]}, "uncounted": {"dur": 5.673, "marks": {"never": 0.8, "all": 2.855, "normal": 4.745}, "cues": [[0.0, "Many deaths were never counted."], [1.964, "So researchers took all deaths, and compared them with a normal year."]]}, "estimate": {"dur": 4.862, "marks": {"gap": 0.127, "eighteen": 0.582, "twentyseven": 4.067}, "cues": [[0.0, "The gap:"], [0.582, "eighteen to thirty-five million."], [2.764, "Most likely, around twenty-seven."]]}, "ten": {"dur": 5.696, "marks": {"evenly": 0.655, "ten": 2.282, "two": 3.964, "hundredk": 4.54}, "cues": [[0.0, "It didn't strike evenly."], [1.6, "Catch it at ten, and the risk of dying was about two in a hundred thousand."]]}, "eightyfive": {"dur": 5.54, "marks": {"eightyfive": 0.16, "fifteen": 1.227, "times": 2.96}, "cues": [[0.0, "At eighty-five:"], [1.227, "fifteen in a hundred."], [3.45, "Seven and a half thousand times higher."]]}, "saved": {"dur": 6.983, "marks": {"vax": 0.673, "first": 1.891, "fourteen": 4.327}, "cues": [[0.0, "Then came the vaccines."], [1.691, "In their first year alone, they prevented an estimated fourteen to twenty million deaths."]]}, "over": {"dur": 10.323, "marks": {"may5": 0.145, "who": 2.2, "emergency": 3.764, "heard": 5.673, "pover": 6.44, "never": 8.7}, "cues": [[0.0, "On May 5th, 2023, the World Health Organization said the emergency was over."], [5.4, "Many people heard:"], [5.964, "the pandemic is over."], [8.164, "The WHO did not say that."]]}, "quiet": {"dur": 5.825, "marks": {"autumn": 0.164, "dozens": 1.109, "stopped": 2.2, "quiet": 4.327}, "cues": [[0.0, "By that autumn, dozens of countries had stopped reporting new cases."], [4.091, "The map began to go quiet."]]}, "end": {"dur": 8.455, "marks": {"biggest": 0.0, "millions": 2.66, "where": 5.782, "next": 6.909}, "cues": [[0.0, "The biggest crisis of our generation."], [2.4, "Some twenty-seven million lives."], [4.836, "And we still don't know where it came from."], [6.909, "Next:"], [7.564, "the origin."]]}};
diff --git a/site/pandemic-shorts/ch05/index.html b/site/pandemic-shorts/ch05/index.html
index 5985eb0..364c20f 100644
--- a/site/pandemic-shorts/ch05/index.html
+++ b/site/pandemic-shorts/ch05/index.html
@@ -46,6 +46,33 @@ function caps(g, str, y, t0, { size = 30, fill = MUTED, x = CX - 20, anchor = 'm
return e;
}
+// countries drawn grey on a paperMap()'s own canvas, after it each frame (the map itself only lights countries red; a
+// second full-frame canvas tripled Firefox's frame time). The view keeps one lon/lat (it may zoom), so each country's
+// shape is projected once onto the unit disc and only scaled per frame. alpha(iso, t) -> 0..1, GEO_LITE's 110m shapes
+function greyMap(M, D, view, alpha, fill = '#57524b') {
+ const geo = geoData(), ctx = M.g.querySelector('canvas').getContext('2d'), v0 = view(0), paths = {};
+ const l0 = v0.lon * DEG, f0 = v0.lat * DEG, sf0 = Math.sin(f0), cf0 = Math.cos(f0);
+ const shape = c => paths[c] || (paths[c] = (() => {
+ const P2 = new Path2D();
+ for (const r of geo.lod[0][c]) {
+ for (let i = 0; i < r.n; i++) {
+ const dl = r.lam[i] - l0, cdl = Math.cos(dl), cp = r.cphi[i], sp = r.sphi[i];
+ let x = cp * Math.sin(dl), y = cf0 * sp - sf0 * cp * cdl;
+ if (sf0 * sp + cf0 * cp * cdl < 0) { const l = Math.hypot(x, y) || 1; x /= l; y /= l; }
+ i ? P2.lineTo(x, -y) : P2.moveTo(x, -y);
+ }
+ P2.closePath();
+ }
+ return P2;
+ })());
+ clockRun(t => {
+ const k = 450 / view(t).H;
+ ctx.save(); ctx.setTransform(PX * k, 0, 0, PX * k, PX * W / 2, PX * H / 2); ctx.fillStyle = fill;
+ for (const c in geo.lod[0]) { const a = alpha(c, t); if (a > 0) { ctx.globalAlpha = a * .92; ctx.fill(shape(c)); } }
+ ctx.restore();
+ }, D, { tail: true });
+}
+
/* ---------- beats ---------- */
const OPEN_PRE = .3;
const BEATS = [
@@ -77,7 +104,7 @@ const BEATS = [
// 1. Which series, which episode: the night globe behind the card
['card', 'Part five', (m, D) => {
const p = panel(0);
- const s = shot(p, 0, undefined, { bg: NIGHT, swipe: 'quiet' });
+ const s = shot(p, 0, undefined, { bg: NIGHT });
const gl = G(s, { o: .35 });
Globe.clearMarks();
globeShot(gl, D, t => ({ lon: 20 + t * 4, lat: 15, H: 1.1 }));
@@ -91,6 +118,19 @@ const BEATS = [
const tA = m('all'), tN = m('normal');
let s = shot(p, 0, tA, { whip: true });
photo(s, 'ep5-bed', 0, tA + .3, { s0: 1.0, s1: 1.16, dy: 30, dim: .25 });
+ // the record the count is made from, its cause of death left blank
+ const rec = G(s, { x: CX - 20, y: 640, r: -4, o: 0 });
+ rect(rec, -280, -230, 560, 460, { fill: '#f3ecdb', stroke: MAPLINE, 'stroke-width': 3 });
+ T(rec, 'CERTIFICATE OF DEATH', { x: 0, y: -160, size: 40, fill: MAPINK, font: SANS, weight: 600, anchor: 'middle' }).setAttribute('letter-spacing', '.08em');
+ [['NAME', -70], ['DATE', 20], ['CAUSE OF DEATH', 120]].forEach(([k, y]) => {
+ T(rec, k, { x: -240, y, size: 26, fill: '#6a6258', font: SANS, weight: 500 }).setAttribute('letter-spacing', '.1em');
+ mk('path', { d: `M-240 ${y + 22}H240`, stroke: MAPLINE, 'stroke-width': 2 }, rec);
+ });
+ [['scrawl', -70], ['scrawl', 20]].forEach(([, y]) => mk('path', { d: `M-60 ${y - 4}c30 -14 50 10 80 -4s40 -10 70 2s40 -8 60 -2`, fill: 'none', stroke: MAPINK, 'stroke-width': 3 }, rec));
+ const qm = T(rec, '?', { x: 120, y: 132, size: 70, fill: MAPINK, font: SERIF, anchor: 'middle', o: 0 });
+ tw(rec, { o: 1, y: 600 }, m('never') - .5, .4, out);
+ tw(qm, { o: 1 }, m('never') + .3, .2);
+ sfx('uncounted', m('never') - .5, 'page', .6);
word(s, 'Never counted', CX - 20, 1150, m('never'), { size: 130, fill: LIGHT, stroke: DARK });
// the diagram: bars, no numbers
s = shot(p, tA, undefined, { bg: MAPLAND, swipe: true });
@@ -120,18 +160,20 @@ const BEATS = [
const p = panel(0);
const s = shot(p, 0, undefined, { bg: DARK, whip: true });
const e18 = m('eighteen'), e27 = m('twentyseven');
- const dots = dotGrid(s, 352, 16, CX - 20 - 304, 380, 38);
+ const dots = dotGrid(s, 352, 16, CX - 20 - 304, 400, 37);
dots.forEach((d, i) => { if (i < 71) { fillDot(d, RED); tw(d, { o: 1 }, .1 + i * .006, .1, lin); } });
- const n = T(s, '7.1 MILLION', { x: CX - 20, y: 260, size: 110, fill: RED, font: SANS, weight: 600, anchor: 'middle' });
- const l = caps(s, 'confirmed deaths', 330, 0, { fill: LIGHT });
- caps(s, 'one dot: 100,000 people', 1260, .3, { size: 26 });
- dots.slice(71).forEach((d, i) => tw(d, { o: .55 }, e18 + i * .004, .12, lin));
- prog(() => { fitNum(n, '18.5 – 35.2 MILLION', 110); l.textContent = 'ESTIMATED DEATHS'; }, e18, 0, lin);
+ const n = T(s, '7.1 MILLION', { x: CX - 20, y: 300, size: 100, fill: RED, font: SANS, weight: 600, anchor: 'middle' });
+ const l = caps(s, 'confirmed deaths', 360, 0, { fill: LIGHT });
+ caps(s, 'one dot: 100,000 people', 1270, .3, { size: 26 });
+ // the range drawn: brighter rings to 18.5 million (185), fainter on to 35.2 million (352)
+ dots.slice(71).forEach((d, i) => tw(d, { o: i + 71 < 185 ? .9 : .4 }, e18 + i * .004, .12, lin));
+ prog(() => { fitNum(n, '18.5 – 35.2 MILLION', 100); l.textContent = 'ESTIMATED DEATHS'; }, e18, 0, lin);
sfx('estimate', e18, 'whoosh', .4);
dots.slice(71, 274).forEach((d, i) => { prog(() => fillDot(d, DIM_RED), e27 + i * .004, 0, lin); tw(d, { o: 1 }, e27 + i * .004, .12, lin); });
- prog(() => { fitNum(n, '≈ 27 MILLION', 110); l.textContent = 'MOST LIKELY'; }, e27, 0, lin);
+ prog(() => { fitNum(n, '≈ 27 MILLION', 100); l.textContent = 'MOST LIKELY'; }, e27, 0, lin);
sfx('estimate', e27, 'thud', 1);
- srcTag(s, 'Excess deaths, The Economist, to Jan 2024 · via Wikipedia', 50, 150, 0);
+ hide(srcTag(s, 'Confirmed: Wikipedia, as of 18 Sep 2026', 50, 150, 0), e18 - .05, .05, lin);
+ srcTag(s, 'Excess deaths, The Economist, to Jan 2024 · via Wikipedia', 50, 150, e18);
}],
// 4. Not evenly: every age on one scale, then at ten, 100,000 dots and two of them red
@@ -145,8 +187,8 @@ const BEATS = [
bar(s, x, B, 90, v, HM / 15, i === 5 ? RED : MAPINK, .1 + i * .12, .4);
T(s, String(age), { x: x + 45, y: B + 50, size: 40, fill: MAPINK, font: SANS, weight: 600, anchor: 'middle' });
});
- caps(s, 'risk of dying once infected, by age', 300, 0, { size: 32, fill: MAPINK });
- word(s, 'Not evenly', CX - 20, 230, m('evenly'), { size: 100, fill: MAPINK });
+ caps(s, 'risk of dying once infected, by age', 380, 0, { size: 32, fill: MAPINK });
+ word(s, 'Not evenly', CX - 20, 310, m('evenly'), { size: 100, fill: MAPINK });
srcTag(s, 'Infection fatality ratio by age · Wikipedia', 50, 150, 0);
// 250 x 400 = 100,000 dots as one pattern fill; the two red ones are real circles, ringed as the camera pulls out
s = shot(p, t10, undefined, { bg: DARK, whip: true });
@@ -155,7 +197,8 @@ const BEATS = [
mk('circle', { cx: C / 2, cy: C / 2, r: C * .3, fill: LIGHT, opacity: .55 }, pt);
const RD = [[61, 217], [188, 96]].map(([i, j]) => [X0 + (i + .5) * C, Y0 + (j + .5) * C]);
const cam = G(s, {});
- rect(cam, X0, Y0, 250 * C, 400 * C, { fill: 'url(#k100)' });
+ const pat = rect(cam, X0, Y0, 250 * C, 400 * C, { fill: 'url(#k100)' });
+ const flat = rect(cam, X0, Y0, 250 * C, 400 * C, { fill: LIGHT, opacity: 0 }); // the dots' mean tone: pi .3² x .55
const rings = RD.map(([x, y]) => { mk('circle', { cx: x, cy: y, r: C * .38, fill: RED }, cam); return mk('circle', { cx: x, cy: y, r: 3, fill: 'none', stroke: RED, 'stroke-width': .4 }, cam); });
// the camera: close on the first red dot at the frame's centre, out to the whole field by "hundred thousand";
// the dot glides from the centre to its own place, so it never leaves the frame
@@ -164,9 +207,11 @@ const BEATS = [
const z = z0 * (1 / z0) ** q, sx = CX - 20 + (fx - CX + 20) * q, sy = 720 + (fy - 720) * q;
put(cam, { x: sx - fx * z, y: sy - fy * z, s: z });
rings.forEach(r => { r.setAttribute('r', 26 / z); r.setAttribute('stroke-width', 5 / z); });
+ const k = ramp01(3.2 - z, 0, 1.6);
+ pat.setAttribute('opacity', 1 - k); flat.setAttribute('opacity', .155 * k);
}, t10, t1 - t10, io);
const top = G(s, {});
- label(top, 'Age 10', CX - 20, 250, t10 + .05, { size: 70, fill: LIGHT, colour: DARK });
+ label(top, 'Age 10', CX - 20, 290, t10 + .05, { size: 70, fill: LIGHT, colour: DARK });
label(top, '2 in 100,000', CX - 20, 1200, m('two'), { size: 80, fill: RED, colour: LIGHT });
srcTag(top, 'Infection fatality ratio · Wikipedia · 250 × 400 dots', 50, 150, t10);
}],
@@ -175,17 +220,18 @@ const BEATS = [
['eightyfive', 'Age 85', (m, D) => {
const p = panel(0);
const s0 = shot(p, 0, undefined, { bg: DARK, whip: true });
- const push = G(s0, { x: CX - 20, y: 720 }); // a slow push over the beat, so the held grid keeps moving
- tw(push, { s: 1.15 }, 0, D + .8, lin);
- const s = G(push, { x: -(CX - 20), y: -720 });
+ const push = G(s0, { x: CX - 20, y: 760 }); // a gentle push, then on into the stamp once it lands
+ tw(push, { s: 1.06 }, 0, m('times'), lin);
+ tw(push, { s: 1.2 }, m('times') + .2, D + .6 - m('times'), lin);
+ const s = G(push, { x: -(CX - 20), y: -760 });
const f15 = m('fifteen');
- label(s0, 'Age 85', CX - 20, 250, 0, { size: 70, fill: LIGHT, colour: DARK });
- const dots = dotGrid(s, 100, 10, CX - 20 - 320, 380, 64, 24);
+ label(s0, 'Age 85', CX - 20, 290, 0, { size: 70, fill: LIGHT, colour: DARK });
+ const dots = dotGrid(s, 100, 10, CX - 20 - 320, 440, 64, 24);
dots.forEach(d => put(d, { o: .8 }));
dots.slice(0, 15).forEach((d, i) => { prog(() => fillDot(d, RED), f15 + i * .07, 0, lin); });
for (let k = 0; k < 5; k++) sfx('eightyfive', f15 + k * .2, 'tick', .5);
- label(s, '15 in 100', CX - 20, 1150, f15 + .2, { size: 80, fill: RED, colour: LIGHT });
- stamp(s, '× 7,500', CX - 20, 760, m('times'), { size: 150 });
+ label(s0, '15 in 100', CX - 20, 1240, f15 + .2, { size: 80, fill: RED, colour: LIGHT });
+ stamp(s, '× 7,500', CX - 20, 790, m('times'), { size: 150 });
srcTag(s0, 'Infection fatality ratio · Wikipedia', 50, 150, 0);
}],
@@ -197,17 +243,20 @@ const BEATS = [
photo(s, 'ep5-vial', 0, tF + .3, { s0: 1.0, s1: 1.18, dx: 20, dim: .2 });
word(s, 'The vaccines', CX - 20, 1150, m('vax'), { size: 130, fill: LIGHT, stroke: DARK });
s = shot(p, tF, undefined, { bg: DARK });
- const c = 26, x0 = CX - 20 - 8 * c;
- const dead = dotGrid(s, 352, 16, x0, 350, c);
+ const c = 24, x0 = CX - 20 - 9 * c, g = G(G(s, { x: CX - 20, y: 398 }), { x: -(CX - 20), y: -398 }); // pushed from its top edge, clear of the header
+ tw(g.parentNode, { s: 1.05 }, tF, D + .8 - tF, lin);
+ const dead = dotGrid(g, 352, 18, x0, 410, c);
dead.forEach((d, i) => { if (i < 274) fillDot(d, i < 71 ? RED : DIM_RED); put(d, { o: i < 274 ? .5 : .25 }); });
- caps(s, 'died', 340, tF, { size: 26, x: x0 - 14, anchor: 'end' });
- const more = dotGrid(s, 198, 16, x0, 350 + 22 * c + 24, c);
- more.forEach((d, i) => { d.setAttribute('stroke', BLUE); if (i < 144) fillDot(d, BLUE); tw(d, { o: i < 144 ? 1 : .55 }, t14 - .2 + i * .006, .12, lin); });
- caps(s, 'saved', 350 + 22 * c + 34, t14, { size: 26, x: x0 - 14, anchor: 'end', fill: BLUE });
- const n = T(s, '', { x: CX - 20, y: 220, size: 96, fill: BLUE, font: SANS, weight: 600, anchor: 'middle', o: 0 });
- fitNum(n, '14.4 – 19.8 MILLION', 96); tw(n, { o: 1 }, t14, .25);
- caps(s, 'deaths prevented · Dec 2020 – Dec 2021', 285, tF + .1, { size: 28, fill: LIGHT });
- caps(s, 'one dot: 100,000 people', 1275, tF + .3, { size: 26 });
+ caps(g, 'died, 2020 – 2023 (estimate)', 398, tF, { size: 24 });
+ const y2 = 410 + 20 * c + 46, more = dotGrid(g, 198, 18, x0, y2, c), tT = t14 + .9; // "to twenty"
+ // the low estimate fills in through "first year … fourteen", the rest of the range draws out on "to twenty"
+ more.forEach((d, i) => { d.setAttribute('stroke', BLUE); if (i < 144) fillDot(d, BLUE);
+ tw(d, { o: i < 144 ? 1 : .6 }, i < 144 ? tF + .3 + i * (t14 - tF - .3) / 144 : t14 + .1 + (i - 144) * (tT - t14) / 54, .12, lin); });
+ caps(g, 'saved in the first year', y2 - 12, tF + .3, { size: 24, fill: BLUE });
+ const n = T(s, '', { x: CX - 20, y: 290, size: 90, fill: BLUE, font: SANS, weight: 600, anchor: 'middle', o: 0 });
+ fitNum(n, '14.4 – 19.8 MILLION', 90); tw(n, { o: 1 }, t14, .25);
+ caps(s, 'deaths prevented · Dec 2020 – Dec 2021', 345, tF + .1, { size: 28, fill: LIGHT });
+ caps(g, 'one dot: 100,000 people', y2 + 11 * c + 40, tF + .3, { size: 24 });
sfx('saved', t14, 'thud', 1);
srcTag(s, 'June 2022 study (Watson et al., Lancet) · via Wikipedia', 50, 150, tF);
}],
@@ -217,55 +266,66 @@ const BEATS = [
const p = panel(0);
const s = shot(p, 0, undefined, { bg: MAPLAND, whip: true });
const cam = G(s, { x: CX - 20, y: 720 });
- tw(cam, { s: 1.1 }, 0, D + .8, lin);
+ tw(cam, { s: 1.14 }, 0, D + .8, lin);
const g = G(cam, { x: -(CX - 20), y: -720 });
- label(g, '5 May 2023', CX - 20, 290, 0, { size: 70, fill: MAPINK, colour: MAPLAND });
- const card = G(g, { o: 0, y: 30 });
+ label(s, '5 May 2023', CX - 20, 285, 0, { size: 70, fill: MAPINK, colour: MAPLAND });
+ const card = G(g, { o: 0, y: 60 });
rect(card, 60, 360, 740, 400, { fill: '#f8f4ea', stroke: MAPLINE, 'stroke-width': 3, rx: 6 });
caps(card, 'World Health Organization', 430, 0, { size: 30, fill: '#6a6258' });
const hl = G(card, {});
['“I declare COVID-19 over', 'as a global health', 'emergency.”'].forEach((l, i) =>
T(card, l, { x: CX - 20, y: 520 + i * 66, size: 58, fill: MAPINK, font: SERIF, anchor: 'middle' }).setAttribute('font-style', 'italic'));
T(card, 'Tedros Adhanom Ghebreyesus, WHO Director-General', { x: CX - 20, y: 720, size: 24, fill: '#6a6258', font: SERIF, anchor: 'middle' });
- tw(card, { o: 1, y: 0 }, m('who'), .35, out);
- sfx('over', m('who'), 'page', .6);
+ tw(card, { o: 1, y: 24 }, m('may5') + .35, .35, out);
+ sfx('over', m('may5') + .35, 'page', .6);
marker(hl, 175, 600, 510, 66, m('emergency'), .4).setAttribute('opacity', .55);
// what many heard, in red; then struck out
caps(g, 'what many heard', 870, m('heard'), { size: 30, fill: '#6a6258' });
- const heard = T(g, 'the pandemic is over', { x: CX - 20, y: 970, size: 80, fill: RED, font: SERIF, anchor: 'middle', o: 0 });
+ const heard = T(g, 'the pandemic is over', { x: CX - 20, y: 970, size: 80, fill: MAPINK, font: SERIF, anchor: 'middle', o: 0 });
heard.setAttribute('font-style', 'italic');
tw(heard, { o: 1 }, m('pover'), .3);
- const sk = mk('path', { d: 'M110 960L750 948', stroke: MAPINK, 'stroke-width': 9, 'stroke-linecap': 'round', 'stroke-dasharray': 660, 'stroke-dashoffset': 660 }, g);
+ const sk = mk('path', { d: 'M110 960L750 948', stroke: MAPINK, 'stroke-width': 11, 'stroke-linecap': 'round', 'stroke-dasharray': 660, 'stroke-dashoffset': 660 }, g);
prog(q => sk.setAttribute('stroke-dashoffset', 660 * (1 - q)), m('never'), .3, out);
sfx('over', m('never'), 'whoosh', .5);
label(g, 'The WHO did not say that', CX - 20, 1150, m('never') + .3, { size: 60, fill: MAPINK, colour: MAPLAND });
srcTag(s, 'WHO media briefing, 5 May 2023', 50, 150, m('who'));
}],
- // 8. The map goes quiet: countries still reporting cases, lit red, go out one by one (Our World in Data)
+ // 8. The map begins to go quiet: from April to September 2023, each country that stopped reporting new cases turns
+ // grey as its last report passes (72 of them); the 7 that started again light up; 176 reporting become 111 (OWID)
['quiet', 'Quiet', (m, D) => {
const p = panel(0);
const s = shot(p, 0, undefined, { bg: NIGHT, whip: true });
- const P = QUIET.points, i0 = P.indexOf('2023-04-24'), i1 = P.indexOf('2023-09-11'), tq = m('quiet');
- const at = t => i0 + (i1 - i0) * smooth(ramp01(t, .2, tq));
- const view = t => ({ lon: 30 - t * 4, lat: 12, H: 1.12 });
- paperMap(s, D, view, { lit: (c, t) => {
- const b = QUIET.bits[c]; if (!b) return 0;
- const x = at(t), i = Math.floor(x), f = x - i, a = b[i] === '1', z = b[Math.min(i + 1, P.length - 1)] === '1';
- return (a ? 1 - f : 0) + (z ? f : 0);
- } });
+ const P = QUIET.points, i0 = P.indexOf('2023-04-24'), i1 = P.indexOf('2023-09-11'), t0 = .3, tq = m('quiet');
+ const tOf = x => t0 + (tq - t0) * (x - i0) / (i1 - i0); // a four-week point to the beat clock
+ // when each country changes: the first point it no longer reports (or reports again), a little spread so they go one by one
+ const R = seeded(5), turn = {};
+ Object.entries(QUIET.bits).forEach(([c, b]) => {
+ const was = b[i0] === '1', now = b[i1] === '1';
+ if (was === now) return;
+ let k = i0 + 1; while (k < i1 && (b[k] === '1') === was) k++;
+ turn[c] = [was ? 'off' : 'on', tOf(k - .9 + R() * .8)];
+ });
+ const state = (c, t) => { const b = QUIET.bits[c]; if (!b) return 0;
+ const tr = turn[c]; if (!tr) return b[i0] === '1' ? 1 : 0;
+ const q = ramp01(t, tr[1], tr[1] + .2); return tr[0] === 'off' ? 1 - q : q; };
+ const view = t => ({ lon: 18, lat: 14, H: 1.3 - .12 * ramp01(t, 0, D + .6) }); // a slow push, the globe held still
+ const M = paperMap(s, D, view, { lit: state });
+ greyMap(M, D, view, (c, t) => turn[c]?.[0] === 'off' ? ramp01(t, turn[c][1], turn[c][1] + .2) : 0);
+ const n0 = Object.values(QUIET.bits).filter(b => b[i0] === '1').length, flips = Object.values(turn);
+ const reporting = t => n0 + flips.reduce((k, [d, tt]) => k + (t >= tt + .1 ? (d === 'on' ? 1 : -1) : 0), 0);
const n = T(s, '', { x: CX - 20, y: 290, size: 110, fill: RED, font: SANS, weight: 600, anchor: 'middle' });
n.setAttribute('stroke', NIGHT); n.setAttribute('stroke-width', 8); n.setAttribute('paint-order', 'stroke');
caps(s, 'countries reporting new cases', 345, 0, { size: 30, fill: LIGHT });
- const dt = caps(s, '', 1110, 0, { size: 34, fill: LIGHT });
+ caps(s, '−65 since April', 395, tq, { size: 30, fill: MUTED });
+ const dt = caps(s, '', 1130, 0, { size: 34, fill: LIGHT });
const mon = d => new Date(d + 'T00:00Z').toLocaleString('en-US', { month: 'long', year: 'numeric', timeZone: 'UTC' }).toUpperCase();
- let last = -1;
+ let last = '';
clockRun(t => {
- const i = Math.round(at(t)); if (i === last) return; last = i;
- n.textContent = String(Object.values(QUIET.bits).filter(b => b[i] === '1').length);
- dt.textContent = mon(P[i]);
+ const str = reporting(t) + '|' + Math.round(i0 + (i1 - i0) * ramp01(t, t0, tq)); if (str === last) return; last = str;
+ const [k, i] = str.split('|'); n.textContent = k; dt.textContent = mon(P[+i]);
}, D, { tail: true });
- word(s, 'The map went quiet', CX - 20, 1220, tq, { size: 90, fill: LIGHT, stroke: NIGHT });
+ word(s, 'The map goes quiet', CX - 20, 1230, tq, { size: 90, fill: LIGHT, stroke: NIGHT });
srcTag(s, 'Our World in Data · new cases, last four weeks', 50, 150, 0);
}],
@@ -276,7 +336,8 @@ const BEATS = [
let s = shot(p, 0, nx, { bg: NIGHT });
const glob = G(s, { o: .7 });
Globe.clearMarks(); Globe.dot(...WUHAN);
- const view = t => { const q = smooth(ramp01(t, tw0 - .6, tw0 + .6)); return { lon: -30 + t * 3 + (WUHAN[0] + 30 - tw0 * 3) * q, lat: 12 + (WUHAN[1] - 12) * q, H: 1.15 - .4 * q }; };
+ const view = t => { const q = smooth(ramp01(t, 0, tw0 + .4)), z = smooth(ramp01(t, tw0 - .6, tw0 + .6));
+ return { lon: -30 + (WUHAN[0] + 30) * q, lat: 12 + (WUHAN[1] - 12) * q, H: 1.15 - .4 * z }; };
globeShot(glob, D + 2, view, (i, t) => t > tw0 ? 1 : 0, undefined, { on: [0, nx + .3] });
const words = G(s, {});
word(words, 'The biggest crisis', CX - 20, 330, 0, { size: 110, fill: LIGHT, stroke: NIGHT });