openlca_jsonld
GreenDelta has updated OpenLCA JSON-LD to version 2 with a number of changes, tersely documented here: https://greendelta.github.io/olca-schema/CHANGES.html
There are changes throughout, and this forces us to decide whether to kludge our code or branch it.
Data ETL is the forever bane of the LCA lone wolf.
For simple naming changes, we can just introduce a constant mapping, detect whether it's version 1 or version 2, and use the correct one.
Whether there's a better way to do this is something we can think intensely about as we dive into deep interoperability with OpenLCA.
The most immediate material change is that Categories are no longer entities with UUIDs but merely forward-slash-separated strings. This is actually fine because this is much closer to our native approach. But we do need to rework the plumbing around this.
OpenLcaJsonLdArchive
Bases: LcArchive
Opens JSON-LD archives formatted according to the OpenLCA schema
openlca_category(name_or_full_list)
returns an olca id for a name or a list of hierarchical names, if one exists
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name_or_full_list |
|
required |
Returns:
Type | Description |
---|---|
either a known context or raise KeyError |