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 of a DataStructureDefinition

  • Region-processing, which can consist of three parts:
    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”

  • 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, optional

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

processorRegionProcessor, optional

Region processor to perform region renaming and aggregation (if given)

Returns:
pyam.IamDataFrame

Processed scenario data

Raises:
ValueError

If the pyam.IamDataFrame fails the validation.