You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I used the following code to create a violin plot (I tried it in both Brightway2 and Brightway2.5 with the same result):
from polyviz import chord, violin
db_ecoinvent = bd.Database('ecoinvent-3.11-apos')
violin(
activities=[a for a in db_ecoinvent if a["unit"] == "ton kilometer"][:3],
method=('EF v3.1', 'climate change', 'global warming potential (GWP100)'),
iterations=100,
title = "violin test 1"
)
However, I encountered this AttributeError:
Could you please help me figure out what might be causing this issue? Did I do something wrong, or is there an error in your code?
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Yes, the EF v3.1 climate change LCIA method is indeed present in Brightway methods. I successfully created a chord diagram using this method, and here is the code I used:
I am not an expert, but I tested your violin.py code and noticed something that might be causing the issue. In the section with the if MultipleMonteCarlo ... else ... logic: If the if condition is True, the line res = MultiMonteCarlo() generates a python list.
In the else block, res is assigned as an np.array. However, in the if block, res remains a list and still needs to be converted into an np.array.
Could you please look into this and fix the problem? I would be very grateful for your help.
Hi,
I used the following code to create a violin plot (I tried it in both Brightway2 and Brightway2.5 with the same result):
from polyviz import chord, violin
db_ecoinvent = bd.Database('ecoinvent-3.11-apos')
violin(
activities=[a for a in db_ecoinvent if a["unit"] == "ton kilometer"][:3],
method=('EF v3.1', 'climate change', 'global warming potential (GWP100)'),
iterations=100,
title = "violin test 1"
)
However, I encountered this AttributeError:
Could you please help me figure out what might be causing this issue? Did I do something wrong, or is there an error in your code?
Thank you in advance!
The text was updated successfully, but these errors were encountered: