Category schemes

Note

Additional information about how category schemes can be used to drive processes like creating a filesystem layout to archive data is available in the following tutorial:

Model for SDMX Categories.

An example of a category scheme is one which categorises data, sometimes known as a subject matter domain scheme or a data category scheme.

class pysdmx.model.category.Category(id: str, name: str | None = None, description: str | None = None, categories: Sequence[Category] = (), dataflows: Sequence[DataflowRef] = ())

A category, ie a way to organize and group things.

Categories are used to organize and group other artefacts in SDMX. A typical example would be to organize dataflows by topics (e.g. derivatives, exchange rates, etc.)

Categories can be nested, up to any level of depth and, therefore, a category is iterable.

id

The category ID (e.g. TOPIC_001)

name

The category name (e.g. “Locational banking statistics”)

description

Additionale descriptive information about the category (e.g. “These statistics cover the balance sheets of internationally active banks.”)

categories

The sub-categories, i.e. the categories belonging to the category.

dataflows

The list of dataflows attached to the category.

class pysdmx.model.category.CategoryScheme(id: str, name: str, agency: str, description: str | None = None, version: str = '1.0', categories: Sequence[Category] = ())

An immutable collection of categories, likes a list of topics.

A category scheme is maintained by its agency, typically, an organisation like the BIS, the ECB, the IMF, SDMX, etc.

A category scheme has an identifier and a name. It may also have a description and version.

A category scheme is iterable.

While every category contains the list of dataflows attached to it, the dataflows property of the CategoryScheme can be used to retrieve (as a set) the list of dataflows attached to any of the categories in the scheme.

id

The identifier for the scheme (e.g. STAT_SUBJECT_MATTER).

name

The scheme name (e.g. “SDMX Statistical Subject-Matter Domains”).

agency

The maintainer of the scheme (e.g. SDMX).

description

Additional descriptive information about the scheme (e.g. “The SDMX Content Guidelines for Statistical Subject-Matter Domains”).

version

The scheme version (e.g. 1.0)

categories

The list of top level categories in the scheme.

property dataflows: Sequence[DataflowRef]

Return the dataflows attached to any category in the scheme.