Plan 010: the indicator-catalogue fixes that need no decision
The four items from the Samfunnspuls gap report that are unambiguous — a missing fylke key, an indicator with no values, a hidden classification hierarchy, and a population table absent from the catalogue.
IMPLEMENTATION RULES: Before implementing this plan, read and follow:
- WORKFLOW.md - The implementation process
- PLANS.md - Plan structure and best practices
Status: Backlog
Depends on: nothing. Deliberately carved out of INVESTIGATE-samfunnspuls-replacement-gaps so it is not held behind [Q1]–[Q5], which all need Terje.
Last Updated: 2026-09-29
Problem Summary
An outside consumer rebuilt Samfunnspuls on Atlas and listed eight gaps. Five need a decision. These four do not — they are defects or omissions with one obviously correct answer, and each cost that consumer real work.
⚠️ One of them is the opposite of what the report asked for, and is the most valuable item here. See Phase 2.
Phase 1: kommune_ngo_totals gains its fylke keys
Tasks
- Add
fylke_nrandfylke_nametomart_kommune_ngo_totals, joined fromdim_kommune, matching the shape the indicator relations already have. - Document both columns.
🔵 The consumer had to join kommune_ngo_totals against kommune_befolkning_alder purely to get a
fylke name — joining a supply relation to a population table to obtain geography neither owns.
Validation
GET /kommune_ngo_totals?select=kommune_nr,fylke_nr,fylke_name&limit=1returns all three.- Row count unchanged at 357.
fylke_nris null for no active kommune.
Phase 2: 🔴 publish the classification depth that ¬ encodes
Tasks
- Add
hierarchy_levelto the crime indicator relations: the count of leadingU+00ACincontents_label, as a derived column beside the verbatim label. - Leave
contents_labelexactly as SSB publishes it. - State on the relation that rows of differing
hierarchy_levelare a hierarchy and must not be summed. - Explain the marker in
meta_dimensionsfor the crime sources.
🔴 Do not strip the character. Measured on indicators__ssb_08484: 0 ¬ is
"Alle lovbruddsgrupper" (the total), 5 ¬ is "Tyveri fra fritidsbolig" (a leaf). It is correctly
encoded U+00AC, not mojibake, and it is the only thing distinguishing a total from its own
components. Removing it would edit source data and make silent over-counting easier.
Validation
hierarchy_levelis 0 for1AAAAA-9ZZZZz__*and 5 for1ABEBZ__*.contents_labelis byte-identical to before the change for all 37 distinct labels.- A test asserts that no crime
contents_labelhas had characters removed.
Phase 3: the empty indicator and the absent population table
Tasks
ssb-12063/KOSfritidredleie0000haskommuner_with_value = 0— exactly one such indicator. Decide between excluding it fromindicator_summaryand flagging it; flag, do not delete, so its absence stays visible rather than becoming another silent omission.ssb-07459is absent fromindicator_summaryand reachable only throughkommune_befolkning_alder. Say so in the catalogue, so a generic client is not left concluding Atlas has no population data.
Validation
- A generic client reading only
indicator_summarycan tell thatKOSfritidredleie0000has no values without querying it. - Searching the catalogue for population finds a pointer to
kommune_befolkning_alder.
Phase 4: the discontinued crime code system
Tasks
ssb-crime-tablescarries 2014-era codes (01__…, covering 64–83 kommuner) alongside 2025 codes (1AAAAA-9ZZZZz__…, 283–356 kommuner).- Mark the older series
discontinuedrather than removing it — old series remain correct for the years they cover, and a consumer joining historical data needs them.
⚠️ The kommune counts are the tell: a 2025 series covering 64 kommuner would look like a coverage defect. It is a retired classification.
Validation
- Every crime indicator carries an explicit era marker.
- No row is deleted.
Acceptance Criteria
-
kommune_ngo_totalsexposesfylke_nrandfylke_name; 357 rows unchanged -
hierarchy_levelpublished;contents_labelbyte-identical; a test enforces that - The relation says that differing levels must not be summed
- The one valueless indicator is flagged, not deleted
-
indicator_summarypoints atkommune_befolkning_alderfor population - Retired crime codes are marked
discontinued, none removed - Every new column documented; all gates green
- 🔴 Deploy request names, per relation, what should appear and the expected count
⚠️ Not in this plan, on purpose
[Q1] time series · [Q2] fylke and national values · [Q3] unit metadata · [Q4] the 15 missing sources · [Q5] titles and topics. All need Terje. Carving them out is what lets this plan ship without waiting.