Skip to content

electricity_mix_repository

ElectricityMix(zone, adpe, pe, gwp, wue, warnings=list()) dataclass

Electricity mix of a country

Attributes:

Name Type Description
zone str

ISO 3166-1 alpha-3 code of the electricity mix zone

adpe float

Abiotic Depletion Potential of the mix (in kgSbeq / kWh)

pe float

Primary Energy of the mix (in MJ / kWh)

gwp float

Global Warming Potential of the mix (in kgCO2eq / kWh)

wue float

Water Usage Effectiveness of the mix (in L / kWh)

warnings list[WarningMessage]

Warnings linked to the electricity mix

ElectricityMixRepository(electricity_mixes)

Repository of electricity mixes.

Source code in ecologits/electricity_mix_repository.py
def __init__(self, electricity_mixes: list[ElectricityMix]) -> None:
    self.__electricity_mixes: dict[str, ElectricityMix] = {}
    for electricity_mix in electricity_mixes:
        if electricity_mix.zone in self.__electricity_mixes:
            raise ValueError(f"duplicated electricity mix with: {electricity_mix.zone}")
        self.__electricity_mixes[electricity_mix.zone] = electricity_mix