Product Environmental Footprint#
This notebook is an exploration on the calculations in [ZP19]
The Circular Footprint Formula (Equation 3):
Material: \((1 -R_1)E_v + R_1\left(AE_{recycled}+(1-A)E_v*{Q_{sin}\over Q_p}\right) + (1-A)R_2\left(E_{recyclingEoL}-E^*_V{Q_{Sout} \over Q_P}\right)\)
Energy: \((1-B)R_3(E_{ER}-\mathrm{LHV} X_{ER,heat}E_{SE,heat}-\mathrm{LHV} X_{ER,elev}E_{SE,elec})\)
Disposal: \((1-R_2-R_3)E_D\)
Annex C at: https://eplca.jrc.ec.europa.eu/permalink/Annex_C_V2.1_May2020.xlsx
def cff_material(r1,ev,a,erec,qsin,qp,r2,ereceol,esv,qsout):
recycled_input = r1
unrecycled_input = 1-r1
recycled_output = r2
my_burden = a
supplier_burden = 1-a
emission_preproc = ev
emission_preproc_prevented = esv
emission_recycle_in = erec
emission_recycle_out = ereceol
return (
unrecycled_input*emission_preproc +
recycled_input*my_burden *emission_recycle_in +
recycled_input*supplier_burden*emission_preproc*(qsin/qp) +
recycled_output*supplier_burden*(emission_recycle_out - emission_preproc_prevented*(qsout/qp))
)
def cff_energy(b,r3,eer,lhv,xerheat, eseheat, xerelec,eseelec):
return (
(1-b)*r3*(eer - lhv*xerheat*eseheat - lhv*xerelec*eseelec)
)
def cff_disposal(r2,r3,ed):
return (1-r2-r3)*ed
import pandas as pd
PEF_ANNEX_C = "https://eplca.jrc.ec.europa.eu/permalink/Annex_C_V2.1_May2020.xlsx"
annexC_ar1r2 = pd.read_excel(PEF_ANNEX_C, "A - R1 - R2", header=[4,5,6], na_values=["-"])
# df = pd.read_excel("https://eplca.jrc.ec.europa.eu/permalink/EF3_1/EF-LCIAMethod_CF(EF-v3.1).xlsx")
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
File ~/.local/share/virtualenvs/sustainability-3l_tGrBB/lib/python3.11/site-packages/pandas/compat/_optional.py:142, in import_optional_dependency(name, extra, errors, min_version)
141 try:
--> 142 module = importlib.import_module(name)
143 except ImportError:
File /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/importlib/__init__.py:126, in import_module(name, package)
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
File <frozen importlib._bootstrap>:1204, in _gcd_import(name, package, level)
File <frozen importlib._bootstrap>:1176, in _find_and_load(name, import_)
File <frozen importlib._bootstrap>:1140, in _find_and_load_unlocked(name, import_)
ModuleNotFoundError: No module named 'openpyxl'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
Cell In[2], line 5
1 import pandas as pd
3 PEF_ANNEX_C = "https://eplca.jrc.ec.europa.eu/permalink/Annex_C_V2.1_May2020.xlsx"
----> 5 annexC_ar1r2 = pd.read_excel(PEF_ANNEX_C, "A - R1 - R2", header=[4,5,6], na_values=["-"])
7 # df = pd.read_excel("https://eplca.jrc.ec.europa.eu/permalink/EF3_1/EF-LCIAMethod_CF(EF-v3.1).xlsx")
File ~/.local/share/virtualenvs/sustainability-3l_tGrBB/lib/python3.11/site-packages/pandas/io/excel/_base.py:478, in read_excel(io, sheet_name, header, names, index_col, usecols, dtype, engine, converters, true_values, false_values, skiprows, nrows, na_values, keep_default_na, na_filter, verbose, parse_dates, date_parser, date_format, thousands, decimal, comment, skipfooter, storage_options, dtype_backend)
476 if not isinstance(io, ExcelFile):
477 should_close = True
--> 478 io = ExcelFile(io, storage_options=storage_options, engine=engine)
479 elif engine and engine != io.engine:
480 raise ValueError(
481 "Engine should not be specified when passing "
482 "an ExcelFile - ExcelFile already has the engine set"
483 )
File ~/.local/share/virtualenvs/sustainability-3l_tGrBB/lib/python3.11/site-packages/pandas/io/excel/_base.py:1513, in ExcelFile.__init__(self, path_or_buffer, engine, storage_options)
1510 self.engine = engine
1511 self.storage_options = storage_options
-> 1513 self._reader = self._engines[engine](self._io, storage_options=storage_options)
File ~/.local/share/virtualenvs/sustainability-3l_tGrBB/lib/python3.11/site-packages/pandas/io/excel/_openpyxl.py:548, in OpenpyxlReader.__init__(self, filepath_or_buffer, storage_options)
533 @doc(storage_options=_shared_docs["storage_options"])
534 def __init__(
535 self,
536 filepath_or_buffer: FilePath | ReadBuffer[bytes],
537 storage_options: StorageOptions = None,
538 ) -> None:
539 """
540 Reader using openpyxl engine.
541
(...)
546 {storage_options}
547 """
--> 548 import_optional_dependency("openpyxl")
549 super().__init__(filepath_or_buffer, storage_options=storage_options)
File ~/.local/share/virtualenvs/sustainability-3l_tGrBB/lib/python3.11/site-packages/pandas/compat/_optional.py:145, in import_optional_dependency(name, extra, errors, min_version)
143 except ImportError:
144 if errors == "raise":
--> 145 raise ImportError(msg)
146 return None
148 # Handle submodules: if we have submodule, grab parent module from sys.modules
ImportError: Missing optional dependency 'openpyxl'. Use pip or conda to install openpyxl.
annexC_ar1r2["Category"] = annexC_ar1r2["Category"].ffill()
annexC_ar1r2["Material"] = annexC_ar1r2["Material"].ffill()
# Remove unnecessary columns
annexC_ar1r2 = annexC_ar1r2.drop(axis=1, labels=[
("Parameters", "comments"),
("Parameters", "Where is the recycling rate measured"),
("Parameters", "Sources to define R1"),
("Parameters", "Sources to define R2")
])
# Fix column names
cols = []
for col in annexC_ar1r2.columns.values:
col = [c for c in col if "Unnamed" not in c and "Parameters" != c]
col = ["R2" if "Recycling rate" in c else c for c in col]
if col[0]=="R2":
col[1] = col[1][0:2] if ":" in col[1] else col[1]
cols.append("-".join(col))
annexC_ar1r2.columns = cols
# Remove filler rows
annexC_ar1r2 = annexC_ar1r2[~annexC_ar1r2["Application"].isnull()]
C:\Users\yedema21\AppData\Local\Temp\ipykernel_25732\757165217.py:5: PerformanceWarning: indexing past lexsort depth may impact performance.
annexC_ar1r2 = annexC_ar1r2.drop(axis=1, labels=[
annexC_ar1r2
Category | Material | Application | A | R1 | R2-EU | R2-BE | R2-BG | R2-CZ | R2-DK | ... | R2-NO | R2-CH | R2-ME | R2-MK | R2-RS | R2-TR | R2-BA | R2-XK | R2-collection rate | R2-sorting | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Metals | Steel | MATERIAL | 0.2 | 0.00 | 0.85 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
1 | Metals | Steel | building - sheet | 0.2 | 0.18 | 0.95 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
2 | Metals | Steel | building - stainless steel parts in copper all... | 0.2 | 0.63 | 0 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
3 | Metals | Steel | appliances - sheet | 0.2 | 0.18 | 0.9 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
4 | Metals | Steel | packaging | 0.2 | 0.58 | 0.8046 | 0.955 | 0.734 | 0.886 | 0.877 | ... | 0.877 | 0.86 | NaN | NaN | NaN | 0.57 | NaN | NaN | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
149 | Fibers | E-glass fiber | uniterruptible power supply (UPS) | 0.5 | 0.00 | 0 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
150 | Fibers | Aramid | MATERIAL | 0.5 | 0.00 | 0 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
151 | Fibers | Aramid | uniterruptible power supply (UPS) | 0.5 | 0.00 | 0 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
152 | Fillers | Talc filler | MATERIAL | 0.5 | 0.00 | 0 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
153 | Fillers | Talc filler | uniterruptible power supply (UPS) | 0.5 | 0.00 | 0 | NaN | NaN | NaN | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
131 rows × 45 columns