Skip to main content

Estimation of GHG emissions based on energy consumption in Brazil, broken down by 51 and 68 distinct activities.

Project description

Description of the BenToTru Package

BenToTru

This package estimates the emissions of certain greenhouse gases (CO2, CH4, N2O, NOx, CO, and SO2) generated by energy consumption in Brazil. It uses the annual energy consumption data provided by the Energy Research Company (EPE) and the emission factors provided by the IPCC (1996 revision) and adapted by the NGO Economia e Energia (E&E) to Brazilian conditions. The result is the emissions by economic sector (IPCC structure) and by product (diesel, electricity, alcohol, etc).

In addition to estimating emissions for the 22 sectors, the package also breaks down these emissions into 51 or 68 sectors (according to the IBGE structure). To perform this disaggregation, we use an adaptation of the method by Montoya et al. (2013) which is described here.

For the structure based on 51 sectors, we have data spanning from 2000 to 2022. For the one based on 68 sectors, the available data covers the period from 2010 to 2022. In addition to data related to economic sectors, we've also incorporated information regarding emissions attributed to households. A detailed description of the functions is provided in the following sections.

How to Install BenToTru

The most recent version of the BenToTru package is 0.0.21. The main module, which is also the fastest because it uses matrix operations instead of loops, is 'btt'.

pip install BenToTru==0.0.21
from BenToTru import btt as btt

Estimating Emissions

You require three main pieces of information to estimate emissions: year, type of GHG, and number of sectors. The available gasses are: ('CO2', 'CH4', 'N2O', 'NOx', 'CO', and 'SO2'). The available sector numbers are: ('51' and '68'). The available years are: '2000' to '2022' for '51' sectors and '2010' to '2022' for '68' sectors.

sys = btt.system('2010','68','t','CO2')

Don't worry about the 'level' variable for now, which can be 't' or 't-1'. Its function is related to the creation of distribution coefficients ('t': considers current values, 't-1': considers values lagged by one period).

Estimating emissions for households

The 'system' function is preset to account for emissions from the 'household' sector. If you don't want this information in the final data, set the parameter to 'False'.

sys = btt.system('2010','68','t','CO2',household=False)

Selecting the Estimation Method

The 'btt' module offers two methods for emission estimation: the 'exact' method and the 'non-exact' method. The distinctions between them are detailed in this file (here). At its core, the 'exact' method ensures that the total emissions for the 22 sectors (following the IPCC structure) match the disaggregated emissions of either '51' or '68' activities (based on the IBGE structure). It is equally precise in attributing the exact emissions for each activity. The 'non-exact' method exhibits the opposite characteristics (it is the Montoya te la (2013) method using the TRU table instead of MIP table). The 'exact' method will automatically be used; but, if you want to use the 'non-exact' method simply set the 'exact_estimation' parameter to False.

sys = btt.system('2010','68','t','CO2',exact_estimation=False)

Variables of the 'system' Class

The table below outlines all the variables of the 'system' class. Our primary variable of interest is 'sys.emission_tru', which represents the amount of emissions generated from the consumption of the 17 products and distributed across all TRU activities. The unit for this variable is Gg of GHG.

Variable Description Structure/Note Unit
sys.ben Original data from BEN. Matrix with 20 sectors and 27 products 10³ tep
sys.ben_reduced Data from BEN considering only products that emit GHG. Matrix with 20 sectors and 17 products 10³ tep
sys.tru_CI_energy Original data from TRU only for products that emit GHG. Matrix with 51 or 68 sectors (plus household) and 17 products Market price values (BRL)
sys.ben_to_tru_products Dictionary mapping between BEN products and TRU products.
sys.ben_to_tru_sectors Dictionary mapping between BEN sectors and TRU sectors.
sys.coef1 Coefficients for distribution of tep values. Matrix with 51 or 68 sectors (plus household) and 17 products BRL/BRL
sys.tep Tep values distributed for TRU sectors (Only for 'non-exact' model). Matrix with 51 or 68 sectors (plus household) and 17 products 10³ tep
sys.coef2 Conversion factors for tep values into emissions (Only for 'non-exact' model). Matrix with 51 or 68 sectors (plus household) and 17 products Gg of GHG per 10³ tep
sys.emission_tru Emissions for the N TRU sectors. Matrix with 51 or 68 sectors (plus household) and 17 products Gg of GHG
sys.emission_ben Emissions for the J BEN sectors. (Only for 'exact' model). Matrix with 20 sectors and 27 products Gg of GHG
sys.emission_tru_adjusted Emissions for the N TRU sectors. Adjusted to MCTI units and coefficients. Matrix with 51 or 68 sectors (plus household) and 17 products Gg of CO2e_GWP_SAR

Graphical Representation

What truly interests us is the time series that illustrates the evolution of emissions generated by a specific TRU activity. The code below demonstrates how to obtain and visually represent this series.

import pandas as pd
df = btt.system('2010','68','t','CO2').emission_tru
df['year'] = '2010'
for i in ['2011','2012','2013','2014','2015','2016','2017','2018','2019','2022']:
   try:
       df_ = btt.system(i,'68','t','CO2').emission_tru
       df_['year'] = i
       df = pd.concat([df, df_])
   except:
       print('error')
import matplotlib.pyplot as plt

df_h = df[df.index == 'RESIDENCIAL']

df_h.plot(x='year', y='GÁS NATURAL', marker='o', linestyle='-')
plt.title("Emission of CO2 by households from the consumption of natural gas.")
plt.xlabel("Year")
plt.ylabel("Gg of GHG")
plt.grid(True)
plt.show()

Alt text

Mapping from BEN Sectors to TRU

A sector (J) in BEN encompasses various TRU activities. The function X simplifies the transformation of a DataFrame from the BEN structure to the TRU structure. Let's say you want to understand the emissions from sector (J) and product (i), but represented in terms of activities.

J = 1 #sector ‘SETOR ENERGÉTICO’
i = 1 #product ‘CARVÃO VAPOR’
btt.map_ben_to_tru(sys,sys.emission_tru,J,i)[0]

CO2 Equivalent Emissions

To simplify the communication of the amount of GHGs emitted, the standard unit used is CO2 equivalent emissions (CO2e). The amount of GHG released can be converted into CO2e using the Global Warming Potential (GWP) metric published in the Second Assessment Report (SAR) by the IPCC (1995). Brazil adopts this measurement to report its emissions, as per Decree no. 9,578/2018. The sixth emissions report provides the conversion table between GHG and CO2e (MCTI, 2022).

gas GWP 100 years (SAR) GWP 100 years (AR5) GTP 100 years (AR5)
CO2 1 1 1
CH4 21 28 4
CH4 fossil 21 30 6
N2O 310 265 234
HFC-23 11,700 12,400 12,700
HFC-32 650 677 94
HFC-125 2,800 3,170 967
HFC-134a 1,300 1,300 201
HFC-143a 3,800 4,800 2,500
HFC-152 140 16 2
CF4 6,500 6,630 8,040
C2F6 9,200 11,100 13,500
SF6 23,900 23,500 28,200

This table is what we use to convert direct GHGs (CO2, CH4, and N2O) into equivalent amounts of CO2 (variable: CO2_GWP_SAR).

sys_co2 = btt.system('2010','68','t','CO2')
sys_ch4 = btt.system('2010','68','t','CH4')
sys_n2o = btt.system('2010','68','t','N2O')
CO2e_GWP_SAR = sys_co2.emission_tru + (sys_ch4.emission_tru * 21) + (sys_n2o.emission_tru * 310)

CO2 Equivalent Emissions (adjustment)

Despite the high correlation, our data is not comparable to MCTI's data. One possible reason is that MCTI discloses its emissions in terms of the amount of carbon, while we estimate in terms of CO2. Another reason is the scale of the data presented (in tons or Gg tons). A third, more important factor, is the conversion factors used by MCTI (more up-to-date and detailed by type of fuel use).

To solve this problem, we estimated correction coefficients for our data using official MCTI data. All coefficients and methodology are described in the methodology (here).

Now our data of CO2 equivalent emission (btt) are in the same unit and are comparable to the official MCTI data (sirene).

Alt text

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

BenToTru-0.0.26.tar.gz (345.6 kB view hashes)

Uploaded Source

Built Distribution

BenToTru-0.0.26-py3-none-any.whl (369.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page