residual
The module residual handles the inclusion of additional local production not considered in ENTSO-E utility-level data.
- ecodynelec.preprocessing.residual.adjust_mix_local(mix_data, local_residual, target='CH')[source]
Function to modify the mix and integrate a local residual.
- Parameters:
mix_data (pandas.DataFrame) – the electric mix table
local_prod (pandas.DataFrame) – the production and exchanges in MWh of a country
target (str, default to ‘CH’) – the target country
- Returns:
the modified mix data including low-voltage production mix.
- Return type:
pandas.DataFrame
- ecodynelec.preprocessing.residual.define_local_gap(local_prod, sg_data, gap=None)[source]
Function to define the relative part of residual in the electricity in the target country.
- Parameters:
local_prod (pandas.DataFrame) – production data for a single country
sg_data (pandas.DataFrame, default to None) – information from SwissGrid
gap (pandas.DataFrame, default to None) – information about the nature of the residual
- Returns:
the relative residual information.
- Return type:
pandas.DataFrame
- ecodynelec.preprocessing.residual.import_residual(prod, sg_data, gap)[source]
Function to insert the residue as a swiss production high voltage. Two residues are considered: hydro run off and the rest.
- Parameters:
prod (pandas.DataFrame) – the production mix of Swizerland. Rquires indexes to be datetime.
sg_data (pandas.DataFrame) – information from SwissGrid
gap (pandas.DataFrame) – information about the nature of the residual
- Returns:
production mix with the Residue
- Return type:
pandas.DataFrame
- ecodynelec.preprocessing.residual.include_global_residual(Gen=None, freq='H', sg_data=None, prod_gap=None, is_verbose=False)[source]
Function to add the residual swiss production
- Parameters:
Gen (dict) – information about all production and cross-border flows
freq (str, default to ‘H’) – the frequency of time step
sg_data (pandas.DataFrame, default to None) – information from SwissGrid
prod_gap (pandas.DataFrame, default to None) – information about the nature of the residual
is_verbose (bool, default to None) – to display information
- Returns:
dict tables containing the modified generation and cross-border flows
- Return type:
dict
- ecodynelec.preprocessing.residual.include_local_residual(mix_data=None, sg_data=None, local_prod=None, gap=None, freq='H', target='CH')[source]
Function to include a local residual directly into the electric mix information.
- Parameters:
mix_data (pandas.DataFrame) – the electric mix table
sg_data (pandas.DataFrame) – information from SwissGrid
local_prod (pandas.DataFrame) – the production and exchanges in MWh of the target country
gap (pandas.DataFrame) – information about the nature of the residual
freq (str, default to ‘H’) – the frequency of time step
target (str, default to ‘CH’) – the target country
- Returns:
mix table enhanced with local residual information
- Return type:
pandas.DataFrame