Energy¶
Energy emissions are computed based on the consumption, the emission factors for a specified fuel type and a share (of the heated area or the used electricity).
- class co2calculator.api.energy.Energy[source]¶
- from_electricity(consumption: float, country_code: str, fuel_type: str | None = None, own_share: float = 1.0)[source]¶
Calculate emissions from electricity consumption
- Parameters:
consumption – energy consumption
country_code (str) – 2-letter ISO country code
fuel_type – energy mix used for electricity (see ElectricityFuel in constants.py)
own_share – the research group’s approximate share of the total electricity energy consumption. Value range 0 to 1.
- from_heating(consumption: float, in_kwh: bool = False, fuel_type: str | None = None, own_share: float = 1.0)[source]¶
Calculate emissions from heating consumption
- Parameters:
consumption – energy consumption
in_kwh – if True, consumption is in kWh
fuel_type – energy mix used for heating (see HeatingFuel in constants.py)
own_share – the research group’s approximate share of the total heating energy consumption. Value range 0 to 1.
For the emission factors, see Emission factors
Heating¶
Heating consumption is expected in different units, depending on the fuel type, e.g., litres of oil or kg of wood chips. The consumption will first be converted to kWh, based on common conversion factors, and then be multiplied by the emission factor. See the table below for the expected units per fuel type. For all fuel types, the consumption can also be specified in kWh. In this case, the in_kwh flag must be set to True.
fuel_type |
unit |
conversion_value |
|
---|---|---|---|
0 |
oil |
l |
10.6 |
1 |
liquid gas |
kg |
14.1 |
2 |
coal |
kg |
6.0 |
3 |
wood pellets |
kg |
5.4 |
4 |
wood chips |
kg |
5.2 |
5 |
gas |
m^3 |
10.8 |
The parameter own_share accounts for the fact, that the heating energy consumption may often only be known for an entire building, while a person/group/etc. just occupies parts of the building. In this case, the (approximate) share of the building floor space, that is occupied by the working group can be provided. The own_share must be between 0.0 and 1.0 and is 1.0 by default.
Electricity¶
Electricity emissions are computed based on the consumption (in kWh) and the emission factors for a specified energy mix or energy source.