+2 votes
I'd like to be able to convert unit processes from/to zolca files outside of the openLCA environment. Any ideas?
in openLCA by (280 points)
retagged by

1 Answer

+1 vote
by (11.4k points)
selected by
Best answer

The zolca format is just a zipped Derby database (https://db.apache.org/derby/). You can just unzip it to a folder and use it as a standard Derby database. openLCA uses Derby as embedded database but you can also start it in server mode: http://db.apache.org/derby/papers/DerbyTut/ns_intro.html. There is a Python package to connect to a Derby database over the network: https://pypi.org/project/pydrda/ (I do not know how good this works). You can find the openLCA database schema here: https://github.com/GreenDelta/olca-modules/blob/master/olca-core/src/main/resources/org/openlca/core/database/internal/current_schema_derby.sql

However, the easiest way to read openLCA data with Python is probably to use the openLCA JSON(-LD) exchange format. It is specified here: https://github.com/GreenDelta/olca-schema (maybe needs some updates). Also, we are currently creating a protocol for inter-process communication with openLCA that uses this format. The reference implementation will be a Python package. The first implementation can be found here: https://pypi.org/project/olca-ipc/ (source code here: https://github.com/GreenDelta/olca-ipc.py). The package contains also a complete Python class model generated from the olca-schema spec.

by (130 points)
do you have a similar version of https://github.com/GreenDelta/olca-ipc.py in R?