bw2io.extractors.simapro_lcia_95project_csv#

Exceptions#

EndOfDatasets

Common base class for all non-exit exceptions.

Classes#

SimaProLCIA95ProjectCSVExtractor

Extract data from SimaPro LCIA 9.5 Project CSV file format.

Module Contents#

exception bw2io.extractors.simapro_lcia_95project_csv.EndOfDatasets[source]#

Bases: Exception

Common base class for all non-exit exceptions.

Initialize self. See help(type(self)) for accurate signature.

class bw2io.extractors.simapro_lcia_95project_csv.SimaProLCIA95ProjectCSVExtractor[source]#

Extract data from SimaPro LCIA 9.5 Project CSV file format.

Differs from SimaProLCIACSVExtractor in that this format seems not to use End at the end of sections.

Parameters:
  • filepath (str) – Filepath of the SimaPro LCIACSV file.

  • delimiter (str, optional (default: ";")) – Delimiter used in the SimaPro LCIACSV file.

  • encoding (str, optional (default: "cp1252")) – Encoding of the SimaPro LCIACSV file.

Raises:

AssertionError – If the filepath does not exist or the file is not a valid SimaPro export file.

Returns:

List of impact categories extracted from the SimaPro file.

Return type:

list

classmethod clean_sections(sections: list) list[source]#

Remove empty sections, and empty lines from sections

classmethod extract(filepath: pathlib.Path, delimiter: str = ';', encoding: str = 'cp1252')[source]#
classmethod parse_cf(line)[source]#

Parse line in Substances section.

  1. category

  2. subcategory

  3. flow

  4. CAS number

  5. CF

  6. unit

  7. damage rate

classmethod split_into_sections(data: list) list[source]#

Split the SimaPro file into sections using the blank line pattern