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. Regions And Cresta

    Loading documentation...

    Region Mapping (Cross-Source to 2024 Counties)

    This document defines the canonical region model for cross-source maps and choropleths.

    Goal

    Use one shared region spine for visualization across sources:

    • Canonical level: 15 Norwegian counties (2024 reform)
    • Exclude: Svalbard and Jan Mayen
    • Keep source-native region ids for drilldown and provenance

    BRIS counties.ids for pre-2024 incidents (klass 104 codes such as Viken 30) are listed only in source-api-request-examples.md (“Norwegian Fylke Code Reference”); post-2024 request ids match canonical_code in the table below.

    Canonical region set (2024, county level)

    canonical_codecanonical_name
    03Oslo
    11Rogaland
    15Møre og Romsdal
    18Nordland
    31Østfold
    32Akershus
    33Buskerud
    34Innlandet
    39Vestfold
    40Telemark
    42Agder
    46Vestland
    50Trøndelag
    55Troms
    56Finnmark

    Source-to-canonical mapping rules

    1) BRASK (Cresta-sone, pre-2020 counties)

    BRASK region ids are old county boundaries. Convert at query/render time to canonical 2024 counties:

    BRASK native_codeBRASK native_namecanonical_codecanonical_name
    (empty)AlleNULLAlle
    1Østfold31Østfold
    2Akershus32Akershus
    3Oslo03Oslo
    4Hedmark34Innlandet
    5Oppland34Innlandet
    6Buskerud33Buskerud
    7Vestfold39Vestfold
    8Telemark40Telemark
    9Aust-Agder42Agder
    10Vest-Agder42Agder
    11Rogaland11Rogaland
    12Hordaland46Vestland
    14Sogn og Fjordane46Vestland
    15Møre og Romsdal15Møre og Romsdal
    16Sør-Trøndelag50Trøndelag
    17Nord-Trøndelag50Trøndelag
    18Nordland18Nordland
    19Troms55Troms
    20Finnmark56Finnmark

    Explicit exclusions:

    • 21 (Svalbard): excluded from canonical choropleth
    • 22 (Jan Mayen): excluded from canonical choropleth
    • 99 (Ukjent): excluded from county choropleth; can be shown as "Unknown" side bucket

    2) BRIS (current administrative geography)

    BRIS supports county and municipality filters.

    • County IDs are current administrative codes.
    • Municipality IDs are finer-grain and should roll up to canonical county via municipality-to-county lookup.

    Canonical handling:

    • If BRIS county id is one of 03,11,15,18,31,32,33,34,39,40,42,46,50,55,56, map directly.
    • If BRIS data includes historical merged county ids (for example 30, 38, 54), resolve by municipality-level attribution when possible; otherwise mark as non-canonical aggregate and exclude from strict county choropleth.

    Merged county fallback mapping (only when municipality detail is unavailable):

    BRIS merged county idNameCanonical split
    30Viken31 + 32 + 33 (ambiguous without municipality detail)
    38Vestfold og Telemark39 + 40 (ambiguous without municipality detail)
    54Troms og Finnmark55 + 56 (ambiguous without municipality detail)

    Rule: do not allocate merged totals proportionally unless explicitly approved; keep as non-canonical aggregate.

    3) SSB

    Per ssb.md, region coding depends on table:

    • 12058: municipality codes (4-digit), no county selector
    • 06266, 03173, 03158: include county-level 2-digit region codes

    Canonical handling:

    • County-level SSB codes matching the 15-county list map directly.
    • Municipality-level SSB codes must be rolled up to county using municipality-to-county mapping.
    • 0 / national totals are not county entities and should not be painted as a county.

    Choropleth contract (recommended)

    For all sources, expose these fields in map-serving queries:

    • canonical_region_code (2-digit county code)
    • canonical_region_name
    • source_id
    • source_native_region_code
    • source_native_region_name
    • is_canonical (boolean)

    Rendering rules:

    1. County choropleth uses only is_canonical = true.
    2. Drilldown panel shows source-native region labels and ids.
    3. Unknown/non-canonical aggregates (for example BRIS 30, BRASK 99) are listed outside the map.

    Implementation notes for filters

    When seeding fire_data.filters:

    • Keep source-native region rows (axis='region') as-is with stable native_code.
    • Assign standard_code for every row (canonical county code, ALL, UNKNOWN, SVALBARD_JAN_MAYEN, etc.).
    • Choropleth joins use standard_code; native filters.id stays on facts for provenance.