Top-level functions

nomenclature.process(df, dsd, dimensions=None, processor=None)[source]

Function for validation and region aggregation in one step

This function is the recommended way of using the nomenclature package. It performs the following operations:

  • Validation against the codelists and criteria of a DataStructureDefinition

  • Region processing, which can occur via one or more Processor instances. This can be:
    • Region aggregation (via RegionProcessor), which renames and aggregates based on user-provided mappings.
      1. Model native regions not listed in the model mapping will be dropped

      2. Model native regions can be renamed

      3. Aggregation from model native regions to “common regions”

    • NUTS aggregation (via NutsProcessor), which aggregates NUTS3 -> NUTS2 -> NUTS1 -> Country -> EU27(+UK)

  • Validation of consistency across the variable hierarchy

Parameters:
dfpyam.IamDataFrame

Scenario data to be validated and aggregated.

dsdDataStructureDefinition

Codelists that are used for validation.

dimensionslist of str, str, optional

Dimensions to be used in the validation, defaults to all dimensions defined in dsd.

processorProcessor or list of Processor, optional

One or more processors to apply. Runs before any config-declared processors.

Returns:
pyam.IamDataFrame

Processed scenario data

Raises:
ValueError

If the pyam.IamDataFrame fails the validation.