Transport energy model projections (item.model
)¶
The transportenergy/item_mip_data_processing repository contains R scripts for iTEM MIP3 (2019–2020).
The transportenergy/database repository contains:
R scripts for the iTEM MIP2 (2016–2017).
Python tools for preparing data submission templates and plotting mode data.
On separate pages:
The sub-modules of item.model
read from the Excel reporting templates (BP, ExxonMobil, IEA, ITF, and MESSAGE) or GAMS GDX file (EPPA5), and perform manipulations specific to each model.
|
Return the names of all models in version. |
|
|
|
Load regions.yaml for model name in database version. |
|
Load scenarios.yaml for model name in database version. |
|
Load model database |
- item.model.concat_versions(dataframes={})[source]¶
Convert a dict of dataframes to a single pd.DataFrame.
The keys of dataframes are saved in a new column ‘version’.
- item.model.load_model_data(version, skip_cache=False, cache=True, fmt=<class 'pandas.core.frame.DataFrame'>, options=[])[source]¶
Load model database
- item.model.load_model_scenarios(name, version)[source]¶
Load scenarios.yaml for model name in database version.
Returns a dictionay where:
Keys are codes or names of scenarios.
Values are dictionaries with the key:
category
: either ‘reference’ or ‘policy’.
- item.model.make_regions_csv(out_file, models=None, compare=None)[source]¶
Produce a CSV out_file with a country→region map for models.
The table is created by parsing the regions.yaml files in the iTEM model database metadata. It is indexed by ISO 3166 (alpha-3) codes, and has one column for each model in models (if no models are specified, all models are included).
If compare is given, the table has entries only where the generated value and
- item.model.make_regions_yaml(in_file, country, region, out_file)[source]¶
Convert a country→region map from CSV in_file to YAML out_file.
country and region are columns in in_file with country codes and region names, respectively.