bw2io.strategies.special#

Module Contents#

Functions#

add_dummy_processes_and_rename_exchanges(db)

Add new processes to link to so-called "dummy" processes in the US LCI database.

bw2io.strategies.special.add_dummy_processes_and_rename_exchanges(db)[source]#

Add new processes to link to so-called “dummy” processes in the US LCI database.

This function adds new processes to link to dummy processes found in the US LCI database and renames the exchanges accordingly.

Parameters#

dblist

A list of datasets containing exchanges with dummy processes.

Returns#

list

A modified list of datasets with new processes added and exchanges renamed.

Examples#

>>> db = [
        {
            "database": "uslci",
            "exchanges": [
                {
                    "name": "dummy_Production",
                    "input": ("uslci", "dummy_Production"),
                    "type": "production",
                    "amount": 1
                }
            ]
        }
    ]
>>> add_dummy_processes_and_rename_exchanges(db)
[
    {
        "database": "uslci",
        "exchanges": [
            {
                "name": "dummy_Production",
                "input": ("uslci", "Production"),
                "type": "production",
                "amount": 1
            }
        ]
    },
    {
        "name": "Production",
        "database": "uslci",
        "code": "Production",
        "categories": ("dummy",),
        "location": "GLO",
        "type": "process",
        "exchanges": [
            {
                "input": ("uslci", "Production"),
                "type": "production",
                "amount": 1
            }
        ]
    }
]