Skip to content

THE METADATA MODEL


This document is a field-by-field reference for the metadata JSON file that accompanies each dataset. It describes what each field means and how to fill it in, so you can write a valid metadata file for your dataset. For a step-by-step walkthrough of preparing, validating and packaging a full dataset, see Getting started. For the CSV data file format and its validation rules, see the data file format. For complete, valid metadata files, see the example datasets.

Here is the overall shape of a metadata file. The sections below describe each of these fields in detail, in the same order as they appear here:

{
    "temporalityType": "...",
    "sensitivityLevel": "...",
    "populationDescription": [...],
    "spatialCoverageDescription": [...],
    "subjectFields": [...],
    "dataRevision": {...},
    "identifierVariables": [...],
    "measureVariables": [...]
}

Root level fields

These fields describe the dataset as a whole.

temporalityType (required): The temporality type of the dataset. Must be one of:

"temporalityType": "FIXED" | "STATUS" | "ACCUMULATED" | "EVENT",
  • FIXED: A value that does not change over time for a given unit, e.g. place of birth.
  • STATUS: A value observed at specific points in time. The value is only true at one specific point in time, so start and stop are always the same date, e.g. employment status at a given date.
  • ACCUMULATED: A value accumulated over a period, e.g. yearly income.
  • EVENT: A state that is valid over a period of time. A unit can have only one state at a given point in time, but the state may change over time, e.g. marital status or place of residence.

sensitivityLevel (required): The sensitivity of the data in the dataset. Must be one of:

"sensitivityLevel": "PERSON_GENERAL" | "PERSON_SPECIAL" | "PUBLIC" | "NONPUBLIC",
  • PERSON_GENERAL: General personal data, this category applies to information that is generally handled without further notification and is not especially sensitive. Email address is an example.
  • PERSON_SPECIAL: Special category of personal data, this is a category of data that is more sensitive. Health information is an example.
  • PUBLIC: Data that is publicly available
  • NONPUBLIC: Data that is not publicly available

populationDescription (required): Description of the population of statistical units this variable's values apply to.

The population is not necessarily a population of persons, it refers to whatever set of units is represented by this variable. The unit type is identified in identifierVariables. Depending on the dataset this can be persons, enterprises, families, vehicles, accidents and so on.

Examples for a dataset where the statistical unit is PERSON:

"populationDescription": [
    {
        "languageCode": "no",
        "value": "Hovedsakelig bosatte i Norge (fnr), men noen ikke-bosatte kan inngå (dnr)"
    }
],
"populationDescription": [
    {
        "languageCode": "no",
        "value": "Variabelen omfatter personer registrert med en fullført utdanning på hovedfags-/masternivå."
    }
],

Example for a dataset where the statistical unit is TRAFIKKULYKKE (traffic accident):

"populationDescription": [
    {
        "languageCode": "no",
        "value": "Variabelen omfatter dødsulykker og andre ulykker med personskade som er meldt til politiet."
    }
],

spatialCoverageDescription (optional): The geographic area covered by the population described in populationDescription. For datasets with national coverage, the value should simply be "Norge":

"spatialCoverageDescription": [{"languageCode": "no", "value": "Norge"}],

subjectFields (required): Tag(s).

"subjectFields": [
    [{"languageCode": "no", "value": "Befolkning"}],
    [{"languageCode": "no", "value": "Husholdning"}],
    [{"languageCode": "no", "value": "Barn, Familie og husholdninger"}]
],

Datarevision

These fields describe the current publication of the dataset — that is, what's new or changed about this variable, not the databank-version in microdata.no (i.e version 54).

description (required): A short description of what's new in this publication of the variable. For a variable's first publication, "Første publisering" can be used. For later publications, you can briefly describe what has been updated, added or corrected, for example "Oppdaterte tall for 2026".

temporalEnd (optional): Use this field when the dataset has been discontinued and will no longer receive updates. - description: Explain why the dataset is no longer updated. - successors: Name the dataset(s) that replaces this dataset, if applicable.

"dataRevision": {
    "description": [{"languageCode": "no", "value": "Nye årganger."}],
    "temporalEnd": {
        "description": [
            {
                "languageCode": "no",
                "value": "Videre oppdateringer utgår pga..."
            }
        ],
        "successors": ["Navn på erstatter"]
    }
},

Identifier variables

Description of the indentifier column of the dataset. It is represented as a list in the metadata model, but currently only one identifier is allowed per dataset. The identifiers are always based on a unit. A unit is centrally defined to make joining datasets across datastores easy.

  • unitType (required): The unitType for this dataset identifier column. Must be one of the predefined unit types in microdata-tools. See complete list of unit types here. Examples of unit types are: PERSON, HUSHOLDNING, BEDRIFT, JOBB, KOMMUNE. See more unit type examples and descriptions under the Unit types section.
"identifierVariables": [
    {
        "unitType": "PERSON"
    }
],

Measure variables

Description of the measure column of the dataset. It is represented as a list in the metadata model, but currently only one measure is allowed per dataset.

If the measure column in your dataset is in fact a unit type (PERSON (FNR), BEDRIFT (ORGNR) etc.), the metadatamodel for the measure variable is different than described below. You should skip to the section Measure variables (with unitType).

  • name (required): Human readable name(Label) of the measure column. This should be similar to your dataset name. Example for PERSON_INNTEKT.json: "Person inntekt".
  • description (required): Description of the column contents. Example: "Skattepliktig og skattefritt utbytte i... "
  • dataType (required): DataType for the values in the column. One of: ["STRING", "LONG", "DOUBLE", "DATE"]
  • format (optional): More detailed description of the values. For example if dataType for the measure is DATE, you can specify YYYYMM, YYYYMMDD etc.
  • uriDefinition (optional): Link to external resource describing the measure.
  • valueDomain (required): See definition below.
"measureVariables": [
    {
        "name": [{"languageCode": "no", "value": "Person inntekt"}],
        "description": [
            {
                "languageCode": "no",
                "value": "Personens rapporterte inntekt"
            }
        ],
        "dataType": "DOUBLE",
        "valueDomain": {...}
    }
]

Value domain

A value domain describes which values are valid for the measure. There are two types of value domains:
Enumerated value domain: Used when the values are a defined set of codes, for example 1 = Mann, 2 = Kvinne.
Described value domain: Used when the values are described, e.g. by a measurement unit, for example an amount in NOK.

  • description (required in described value domain): A description of the domain. Example for the variable "BRUTTO_INNTEKT": "Beløp".
  • measurementUnitDescription (required in described value domain): A description of the unit measured. Example: "NOK"
  • measurementType (required in described value domain): A machine readable definition of the unit measured. E.g. CURRENCY, WEIGHT, LENGTH, HEIGHT, GEOGRAPHICAL.
  • uriDefinition (optional): Link to external resource describing the domain.
  • codeList (required in enumerated value domain): A code list of valid codes for the domain, description, and their validity period. The metadata fields for each item in the codelist are:
    • code (required): The code itself. Example: "0301"
    • categoryTitle (required): The category name of the code. Example: "Oslo"
    • validFrom (required): The code is valid from date YYYY-MM-DD
    • validUntil (optional): The code is valid until date YYYY-MM-DD
  • sentinelAndMissingValues (optional in enumerted value domain): A code list where the codes represent missing or sentinel values that, while not entirely valid, are still expected to appear in the dataset.
    • code (required): The code itself. Example: 0
    • categoryTitle (required): The category name of the code. Example: "Unknown value"

Here is an example of the two different value domains. The first value domain belongs to a measure for dataset where the measure is a persons accumulated gross income:

"valueDomain": {
    "uriDefinition": [],
    "description": [{"languageCode": "no", "value": "Beløp"}],
    "measurementType": "CURRENCY",
    "measurementUnitDescription": [{"languageCode": "no", "value": "NOK"}],
}
This example is what we would call a described value domain.

The second example belongs to the measure variable of a dataset where the measure describes the sex of a population:

"valueDomain": {
    "uriDefinition": [],
    "codeList": [
        {
            "code": "1",
            "categoryTitle": [{"languageCode": "no", "value": "Mann"}],
            "validFrom": "1900-01-01"
        },
        {
            "code": "2",
            "categoryTitle": [{"languageCode": "no", "value": "Kvinne"}],
            "validFrom": "1900-01-01"
        }
    ],
    "sentinelAndMissingValues": [
        {
            "code": "0",
            "categoryTitle": [{"languageCode": "no", "value": "Ukjent"}]
        }
    ]
}
We expect all values in this dataset to be either "1" or "2", as this dataset only considers "Male" or "Female". But we also expect a code "0" to be present in the dataset, where it represents "Unknown". A row with "0" as measure is therefore not considered invalid. A value domain with a code list like this is what we would call an enumerated value domain.

Measure variables (with unitType)

You might find that some of your datasets contain a unitType in the measure column as well. Let's say you have a dataset PERSON_MOR where the identifier column is a population of unitType "PERSON", and the measure column is a population of unitType "PERSON". The measure here is representing the populations mothers. Then you may define it as such:

  • unitType (required): The unitType for this dataset measure column. Must be one of the predefined unit types.
  • name (required): Human readable name(Label) of the measure column. This should be similar to your dataset name. Example for PERSON_MOR.json: "Person mor".
  • description (required): Description of the column contents. Example: "Personens registrerte biologiske mor..."
"measureVariables": [
    {
        "unitType": "PERSON",
        "name": [{"languageCode": "no", "value": "Person mor"}],
        "description": [
            {"languageCode": "no", "value": "Personens registrerte biologiske mor"}
        ]
    }
]

Unit types

These are only some of the used unit types. See the complete list of predefined unit types here.

Unit type Column should contain Represents
PERSON FNR A person
FAMILIE FNR A family
FORETAK ORGNR A foretak
BEDRIFT ORGNR A bedrift
HUSHOLDNING FNR A husholdning
JOBB FNR_ORGNR A job. FNR belongs to the employee, ORGNR to the employer.
KOMMUNE Kommune number A kommune
KURS FNR_KURSID A course. FNR belongs to the participant, KURSID is the NUDB course id.
KJORETOY FNR_REGNR A vehicle. FNR is the owner, REGNR is the vehicle's registration number.

Need a unit type that isn't listed?

Unit types are centrally defined and maintained by the microdata.no developers. If your dataset's identifier or measure doesn't fit any of the existing types, open an issue to request a new one.