load impacts

Module collection functions to load the information about impact per generation unit type.

ecodynelec.preprocessing.load_impacts.country_from_excel(mapping, place)[source]

Load the mapping of a given country (place) from an excel file (mapping).

ecodynelec.preprocessing.load_impacts.extract_UI(parameters: Parameter, path_ui, ctry: list | None = None, target: str = 'CH', residual: bool = False, cst_imports: bool = False)[source]

Function to extract and modify the UI vector from a .csv file

ecodynelec.preprocessing.load_impacts.extract_mapping(ctry, mapping_path=None, cst_import=False, residual=False, target='CH', is_verbose=False)[source]

Function to build the impact matrix from mapping stored in files.

Parameters:
  • ctry (list) – list of countries to load the impacts of

  • mapping_path (str, default to None) – .xlsx file where to find the mapping data

  • cst_import (bool, default to False) – whether to consider all impacts of non-traget countres as the impact of ‘Other’

  • residual (bool, default to False) – whether to consider production residual for the target country

  • target (str, default to ‘CH’) – the target country

  • is_verbose (bool, default to False) – to display information

ecodynelec.preprocessing.load_impacts.extract_network_mapping(ctry, mapping_path=None, is_verbose=False)[source]

Function to build the network impact dict from mapping stored in files.

Parameters:
  • ctry (list) – list of countries to load the impacts of

  • mapping_path (str, default to None) – .xlsx file where to find the mapping data

  • is_verbose (bool, default to False) – to display information

ecodynelec.preprocessing.load_impacts.get_impact_units(mapping)[source]

Read the units of impacts from the mapping

ecodynelec.preprocessing.load_impacts.other_from_excel(mapping)[source]

Load the mapping for ‘Other’ from an excel file (mapping).

ecodynelec.preprocessing.load_impacts.residual_from_excel(mapping, place)[source]

Load impact data of the production residual and add it to the impact matrix.

Parameters:
  • mapping (str) – path to file with the mapping

  • place (str) – country tag of the country

Returns:

table with the matrix of impacts per unit type, with the impact of residual production is added.

Return type:

pandas.DataFrame

ecodynelec.preprocessing.load_impacts.select_ui_indexes(ui, ctry: list | None = None, residual: bool = False)[source]

Selects relevant rows from complete UI vector

ecodynelec.preprocessing.load_impacts.set_constant_impacts(impacts, constant)[source]

Set the impacts to a constant value

ecodynelec.preprocessing.load_impacts.set_constant_imports(ui, target: str = 'CH')[source]

Set the impacts of non-target countries to average Entsoe