bw2io.extractors.ecospold1_lcia#

Classes#

Ecospold1LCIAExtractor

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

Module Contents#

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

Bases: object

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

None#
extract()[source]#

Extracts data from an ecospold XML file.

parse_method()[source]#

Parses the ecospold XML dataset to extract information.

parse_cf()[source]#

Parses an ecospold XML data element to extract characterization factor information.

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

Extracts ecospold XML file data.

Parameters:

path (str) – The path to the ecospold XML file or directory.

Returns:

A list of dictionaries with the extracted information.

Return type:

list

classmethod parse_cf(cf)[source]#

Parse a cf object and extract relevant data.

Parameters:

cf (dict) – A dictionary of cf data.

Returns:

A dictionary of parsed cf data.

Return type:

dict

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:
  • ds (object) – The XML dataset.

  • filepath (str) – The path to the XML file.

Returns:

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

Return type:

dict