bw2io.extractors.ecospold1
#
Module Contents#
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. |
- 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#
- pathstr
Path to the directory containing the ecospold1 files or path to a single file.
- db_namestr
Name of the database.
- use_mpbool, optional
If True, uses multiprocessing to parallelize extraction of data from multiple files, by default True.
Returns#
- list
List of dictionaries containing data from the ecospold1 files.
- 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.