Skip to content

Category Scheme

A Category Scheme is an item scheme of Categories, used to classify other structures (see Categorisation). Categories are hierarchical: a child category is nested inside its parent rather than referencing a parent by id. Documents start ref: "CategoryScheme=AGENCY:ID(1.0)".

Simple form

A category with an English name only, and no children, is written as ID: "name".

format: "fusion-yaml(1.0.0)"
ref: "CategoryScheme=ECB:FLAT_CS(1.0.1)"
name: "TEST"
items:
- INTEREST_RATES: "INTEREST_RATES-name"
- EXCHANGE_RATES: "EXCHANGE_RATES-name"
Source: categoryscheme/testFlatScheme.yaml

The document starts with the common header. The body is:

  • items: the top level categories, in scheme order, written as described in Items.

Complex form

A category becomes an object when it has child categories, as well as for the usual reasons (a description, a non-English name, a uri, annotations or links). Its children are written in a nested items array with the same layout, to any depth.

format: "fusion-yaml(1.0.0)"
ref: "CategoryScheme=SDMX:STAT_SUBJECT_MATTER(1.0.1)"
name: "TEST"
items:
- DEMO_SOCIAL_STAT:
    name: "Demographic and social statistics"
    items:
    - LABOUR: "Labour"
    - HEALTH: "Health"
    - INCOME_CONSUMP: "Income and consumption"
- ECO_STAT:
    name: "Economic statistics"
    items:
    - ECO_ACCOUNTS: "Economic accounts"
    - SECTORAL_STAT:
        name: "Sectoral statistics"
        items:
        - AGRI_FOREST_FISH: "Agriculture, forestry, fisheries"
        - ENERGY: "Energy"
- MACROECO_STAT: "Macroeconomic statistics"
Source: categoryscheme/testHierarchicalScheme.yaml

  • MACROECO_STAT and the leaf categories have only an English name, so they stay in the simple form.
  • DEMO_SOCIAL_STAT, ECO_STAT and SECTORAL_STAT have children, so they are objects holding name and items.

Within a category object, the nested items are written after the names and uri, and before the annotations and links. For example, a category with a French name, a description and an annotation:

- ECO_STAT:
    name: "Economic statistics"
    name-fr: "Statistiques économiques"
    description: "Economic statistics by sector"
    items:
    - ECO_ACCOUNTS: "Economic accounts"
    annotations:
    - id: "ANN"
      title: "Reviewed"

Field reference

Field Value Written when
partial true The scheme is partial.
items Array of categories The scheme has at least one category.
items[].ID String (the English name), or an object Always, one entry per category.
items[].ID.name, name-xx Localised text The category has the name.
items[].ID.description, description-xx Localised text The category has the description.
items[].ID.uri String The category has a URI.
items[].ID.items Array of child categories, same layout as items The category has children.
items[].ID.annotations Annotations The category has annotations.
items[].ID.links Links The category has links.

A category is written in the simple form when it has exactly one name, in English, no description, no uri, no annotations, no links and no child categories.