REGISTER NOW: DdS Autumn School! 🇨🇭 Grosshöchstetten (Switzerland) 🗓️ 6.-11. October 2024

bw2io.extractors.ecospold1_lcia#

Module Contents#

Classes#

Ecospold1LCIAExtractor

Extract impact assessment methods and weightings data from ecospold XML format.

class bw2io.extractors.ecospold1_lcia.Ecospold1LCIAExtractor[source]#

Bases: object

Extract impact assessment methods and weightings data from ecospold XML format.

Attributes:

None

Methods:

extract: Extracts data from an ecospold XML file. parse_method: Parses the ecospold XML dataset to extract information. parse_cf: Parses an ecospold XML data element to extract characterization factor information.

classmethod extract(path, **kwargs)[source]#

Extracts ecospold XML file data.

Parameters#

pathstr

The path to the ecospold XML file or directory.

Returns#

list

A list of dictionaries with the extracted information.

classmethod parse_cf(cf)[source]#

Parse a cf object and extract relevant data.

Parameters#

cfdict

A dictionary of cf data.

Returns#

dict

A dictionary of parsed cf data.

Raises#

TypeError

If ‘cf’ is not a dictionary.

Notes#

This method expects ‘cf’ to contain the following keys: - meanValue (float): the amount - category (str): the category - subCategory (str, optional): the subcategory, if any - name (str): the name - unit (str): the unit of the amount

If subCategory is not provided, it will default to None.

classmethod parse_method(ds, filepath)[source]#

Parse and extract information from an ecospold XML dataset.

Parameters#

dsobject

The XML dataset.

filepathstr

The path to the XML file.

Returns#

dict

A dictionary of the information extracted from the ecospold XML dataset.