All people groups: count the DOXA groups again
Some checks are pending
build-gate / build (push) Waiting to run
Some checks are pending
build-gate / build (push) Waiting to run
The legend read "DOXA people groups 0". The prayer API source maps its ROP3 (imb_reg_of_people_3) to peopleGroupCountry and maps no peopleGroupId, which is the only field the DOXA set read, so the set was empty and every group fell through to its GSEC colour. Read peopleGroupCountry too: the legend now shows 2,622 DOXA rows, the count the raw API and peoplegroups.org data predict, and the four categories still sum to all 12,379 rows.
This commit is contained in:
parent
c469edadca
commit
0cdf079fc4
1 changed files with 4 additions and 1 deletions
|
|
@ -163,7 +163,10 @@ async function buildFeatures() {
|
|||
])
|
||||
const doxaSet = new Set()
|
||||
for (const pg of doxa) {
|
||||
const rop = String(pg.peopleGroupId || pg.rop3 || '')
|
||||
// The prayer API's ROP3 is imb_reg_of_people_3, which sources.json normalises to
|
||||
// peopleGroupCountry — the API source maps NO peopleGroupId (only the CSV source does). Reading
|
||||
// peopleGroupId alone left this set empty and the legend read "DOXA people groups 0".
|
||||
const rop = String(pg.peopleGroupId || pg.rop3 || pg.peopleGroupCountry || '')
|
||||
if (!rop) continue
|
||||
doxaSet.add(rop)
|
||||
if (!doxaBySlugRop.has(rop)) doxaBySlugRop.set(rop, { slug: pg.slug || '', name: pg.name || '' })
|
||||
|
|
|
|||
Loading…
Reference in a new issue