logo

Data Structure

EPD

Let's imagine that you have downloaded an ILCD formatted EPD.
You can now convert it using LCAx's converter:

from pathlib import Path
import lcax

ilcd_file = Path("ilcd.json")

epd = lcax.convert_ilcd(ilcd_file.read_text())

It is now possible to access the impact data on the EPD object.

from pathlib import Path
from lcax import convert_ilcd, ImpactCategoryKey, LifeCycleModule

ilcd_file = Path("ilcd.json")

epd = convert_ilcd(ilcd_file.read_text())

gwp_a1a3 = epd.impacts[ImpactCategoryKey.GWP][LifeCycleModule.A1A3]
print(gwp_a1a3)
# 1.91881

You can also save the EPD as a LCAx formatted JSON file and load it back into Python memory.

from pathlib import Path
from lcax import convert_ilcd, EPD

ilcd_file = Path("ilcd.json")

epd = convert_ilcd(ilcd_file.read_text())

epd_file = Path("epd.lcax.json")
epd_file.write_text(epd.dumps())

new_epd = EPD.loads(epd_file.read_text())