0 votes
474 views
Dear everyone,

Is there are any way / trick to export all LCIA results (all impact categories) from the "contribution tree" tab with a single click - fixing the n. of upstream levels that I want to see?

I like the "Export to Excel" function in the "contribution tree" tab, because I can decide the number of levels that I want to see in Excel (in constrast to the "Export to Excel" in the "General information" tab, which gets overwhelming).

However, the export function from the "contribution tree" tab can (seemingly)  only export one impact category at the time - which means that it needs to be repeated for all impact categories.

Any trick / suggestion?

Thanks,

Alberto
in openLCA by (430 points)

2 Answers

0 votes
by (125k points)
Hi Alberto, thank you - I see, but the contribution tree in the UI also only shows one impact category, right? I will check if there is a method for the complete contribution tree but this is surely a lot of data then.
by (430 points)
Hi Andreas,
I haven't tried coding  within OpenLCA. That's why I thought that it was best to ask you, to get a sense of the task.
I am wondering whether it would be an option to manually open the product system, run the LCIA calculations, and then run a short script on the side that can extract 1 level from all impact categories from the contribution tree tab (instead of me pressing “export to Excel” 16 times!).
As I see, the code should contain a vector that stores the name / ID of the impact category, and a loop that extracts the results (given a the n. of levels chosen). Obviously, it sounds easy when one doesn’t know how OpenLCA works in the background, and how it interacts with Phython! That's why I thought about writing to you, to get a sense of the task!
I am very rusty with coding, but maybe I can give it a try (if you think that it is duable / simple). If so, is there anything specific in the "GreenDelta/ openlca-python-tutorial" that you would suggest to look at?
Background (probably irrelevant) note: I am using Agrifootprint 6.3, with Recipe 2016 Midpoint (H).
Best,
Alberto
0 votes
by (200 points)
Dear Alberto,

Did you find out a way to do this? I need exactly the same as you.

Best,

Arrate
by (430 points)
Dear Arrate,
no, I gave up. I couldn't operate the Python console without errors. In reality, I could easily operate it for simple mathematical operations, but I was not able to call any of the libraries suggested in the (OpenLCA’s) Python tutorial material without getting any error message. Therefore, I eventually gave up.
If you succeed, I will be happy to hear from you!
Best,
Alberto
...