HWHeat Waves
    DashboardUtforsk
    Analyse
    Data Kilder
        • Category Codes
        • Filter Axes
        • Regions
        • Building Types
        • SSB Tables
        • API Examples
      • Catalog
      • Pipeline
      • Entrypoints
    • Design Rationale
    • Doc Map
    DocsSettings
    DashboardAtlasUtforsk
    Analyse
    Data Kilder
    1. Documentation
    2. Ingestion
    3. Adapter Mappings
    4. Category native to cat_code

    Loading documentation...

    Category native to cat_code

    ETL contract for dim_code, cat_code, native_api_code, and BRIS question ids.

    Category Mapping Table (Normalized)

    This file is the canonical category map used across adapters.

    Rules

    • dim_code is fixed:
      • 1 = Årsak (Primary Causal Factor)
      • 2 = Tennkilde (Heat Source)
      • 3 = Objekt (Item First Ignited)
      • 4 = Arnested (Area of Origin)
      • 5 = Bygningstype (Building Type) — populated by SSB; carried as metadata rows for BRASK and Police so cross-source rollups can resolve. See §6.
      • 6 = Bygningsalder (Building Age) — BRASK only; the same buckets are also exposed via the building_age filter axis. See §7.
    • cat_code is always 3 digits and scoped per dimension:
      • x00 = synthetic aggregate row for the full dimension (not a native API category)
      • x01..x97 = native category rows in sequence for that dimension
      • x98, x99 reserved for Ikke besvart (BRIS -1 missing-answer bucket); standard_code = UNKNOWN. See §5.
    • For BRASK, native_api_code is the documented numeric option id.
    • For BRIS (Police/DSB/Fire Brigade), native_api_code is the schema answer alternative id (for example 407_1, 264_2, 229_10).
    • BRIS question ids are numeric string ids (for example 227, 229, 264, 403, 405, 407, 269) and are not human labels with spaces.
    • For SSB, native_api_code is the PxWebApi ContentsCode (for example KOSboligbranner0000).
    • Category resolution at ingest: Adapters map each upstream bucket to cat_code via native_name and registry.catByNativeName (lib/data-model/adapters/_registry.ts). BRASK uses HTML row labels; BRIS uses bucket keys.
    • native_api_code in the tables below is reference metadata for each source's internal numbering — not stored in categories, not used for matching.
    • Request-time native codes are dimension/question ids (BRIS question ids like 407, SSB ContentsCode, BRASK query params) and filter-axis values (filters.native_code).

    BRIS Source-Of-Truth Question IDs

    • Årsak: Police 407 and Fire Brigade 269
    • Tennkilde: DSB 264
    • Objekt: Police 405 and DSB 229
    • Arnested: Police 403 and DSB 227
    • Strømkilde (utstyr): DSB 625 — native-only live read, never ingested (see §9)

    1) Årsak (Primary Causal Factor)

    dim_code = 1

    namedim_codesourcenative_api_codenative_namecat_codestandard_code
    Alle kategorier1ALL-All categories in dimension100ALL
    Antatt påsatt1BRASK1Antatt påsatt101INTENTIONAL
    Selvantennelse1BRASK2Selvantennelse102SPONTANEOUS_IGNITION
    Menneskelig feil1BRASK3Menneskelig feil103HUMAN_ERROR
    Teknisk svikt1BRASK4Teknisk svikt104TECHNICAL_FAILURE
    Lynnedslag1BRASK5Lynnedslag105NATURAL_PHENOMENON
    Elektrisk fenomenskade1BRASK6Elektrisk fenomenskade106INSTALLATION_FAILURE
    Annet eller ukjent1BRASK9Annet eller ukjent107UNKNOWN_OTHER
    Ukjent1Police407_9Ukjent108UNKNOWN_OTHER
    Annen årsak1Police407_8Annen årsak109UNKNOWN_OTHER
    Feil bruk1Police407_4Feil bruk110HUMAN_ERROR
    Elektrisk årsak1Police407_3Elektrisk årsak111TECHNICAL_FAILURE
    Påsatt1Police407_1Påsatt (forsettelig)112INTENTIONAL
    Åpen ild1Police407_2Åpen ild113OPEN_FLAME
    Selvtenning1Police407_6Selvtenning114SPONTANEOUS_IGNITION
    Naturlige fenomener1Police407_7Naturlige fenomener115NATURAL_PHENOMENON
    Eksplosjon1Police407_5Eksplosjon116EXPLOSION
    Ukjent1Fire Brigade269_6Ukjent117UNKNOWN_OTHER
    Annet1Fire Brigade269_5Annet118UNKNOWN_OTHER
    Feil bruk1Fire Brigade269_1Feil bruk119HUMAN_ERROR
    Feil på utstyr/produkt1Fire Brigade269_2Feil på utstyr/produkt120TECHNICAL_FAILURE
    Feil på installasjon/anlegg1Fire Brigade269_3Feil på installasjon/anlegg121INSTALLATION_FAILURE
    Påsatt1Fire Brigade269_4Påsatt122INTENTIONAL

    2) Tennkilde (Heat Source)

    dim_code = 2

    namedim_codesourcenative_api_codenative_namecat_codestandard_code
    Alle kategorier2ALL-All categories in dimension200ALL
    Ildsted2BRASK1Ildsted (ovn, peis, gasspeis)201HEARTH
    Varme arbeider2BRASK2Varme arbeider (sveising, skjæring av stål, lodding etc.)202HOT_WORKS
    Åpen ild og varme2BRASK3Åpen ild og varme (fyrstikker, røyking, stearinlys, grill)203OPEN_FLAME
    Elektroniske apparater2BRASK4Elektroniske apparater204ELECTRICAL
    Elektriske husholdningsapparater2BRASK5Elektriske husholdningsapparater205ELECTRICAL
    Fastmontert elektrisk utstyr2BRASK6Fastmontert elektrisk utstyr206ELECTRICAL
    Annet eller ukjent2BRASK9Annet eller ukjent207UNKNOWN_OTHER
    Ukjent2DSB264_7Ukjent208UNKNOWN_OTHER
    Annen2DSB264_6Annen209UNKNOWN_OTHER
    Elektrisitet2DSB264_2Elektrisitet210ELECTRICAL
    Åpen ild2DSB264_1Åpen ild211OPEN_FLAME
    Selvantennelse2DSB264_4Selvantennelse212SPONTANEOUS_IGNITION
    Naturlig fenomen2DSB264_3Naturlig fenomen213NATURAL_PHENOMENON

    3) Objekt (Item First Ignited)

    dim_code = 3

    namedim_codesourcenative_api_codenative_namecat_codestandard_code
    Alle kategorier3ALL-All categories in dimension300ALL
    Ukjent3Police405_22Ukjent301UNKNOWN
    Annet startsted3Police405_21Annet startsted302OTHER_OBJECT
    Løst elektrisk utstyr3Police405_13Løst elektrisk utstyr303ELECTRICAL_EQUIPMENT
    Fast elektrisk utstyr3Police405_12Fast elektrisk utstyr304ELECTRICAL_EQUIPMENT
    Innfelt elektrisk utstyr3Police405_14Innfelt elektrisk utstyr305ELECTRICAL_EQUIPMENT
    Faste installasjoner3Police405_11Faste installasjoner (pipe/peis/ovn)306CHIMNEY_HEARTH
    Vegg3Police405_1Vegg307STRUCTURAL_ELEMENT
    Gulv3Police405_3Gulv308STRUCTURAL_ELEMENT
    Tak3Police405_2Tak309STRUCTURAL_ELEMENT
    Avfallsbeholder/Resirkuleringsstasjon/Container3Police405_19Avfallsbeholder/Resirkuleringsstasjon/Container310WASTE_CONTAINER
    Madrass3Police405_6Madrass311FURNITURE_TEXTILES
    Sengetøy3Police405_7Sengetøy312FURNITURE_TEXTILES
    Stoppede møbler3Police405_4Stoppede møbler313FURNITURE_TEXTILES
    Klær3Police405_9Klær314FURNITURE_TEXTILES
    Gardin3Police405_8Gardin315FURNITURE_TEXTILES
    Dekorartikler/Annet løst interiør3Police405_17Dekorartikler/Annet løst interiør316FURNITURE_TEXTILES
    Andre møbler3Police405_5Andre møbler317FURNITURE_TEXTILES
    Andre tekstiler3Police405_10Andre tekstiler318FURNITURE_TEXTILES
    Gassutstyr3Police405_16Gassutstyr319GAS_EQUIPMENT
    Produksjonsmaskin3Police405_18Produksjonsmaskin320PRODUCTION_MACHINE
    Apparat for flytende brensel3Police405_15Apparat for flytende brensel321LIQUID_FUEL_APPLIANCE
    Vegetasjon3Police405_20Vegetasjon322VEGETATION
    Ukjent3DSB229_10Ukjent323UNKNOWN
    Annet startobjekt3DSB229_9Annet startobjekt324OTHER_OBJECT
    Annet utstyr3DSB229_6Annet utstyr325OTHER_EQUIPMENT
    Mat eller gjenstander på/i komfyr3DSB229_3Mat eller gjenstander på/i komfyr326STOVE_ITEMS
    Elektrisk utstyr3DSB229_5Elektrisk utstyr327ELECTRICAL_EQUIPMENT
    Skorstein eller ildsted3DSB229_4Skorstein eller ildsted328CHIMNEY_HEARTH
    Vegg, gulv eller tak3DSB229_1Vegg, gulv eller tak329STRUCTURAL_ELEMENT
    Avfallsbeholder, container eller resirkuleringsstasjon3DSB229_7Avfallsbeholder, container eller resirkuleringsstasjon330WASTE_CONTAINER
    Møbler eller tekstiler3DSB229_2Møbler eller tekstiler331FURNITURE_TEXTILES
    Vegetasjon3DSB229_8Vegetasjon332VEGETATION
    Kjøretøy3DSB229_11Kjøretøy333VEHICLE
    Papir eller emballasje3DSB229_12Papir eller emballasje334OTHER_OBJECT

    4) Arnested (Area of Origin)

    dim_code = 4

    namedim_codesourcenative_api_codenative_namecat_codestandard_code
    Alle kategorier4ALL-All categories in dimension400ALL
    Ukjent4Police403_21Ukjent401UNKNOWN
    Annet rom4Police403_20Annet rom402OTHER
    Kjøkken4Police403_1Kjøkken403KITCHEN
    Stue4Police403_2Stue404LIVING_ROOM
    Soverom4Police403_3Soverom405BEDROOM
    Loft4Police403_4Loft406ATTIC
    Kjeller4Police403_5Kjeller407BASEMENT
    Gang4Police403_7Gang408HALLWAY
    Trapperom4Police403_8Trapperom409STAIRWELL
    Våtrom4Police403_6Våtrom410WET_ROOM
    Tavlerom4Police403_15Tavlerom411SWITCHBOARD_ROOM
    Heisrom4Police403_9Heisrom412ELEVATOR_ROOM
    Felles areal4Police403_13Felles areal413COMMON_AREA
    Produksjonslokale4Police403_12Produksjonslokale414PRODUCTION_FACILITY
    Forsamlingslokale4Police403_18Forsamlingslokale415ASSEMBLY_HALL
    Salgslokale4Police403_11Salgslokale416RETAIL_SPACE
    Kontor4Police403_10Kontor417OFFICE
    Fyrrom4Police403_16Fyrrom418BOILER_ROOM
    Lager4Police403_14Lager419STORAGE
    Utvendig4Police403_19Utvendig420EXTERIOR
    Garasje4Police403_17Garasje421GARAGE
    Ukjent4DSB227_23Ukjent422UNKNOWN
    Annet4DSB227_22Annet423OTHER
    Kjøkken4DSB227_1Kjøkken424KITCHEN
    Stue4DSB227_2Stue425LIVING_ROOM
    Soverom4DSB227_3Soverom426BEDROOM
    Loft4DSB227_8Loft427ATTIC
    Kjeller4DSB227_7Kjeller428BASEMENT
    Gang4DSB227_4Gang429HALLWAY
    Trapperom4DSB227_9Trapperom430STAIRWELL
    Våtrom4DSB227_6Våtrom431WET_ROOM
    Hulrom i konstruksjon4DSB227_12Hulrom i konstruksjon432STRUCTURAL_CAVITY
    Tavlerom4DSB227_17Tavlerom433SWITCHBOARD_ROOM
    Ventilasjonsrom/teknisk rom4DSB227_25Ventilasjonsrom/teknisk rom434TECHNICAL_ROOM
    Heisrom4DSB227_10Heisrom435ELEVATOR_ROOM
    Fellesareal4DSB227_15Fellesareal436COMMON_AREA
    Skorstein4DSB227_11Skorstein437CHIMNEY
    Produksjonslokale4DSB227_14Produksjonslokale438PRODUCTION_FACILITY
    Forsamlingslokale4DSB227_20Forsamlingslokale439ASSEMBLY_HALL
    Salgslokale4DSB227_13Salgslokale440RETAIL_SPACE
    Kontor4DSB227_5Kontor441OFFICE
    Fyrrom4DSB227_18Fyrrom442BOILER_ROOM
    Lager4DSB227_16Lager443STORAGE
    Badstue4DSB227_24Badstue444SAUNA
    Utvendig4DSB227_21Utvendig445EXTERIOR
    Garasje4DSB227_19Garasje446GARAGE
    Carport4DSB227_26Carport447EXTERIOR
    Parkeringshus4DSB227_27Parkeringshus448EXTERIOR

    5) Ikke besvart (Missing-answer bucket)

    BRIS aggregate responses include a -1 bucket for missions where the relevant question was not answered. It is often the largest bucket in a slice.

    Ingest contract: upstream bucket key '-1' → catalog row with native_name = 'Ikke besvart' for that (source_id, dim_code) (via resolveCatCodeFromBrisBucket). The row’s standard_code is UNKNOWN — the cross-source semantic for “not answered / not reported” on that reserved slot. Other rows (e.g. Ukjent) will also carry UNKNOWN; they are distinct categories with their own cat_code and upstream labels, but the standard_code makes them equivalent.

    Reserved slot: x99 (or x98 when x99 is taken — e.g. Fire Brigade Årsak uses 198).

    namedim_codesourcenative_api_codenative_namecat_codestandard_code
    Ikke besvart1Police-1Ikke besvart199UNKNOWN
    Ikke besvart1Fire Brigade-1Ikke besvart198UNKNOWN
    Ikke besvart2DSB-1Ikke besvart299UNKNOWN
    Ikke besvart3Police-1Ikke besvart399UNKNOWN
    Ikke besvart3DSB-1Ikke besvart398UNKNOWN
    Ikke besvart4Police-1Ikke besvart499UNKNOWN
    Ikke besvart4DSB-1Ikke besvart498UNKNOWN

    native_api_code = -1 in this table is reference metadata for the upstream sentinel; matching at ingest uses the bucket key "-1" → native_name bridge above. See pipeline-slices-idempotency-and-triggers.md §4.1.

    6) Bygningstype (Building Type)

    dim_code = 5

    Building Type is the only analytical dimension SSB exposes for fire counts — the dataset choice (KOSboligbranner0000 vs KOSbygningsbrann0000) IS the breakdown. BRASK and Police carry parallel rows so the same dim_code = 5 key resolves consistently across sources for cross-source rollups. The matching building_type filter rows in fire_data.filters (axis = building_type) carry the request-side identity; this section covers the category-side identity.

    Allocation:

    • 501 — SSB Boligbranner (RESIDENTIAL)
    • 502 — SSB Bygningsbranner (ALL_BUILDINGS)
    • 503, 504 — BRASK metadata rows
    • 505, 506 — Police metadata rows

    These are the category-side (dim 5 cross-tab) building_type rows. RESIDENTIAL mirrors the building_type filter code; ALL_BUILDINGS is the dimension-total category for cross-tab matrices — it has no filter-axis equivalent (on the filter axis, "all buildings" is a NULL FK, not a code — see filter-axes-native-to-filter-id.md §2).

    namedim_codesourcenative_api_codenative_namecat_codestandard_code
    Boligbranner5SSBKOSboligbranner0000Boligbranner501RESIDENTIAL
    Bygningsbranner5SSBKOSbygningsbrann0000Bygningsbranner502ALL_BUILDINGS
    Beboelse5BRASK0Beboelse503RESIDENTIAL
    Alle næringer5BRASK—Alle næringer504ALL_BUILDINGS
    Bolig (kategoriene 1xx)5Police(30 leaf ids)Bolig (kategoriene 1xx)505RESIDENTIAL
    Alle bygningstyper5Police—Alle bygningstyper506ALL_BUILDINGS

    Notes:

    • The BRASK and Police rows here exist for cross-source identity only — the request-side selection happens via the building_type filter axis (lbNæring for BRASK, buildingTypes.ids for BRIS), not via a per-cat_code request. The 30 BRIS Bolig leaf IDs are documented in filter-axes-native-to-filter-id.md §2.
    • SSB writes one fact row per slice with dim_code = 5 and cat_code = 501 or 502, plus the matching building_type_code filter id (per pipeline-slices-idempotency-and-triggers.md §4.3). PxWeb ContentsCode labels and the full table-12058 variable set: ssb-pxwebapi-tables.md. BRASK and Police keep dim_code = 5 writes off the fact path — their building_type is on the filter axis instead.

    7) Bygningsalder (Building Age) — BRASK only

    dim_code = 6

    BRASK Utforsk axis index: BRASK_AXIS.bygningsalder / braskExplorerAxisId('bygningsalder') is 12 (ASP.NET explorer dropdown) — not analytical dim_code 6 in this section.

    BRASK is the only source exposing building age. The 13 native ASP.NET option ids collapse into 7 normalized buckets (matching building_age filter axis, filter-axes-native-to-filter-id.md §3). HeatWaves keeps one category row per native option to preserve fidelity, plus the synthetic 600 aggregate.

    cat_code = 600 is the synthetic "Alle" row for registry lookup only — not written to fact_yearly.

    namedim_codesourcenative_api_codenative_namecat_codestandard_code
    Alle6BRASK—Alle600ALL
    Ny6BRASK1Ny6010-5
    1-56BRASK21-56020-5
    6-106BRASK36-106036-10
    11-156BRASK411-1560411-20
    16-206BRASK516-2060511-20
    21-256BRASK621-2560621-30
    26-306BRASK726-3060721-30
    31-406BRASK831-4060831-50
    41-506BRASK941-5060931-50
    51-756BRASK1051-7561051+
    76-1006BRASK1176-10061151+
    Over 1006BRASK12Over 10061251+
    Ukjent6BRASK99Ukjent613UNKNOWN

    Same notes as §6: the BRASK building_age filter axis carries the same mapping at the filter table layer; this section is the category-side identity. The two share standard_code values so the registry can resolve either lookup direction. Two BRASK native values (1 and 2) collapse to the 0-5 standard bucket — when querying by normalized bucket the adapter must send both native ids.

    8) SSB Nøkkeltall (Key metrics) — native-only live read

    dim_code = 7, source_id = 5 (SSB table 12058)

    All 34 PxWeb ContentsCode variables are catalog rows with is_native_only = true. They are not written to fact_yearly; Explore reads them live via lib/data-model/native/providers/source-5-table-12058.ts.

    FieldRole
    native_namePxWeb ContentsCode (e.g. KOSBDU338nok0000) — sent upstream
    standard_codeEnglish semantic topic group (shared by metrics in one Emne cluster)
    cat_codeStable integer series identity within a group (701–734)

    Group standard_code values (migration 20260608170415_ssb_dim7_standard_codes_by_group.sql):

    standard_codeEmne labelcat_code rows
    FIRE_AND_COMPENSATIONBrann og erstatning701–706
    EMERGENCY_DISPATCHUtrykning og beredskap707, 708, 716
    CHIMNEY_AND_SWEEPINGPiper og feiing709–712, 727
    MAN_YEARSÅrsverk713–715
    HIGH_RISK_OBJECTSA-objekt og tilsyn717–719
    GROSS_OPEXBrutto driftsutgifter720–726
    NET_OPEXNetto driftsutgifter728–734

    Explore URL: cat_standard (single token). Default FIRE_AND_COMPENSATION. Legacy nokkelgruppe=brann bookmarks map to the same codes. Grouping logic: lib/data-model/ssb-nokkelgrupper.ts. Full variable list: ssb-pxwebapi-tables.md.

    9) Strømkilde (utstyr) — BRIS native-only live read

    dim_code = 8, source_id = 4 (DSB), BRIS question 625 («Hvilken strømkilde hadde utstyret da brannen/branntilløpet startet?»)

    All rows are is_native_only = true — never written to fact_*. Explore reads them live via lib/data-model/native/providers/source-bris-restricted.ts (POST /restrictedaggregation, yearly only; same request body and bucket→cat_code resolution as the DSB ingest path). Seed migration 20260609223017_bris_native_stromkilde_catalog.sql.

    Native NameDim CodeSourcenative_api_codeMapped Namecat_codestandard_code
    Kun engangsbatteri8DSB625_1Kun engangsbatteri801DISPOSABLE_BATTERY
    Kun oppladbart batteri8DSB625_2Kun oppladbart batteri802RECHARGEABLE_BATTERY
    Kun strømforsyning8DSB625_3Kun strømforsyning803MAINS_POWER
    Oppladbart batteri koblet til lader/strømforsyning8DSB625_4Oppladbart batteri på lading804RECHARGEABLE_ON_CHARGER
    Ukjent8DSB625_5Ukjent805UNKNOWN
    Ikke besvart8DSB-1Ikke besvart (Strømkilde)899UNKNOWN

    Answered counts are small (low hundreds per year from 2022); the -1 bucket dominates and stays visible as its own Ikke besvart category, same as the ingested BRIS dims. New BRIS native datasets are scaffolded with node scripts/bris-native-catalog-scaffold.mjs <questionId> (probe + migration SQL + constants output; no DB writes).