pigeonpy.data.epddata.source.tecojsonsource module

Provides the class to parse Teco JSON EPD data.

class pigeonpy.data.epddata.source.tecojsonsource.TecoJson(filepath=None)[source]

Bases: FileEpdSource

A class to handle EPD (Environmental Product Declaration) data stored in a JSON file structured according to the convention used in the software tool Teco (Teaser+eco), https://github.com/RWTH-E3D/Teco.

filepath

The path to the JSON file containing the EPD data. Defaults to ‘data/input/inputdata/LcaDataTeco.json’ in the current working directory.

Type:

str or Path

standards

Contains available standards for this source

Type:

list

data

Contains the EPD data in form of a dictionary using the uuids as key

Type:

dict

dataset_template

Determines the standard used for loading datasets.

Type:

EpdDataset

load(dataset_template)[source]

Initialize the dataset template and load the json file into the data attribute.

Parameters:

dataset_template (EpdDataset) – Type of EpdDataset subclass.

load_epd(epd_dataset, epd_id, _)[source]

Load the EPD data from the dict into the data array of an EpdDataset instance by iterating over the environmental indicator list and life cycle stages list of the epd_dataset to insert values at correct indices.

Parameters:
  • epd_dataset (EpdDataset) – The dataset object where EPD data will be loaded.

  • epd_id (str) – The unique identifier for the EPD dataset.

  • _ (None) – Placeholder for scenario argument. TecoJson does not contain scenarios

Raises:
  • KeyError (1) – If the given epd_id does not exist in the JSON dataset.

  • KeyError (2) – If one of the life cycle stages a1, a2 or a3 could not be found during the calculation of life cycle stage a1_a3.

contains_dataset(epd_id)[source]

Check wether a dataset exists in the loaded json data. Return True if exists, False otherwise