brightway-lca / brightway2-io

Importing and exporting for the Brightway LCA framework
BSD 3-Clause "New" or "Revised" License
26 stars 40 forks source link

USEEIO database contains duplicate/empty activities? #137

Open BenPortner opened 1 year ago

BenPortner commented 1 year ago

I installed USEEIO using brightway's own useeio11 method. When searching through the newly created database, I see duplicated entries. Furthermore, the first entry contains no exchanges, whereas the second does. Is this an error in the downloaded data or in the importer?

import bw2data as bd
import bw2io as bi

# USEEIO installation
bd.projects.set_current("USEEIO example")
bi.create_default_biosphere3()
bi.useeio11()

# USEEIO use
useeio = bd.Database("US EEIO 1.1")
useeio.search("compressors")
"""
[
'Air and gas compressors; at manufacturer' (, United States, ('31-33: Manufacturing', '3339: Other General Purpose Machinery Manufacturing')), 
'Air and gas compressors; at manufacturer' (USD, United States, None)
]
"""

a,b = _[0], _[1]
len(a.exchanges()) #0
len(b.exchanges()) #475
cmutel commented 1 year ago

This is an import from JSON-LD, and therefore has processes and products (check the type of the nodes). Products don't have inputs.

BenPortner commented 1 year ago

@cmutel: How about marking one as product and the other as activity. From the output of the search it is not clear which one is which. Furthrmore is there a way to filter for either one?