Click a country and you now see every medium, not two of five
The country view answered the brief's second requirement with only Scripture and film. Everything added since - audio Scripture, Bible video, Zume training - was invisible there, and the predicate deciding which section a group landed in never learned about them either. So the same map contradicted itself depending on how you opened it: 559 people groups covering 61M people sat under "No resource found" in a country sheet while their own pin sheet showed a live audio Scripture link. Worst affected were Indonesia (63), Nigeria (47), China (37) and Cameroon (37). hasAny now counts all five media, and each group row chips audio, Bible video and training alongside Scripture and film - keeping the type distinctions the rest of the map insists on, so Bible video still says it is not the JESUS Film and an audio link still names which media the fileset carries. The summary above the list was hiding the largest one. It listed "Have scripture" and "Have film" and stopped, so for Indonesia it showed 77 and 265 while 269 groups there have audio Scripture - the single biggest medium in that country, absent from its own summary while the rows underneath displayed it. Verified against an expectation computed offline from the same index the page loads, not read off the page: Indonesia splits 348 with / 321 without, matching exactly, and "without" falls from 384, which is the 63 groups measured beforehand. Chip kinds now rendered include Film, Scripture, "Scripture, audio, text", "Scripture, audio, text, video", Bible video and Training. No page errors. Screenshot read.
This commit is contained in:
parent
fb7ed4566d
commit
73444655c9
9 changed files with 60 additions and 32 deletions
|
|
@ -394,7 +394,12 @@ function groupAt(i) {
|
|||
}
|
||||
}
|
||||
|
||||
const hasAny = (r) => !!(r.scripture_url || r.film_url || (r.door43 && r.door43.length))
|
||||
// EVERY medium counts, not just the two this started with. While it read only
|
||||
// scripture/film/door43, 559 people groups covering 61M people were filed under "No
|
||||
// resource found" in the country view while their own pin sheet showed a live audio
|
||||
// Scripture link — one map contradicting itself depending on which way you opened it.
|
||||
const hasAny = (r) => !!(r.scripture_url || r.film_url || r.audio || r.bible_video || r.zume_url ||
|
||||
(r.door43 && r.door43.length))
|
||||
|
||||
// Resources first — a standing decision, not a default — then largest population inside
|
||||
// each block.
|
||||
|
|
@ -414,15 +419,16 @@ const withoutResources = computed(() => groupsForCountry.value.filter((r) => !ha
|
|||
// Derived here from the same groupsForCountry the list renders, so the two cannot drift.
|
||||
const countryStats = computed(() => {
|
||||
const g = groupsForCountry.value
|
||||
let scripture = 0, film = 0, none = 0, popNone = 0, sign = 0
|
||||
let scripture = 0, film = 0, audio = 0, none = 0, popNone = 0, sign = 0
|
||||
for (const r of g) {
|
||||
if (r.scripture_url) scripture++
|
||||
if (r.film_url) film++
|
||||
if (r.audio) audio++
|
||||
if (!hasAny(r)) { none++; popNone += r.population || 0 }
|
||||
if (r.is_sign) sign++
|
||||
}
|
||||
return {
|
||||
groups: g.length, scripture, film, none, popNone, sign,
|
||||
groups: g.length, scripture, film, audio, none, popNone, sign,
|
||||
pctNone: g.length ? Math.round((1000 * none) / g.length) / 10 : 0,
|
||||
}
|
||||
})
|
||||
|
|
@ -1146,6 +1152,10 @@ useShadowStyles(
|
|||
<div class="gm-stat"><span>People affected</span><b>{{ fmt(countryStats.popNone) }}</b></div>
|
||||
<div class="gm-stat"><span>Have scripture</span><b>{{ fmt(countryStats.scripture) }}</b></div>
|
||||
<div class="gm-stat"><span>Have film</span><b>{{ fmt(countryStats.film) }}</b></div>
|
||||
<!-- Audio Scripture is counted here for the same reason it is chipped below: without
|
||||
it the summary said a country had two media when it often has three, and the
|
||||
rows underneath already showed the third. -->
|
||||
<div class="gm-stat"><span>Have audio Scripture</span><b>{{ fmt(countryStats.audio) }}</b></div>
|
||||
<div class="gm-stat" v-if="countryStats.sign"><span>Sign languages</span><b>{{ fmt(countryStats.sign) }}</b></div>
|
||||
<!-- These two are NOT derivable from the pins: they come from the curated
|
||||
country analysis, which covers a smaller set of groups. Labelled so the
|
||||
|
|
@ -1198,6 +1208,24 @@ useShadowStyles(
|
|||
:title="vtitle(g.film_url)">
|
||||
Film · {{ vchip(g.film_url).label }}
|
||||
</a>
|
||||
<!-- The other three media. A country view that shows only Scripture and film
|
||||
under-reports what is actually reachable there, and the pin sheet for the
|
||||
same group would have shown all of them. -->
|
||||
<a v-if="g.audio" class="gm-chip ok wrap" :href="g.audio.u"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
:title="g.audio.n + ' — Faith Comes By Hearing (' + (g.audio.m || 'audio') + ')'">
|
||||
Scripture, {{ g.audio.m || 'audio' }}
|
||||
</a>
|
||||
<a v-if="g.bible_video" class="gm-chip ok wrap" :href="g.bible_video.u"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
:title="g.bible_video.n + ' — Bible narrative video. This is NOT the JESUS Film. Covers: ' + (g.bible_video.sc || 'see site')">
|
||||
Bible video
|
||||
</a>
|
||||
<a v-if="g.zume_url" class="gm-chip ok" :href="g.zume_url"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
title="Zume Training publishes its discipleship course in this language.">
|
||||
Training
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
<div v-if="withResources.length > shown" class="gm-more">
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
|
||||
<!-- Bundle IIFE — registers the <gospel-resources-map> custom element. -->
|
||||
<script src="../gospel-resources.js" integrity="sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v" crossorigin="anonymous"></script>
|
||||
<script src="../gospel-resources.js" integrity="sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0" crossorigin="anonymous"></script>
|
||||
|
||||
<script>
|
||||
// Mapbox token resolution — the A3 ladder, in precedence order:
|
||||
|
|
|
|||
2
public/doxa-maps/index.html
generated
2
public/doxa-maps/index.html
generated
File diff suppressed because one or more lines are too long
12
public/doxa-maps/manifest.json
generated
12
public/doxa-maps/manifest.json
generated
|
|
@ -556,7 +556,7 @@
|
|||
"bundle": "gospel-resources",
|
||||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"output": "doxa-maps/gospel-resources/gospel-resources.js",
|
||||
"integrity": "sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v",
|
||||
"integrity": "sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0",
|
||||
"elements": [
|
||||
"gospel-resources-map"
|
||||
],
|
||||
|
|
@ -576,7 +576,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/charts/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"charts\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -590,7 +590,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/data-tables/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"data-tables\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -604,7 +604,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/gospel-dashboard/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"gospel-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"gospel-dashboard\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -618,7 +618,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/resources-list/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-list\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
@ -632,7 +632,7 @@
|
|||
"scriptUrl": "./gospel-resources/gospel-resources.js",
|
||||
"embed": {
|
||||
"iframe": "<iframe src=\"./gospel-resources/resources-map/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-qCXyQhBBNsWzQ6vlRrMmV0ikJbUegxML29oFOeiUg+TH7DhHPyT2Y41Vw08vef8v\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
"script": "<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-resources/gospel-resources.js\" integrity=\"sha384-40Kzg100jRLIsYHebc3ANR+UdWfMzrvNweScz5ou/jOYab9Owe306lYH6OIrJFp0\" crossorigin=\"anonymous\"></script>\n<gospel-resources-map profile-config='{\"profile\":\"resources-map\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-resources-map>"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue