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
Processorinstances. This can be: - Region aggregation (via
RegionProcessor), which renames and aggregates based on user-provided mappings. Model native regions not listed in the model mapping will be dropped
Model native regions can be renamed
Aggregation from model native regions to “common regions”
- Region aggregation (via
NUTS aggregation (via
NutsProcessor), which aggregates NUTS3 -> NUTS2 -> NUTS1 -> Country -> EU27(+UK)
- Region processing, which can occur via one or more
Validation of consistency across the variable hierarchy
- Parameters:
- df
pyam.IamDataFrame Scenario data to be validated and aggregated.
- dsd
DataStructureDefinition 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.- processor
Processoror list ofProcessor, optional One or more processors to apply. Runs before any config-declared processors.
- df
- Returns:
pyam.IamDataFrameProcessed scenario data
- Raises:
- ValueError
If the
pyam.IamDataFramefails the validation.