bw2io.extractors.ecospold1#
Classes#
Functions#
|
Try to get nested attribute, and fail gracefully. |
|
Just because the spec says it must be there doesn't mean it will be. |
Module Contents#
- class bw2io.extractors.ecospold1.Ecospold1DataExtractor[source]#
- classmethod extract(path: str | pathlib.Path | io.StringIO, db_name: str, use_mp: bool = True)[source]#
Extract data from ecospold1 files.
- Parameters:
path (str) – Path to the directory containing the ecospold1 files or path to a single file.
db_name (str) – Name of the database.
use_mp (bool, optional) – If True, uses multiprocessing to parallelize extraction of data from multiple files, by default True.
- Returns:
List of dictionaries containing data from the ecospold1 files.
- Return type:
list
- classmethod process_dataset(dataset: pyecospold.model_v1.Dataset, filename: str | pathlib.Path | io.StringIO, db_name: str)[source]#
- classmethod process_exchange(exc, dataset)[source]#
Process exchange.
Input groups are:
Materials/fuels
Electricity/Heat
Services
FromNature
FromTechnosphere
Output groups are:
Reference product
Include avoided product system
Allocated byproduct
Waste to treatment
ToNature
A single-output process will have one output group 0; A MO process will have multiple output group 2s. Output groups 1 and 3 are not used in ecoinvent.
- classmethod process_file(filepath: str | pathlib.Path | io.StringIO, db_name: str)[source]#
Process a single ecospold1 file.
- Parameters:
filepath (str) – Path to the ecospold1 file.
db_name (str) – Name of the database.
- Returns:
List of dictionaries containing data from the ecospold1 file.
- Return type:
list