message_ix_models.model.material.data_util.get_region_map

message_ix_models.model.material.data_util.get_region_map() Mapping[str, str][source]

Construct a mapping from “COUNTRY” IDs to regions (nodes in the “R12” codelist).

These “COUNTRY” IDs are produced by a certain script for processing the IEA Extended World Energy Balances; this script is not in message_ix_models; i.e. it is not the same as tools.iea.web. They include some ISO 3166-1 alpha-3 codes, but also other values like “GREENLAND” (instead of “GRL”), “KOSOVO”, and “IIASA_SAS”.

This function reads the material-region annotation on items in the R12 node codelist, expecting a list of strings. Of these:

  • The special value “*” is interpreted to mean “include the IDs all of the child nodes of this node (i.e. their ISO 3166-1 alpha-3 codes) in the mapping”.

  • All other values are mapped directly.

The return value is cached for reuse.

Returns:

Mapping from e.g. “KOSOVO” to e.g. “R12_EEU”.

Return type:

dict