0 votes
89 views
In product system results, I usually copy data from contribution tree and then treat it in Excel. I would like to import directly a table which has for every line a impact category, each column a process folder (I created them so that each folder correspond to a life cycle stage) and give the proportion of the total impact for each life cycle stage, for each impact category. Is it possible to code that the the pyhon console ? or with any other language ?
in openLCA by (120 points)

1 Answer

0 votes
by (5.3k points)

I'd recommend using olca-ipc rather than the python console directly. It might be a steep learning curve, but what you want should be possible.

  1. You can get the contribution of each process in a product system for each impact category - see get_impact_contributions_of. In the most straightforward implementation, you'd get rows containing columns of unit process, impact category, amount of contribution (e.g., kg CO2e).
  2. You would then look up the category for each of the unit processes to add a "folder" column.
  3. A pandas pivot_table could then sum all the impacts per folder.
...