doxa-maps/documentation/README-embed-gospel-resources.md
Doxa Maps 60e5fdcf42 The map learned to name peoples, not just their languages
?codes= filters by LANGUAGE, which is what a partner's list usually is and the wrong
filter for a list of peoples. The reach table measured the gap in its own rows: its
Mandarin row counts 36 groups, those 36 speak 30 codes, and 55 Doxa groups speak those
30 — so a link from a 36-group row drew 55 pins. Akha's 33 drew 57; SUN's 93 drew 116.
The extra groups are real and also have nothing; they belong to a different row.

So the map takes ?groups=<slug list> and filters by people group. The slug is
doxa.life's own — carried from the roster into the pin rows, and read in the builder
off the prayer URL their API built from it, never constructed from a name, because a
slug this build invented could name somebody else's people. All 369 of those rows
carry a prayer URL, measured before relying on it.

Row and map now agree by construction: 0 of 35 rows disagree, and the Mandarin link
renders "36 / 2,107" on the map against a row claiming 36. The gate asserts exact
equality for a three-slug link and 0 for an unknown slug — the failure that would
quietly turn a partner's 40-group embed into the whole roster.

The longest link is 1,577 characters, SUN's 93 slugs; well inside what browsers carry,
but worth knowing before anyone adds a row with a thousand groups.
2026-09-27 02:40:12 +00:00

49 lines
3 KiB
Markdown

# Embedding the gospel-resources map
The map's **URL is its interface**. A partner embeds one address in an iframe and never touches it
again, so every parameter below is a promise kept by a gate
(`bun run check:embed-contract`), not a convention.
```html
<iframe src="https://<host>/dx-maps/gospel-resources/resources-map/index.html?codes=kfr,cmn,npi"
style="width:100%;height:600px;border:0" title="Gospel access"></iframe>
```
## The six addresses
| Address | What the reader gets |
|---|---|
| `?codes=<iso3,iso3,…>` | Only those languages' people groups, framed on them. Shows `74 / 2,107`, and that count is the button back to the whole map. |
| `?groups=<slug,slug,…>` | Exactly those **people groups**, by doxa.life's own slug, framed on them. Use this when your list is peoples rather than languages: a language filter shows every group speaking it, which for one bridge language was 55 pins against a list of 36. |
| `?country=<ISO3>` | That country's sheet open, framed on its groups. The country's own name also works (`?country=India`). |
| `?code=<iso3>` | The people group's sheet, with its resources. `&name=` and `&country=` disambiguate when a language has many groups. |
| `?view=zero` | The groups with **nothing found** — the question this map exists for. `?view=gap` is the same view. |
| `?tab=province&province=<name>` | On the data tables: that state's row — groups, people, what has nothing, the local way in, and who nobody is praying for. Accents are folded, so `Arunachal Pradesh` finds `Arunāchal Pradesh`. |
`?provider=maplibre` is not this map's parameter but the whole fleet's: it selects the keyless
engine, and no map ever substitutes a different one (`bun run check:engine-contract`).
## Bring your own list
The join is **ISO 639-3**, the key every resource in this map is already joined on. A partner's list
needs no agreement with Doxa's roster — only the codes their own data carries. That is the point:
this corpus is public so that other lists can stand on it.
Two things to know before you publish a link:
- **The denominator is Doxa's roster.** The research corpus holds 12,379 people groups; this map
draws the **2,107** Doxa works, so `?codes=` intersects with those. A code outside the roster
draws nothing.
- **It filters, it never invents.** A link matching none of its codes shows an empty map reading
`0 / 2,107`. That is the truth about the link — showing the full map instead would tell you your
broken list works.
## What the map does not promise
- **No zoom or centre parameter.** The frame is derived from the pins the link selects, so a link
stays correct when the data moves under it.
- **Placement is approximate.** A dot marks where a *people* is found, not a town or a boundary,
and 108 of the placed groups share a coordinate with another group. The sheet says so in the
reader's language.
- **An unknown parameter is ignored, never fatal.** `?country=ZZZ` renders the map, not an error —
a partner's typo must not break their page.