@mark1russell7/guidebook-preparedness 0.7.49 → 0.7.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@mark1russell7/guidebook-preparedness",
4
- "version": "0.7.49",
4
+ "version": "0.7.51",
5
5
  "description": "The preparedness content of the guidebook: cited sources, the steps and marked gaps of 12 cases and 6 cuts, 40 topics in 12 areas, and the catalog of offline bundles.",
6
6
  "keywords": [
7
7
  "guidebook",
@@ -58,7 +58,7 @@
58
58
  "dependencies": {
59
59
  "@mark1russell7/guidebook": "0.7.0",
60
60
  "@mark1russell7/guidebook-library": "0.5.0",
61
- "@mark1russell7/guidebook-plans": "0.3.9",
61
+ "@mark1russell7/guidebook-plans": "0.3.11",
62
62
  "@mark1russell7/guidebook-topics": "0.1.9",
63
63
  "@mark1russell7/vex": "^0.20.2"
64
64
  },
@@ -0,0 +1,12 @@
1
+ // The share of the harm of each cause that a step averts, by the id of the step. Each share is a fact of its source, with its interval.
2
+ // A step gets a share only when a source gives a count for it. A step with no read gets no share, not a guess.
3
+
4
+ import type { Averted } from "@mark1russell7/guidebook-plans";
5
+
6
+ /** The averted shares of each step, by the `id` of the step. A test holds that each key is the id of a step. */
7
+ export const STEP_AVERTS: Readonly<Record<string, readonly Averted[]>> = {
8
+ // New Mexico, 1980 to 1995: 136 deaths from unintentional CO poisoning that a fire did not cause, with no detector in use.
9
+ // An alarm with a sound can avert the deaths with no alcohol in the blood (78 of 136). Each detector can avert the deaths of persons with no alcohol that were awake (51 of 136).
10
+ // The authors give approximately half. The interval is 51 to 78 of 136.
11
+ "power.grid.ready.co-alarms": [{ cause: "co-poisoning", value: 0.5, low: 0.375, high: 0.574, source: "yoon-co-detectors" }],
12
+ };
@@ -0,0 +1,21 @@
1
+ // The groups of persons that each step protects, by the id of the step. Each group is in `PERSON_GROUPS` of `@mark1russell7/guidebook-plans`.
2
+ // A step gets a group only when its action names the persons of the group: infants and baby formula, children, older adults or pregnancy.
3
+ // A step that names a child under 2 gets the groups `infant` and `child`.
4
+
5
+ import type { PersonGroup } from "@mark1russell7/guidebook-plans";
6
+
7
+ /** The groups of persons that each step protects, by the `id` of the step. A test holds that each key is the id of a step. */
8
+ export const STEP_PERSONS: Readonly<Record<string, readonly PersonGroup[]>> = {
9
+ "met.tropical.hurricane.warned.neighbors": ["older-adult"],
10
+ "met.tropical.hurricane.P3.mold": ["child"],
11
+ "met.heat.extreme.P1.check": ["older-adult"],
12
+ "fire.structure.ready.children": ["child"],
13
+ "fire.wildfire.P1.n95": ["infant", "child"],
14
+ "infra.supply-chain.food.ready.household": ["infant"],
15
+ "infra.supply-chain.food.P2.formula": ["infant"],
16
+ "cbrne.nuclear-detonation.P2.pregnant-care": ["pregnant"],
17
+ "security.armed-conflict.P3.children": ["child"],
18
+ "water.main.P1.unsafe": ["infant"],
19
+ "network.access.P5.teach-children": ["child"],
20
+ "food.retail.P3.share-by-need": ["child"],
21
+ };
@@ -314,4 +314,6 @@ export const SOURCES: readonly Source[] = [
314
314
  { id: "tccc-guidelines", title: "Tactical Combat Casualty Care (TCCC) Guidelines, 01 May 2026", url: "https://www.naemt.org/docs/default-source/tccc/tccc-guidelines-_-updated-may-2026.pdf", license: "all-rights-reserved", checked: "2026-11-24", by: "Committee on Tactical Combat Casualty Care, Joint Trauma System (copy of NAEMT)" },
315
315
  { id: "pnnl-leadacid", title: "2020 Grid Energy Storage Technology Cost and Performance Assessment: Lead-Acid Batteries (DOE/PA-0204)", url: "https://www.pnnl.gov/sites/default/files/media/file/LeadAcid_Methodology.pdf", license: "all-rights-reserved", checked: "2026-11-24", by: "Pacific Northwest National Laboratory" },
316
316
  { id: "pnnl-storage", title: "Native Renewables, Inc. Analysis of Small-Scale Storage Options (PNNL-33634)", url: "https://www.pnnl.gov/main/publications/external/technical_reports/PNNL-33634.pdf", license: "all-rights-reserved", checked: "2026-11-24", by: "Pacific Northwest National Laboratory" },
317
+ // The averted share of the step co-alarms is a fact of the abstract. The full text was not read.
318
+ { id: "yoon-co-detectors", title: "Deaths From Unintentional Carbon Monoxide Poisoning and Potential for Prevention With Carbon Monoxide Detectors (JAMA 1998, 279(9), 685-687)", url: "https://pubmed.ncbi.nlm.nih.gov/9496987/", license: "all-rights-reserved", checked: "2026-11-26", by: "Yoon, Macdonald and Parrish" },
317
319
  ];
package/src/data/steps.ts CHANGED
@@ -4,6 +4,8 @@
4
4
  import type { Phase, Society, Step } from "@mark1russell7/guidebook-plans";
5
5
  import { app, key, lit, ref, serialize } from "@mark1russell7/vex";
6
6
  import type { Expr } from "@mark1russell7/vex";
7
+ import { STEP_AVERTS } from "./averts.ts";
8
+ import { STEP_PERSONS } from "./persons.ts";
7
9
  import { STEP_USES } from "./uses.ts";
8
10
 
9
11
  /** One row of a key: the phase, a short name, the action, the sources and the needs that the step protects. */
@@ -14,6 +16,7 @@ type Row = readonly [phase: Phase, name: string, action: string, sources: readon
14
16
  /**
15
17
  * This function makes the steps of a key from its rows. The order of a step is its position among the rows of its phase.
16
18
  * The items that a step uses come from `STEP_USES`, by the id of the step.
19
+ * Its groups of persons come from `STEP_PERSONS`, and its averted shares come from `STEP_AVERTS`.
17
20
  */
18
21
  function stepsOf(on: string, rows: readonly Row[]): Step[] {
19
22
  const count = new Map<Phase, number>();
@@ -23,7 +26,9 @@ function stepsOf(on: string, rows: readonly Row[]): Step[] {
23
26
  count.set(phase, order);
24
27
  const id = `${on}.${phase}.${name}`;
25
28
  const uses = STEP_USES[id];
26
- return { id, on, phase, needs, do: action, ...(uses === undefined ? {} : { uses }), order, sources, ...(reasoning === undefined ? {} : { reasoning }), ...(society === undefined ? {} : { society }), ...(when === undefined ? {} : { when }) };
29
+ const persons = STEP_PERSONS[id];
30
+ const averts = STEP_AVERTS[id];
31
+ return { id, on, phase, needs, do: action, ...(uses === undefined ? {} : { uses }), ...(persons === undefined ? {} : { persons }), ...(averts === undefined ? {} : { averts }), order, sources, ...(reasoning === undefined ? {} : { reasoning }), ...(society === undefined ? {} : { society }), ...(when === undefined ? {} : { when }) };
27
32
  });
28
33
  }
29
34