REGISTER NOW: DdS Autumn School! 🇨🇭 Grosshöchstetten (Switzerland) 🗓️ 6.-11. October 2024

bw2io.strategies.locations#

Module Contents#

Functions#

update_ecoinvent_locations(db)

Update location names in ecoinvent database to fix inconsistencies and standardize naming.

Attributes#

GEO_UPDATE

bw2io.strategies.locations.update_ecoinvent_locations(db)[source]#

Update location names in ecoinvent database to fix inconsistencies and standardize naming.

Maps the old location names to the updated ones based on a predefined dictionary (GEO_UPDATE).

Parameters#

dblist

A list of dictionaries representing ecoinvent processes with exchanges.

Returns#

list

A list of dictionaries representing the ecoinvent processes with updated location names.

Examples#

>>> db = [
...     {
...         "name": "Process 1",
...         "location": "IAI Area 2, North America",
...         "exchanges": [{"name": "Flow 1", "location": "IAI Area 2, North America"}],
...     }
... ]
>>> update_ecoinvent_locations(db)
[
    {
        "name": "Process 1",
        "location": "IAI Area, North America",
        "exchanges": [{"name": "Flow 1", "location": "IAI Area, North America"}],
    }
]

Notes#

Includes a hardcoded mapping (GEO_UPDATE) to fix known inconsistencies in location names. This may not cover all possible inconsistencies and might need to be updated in the future.

bw2io.strategies.locations.GEO_UPDATE[source]#