User Guide

The following page provides a short introduction to the use and structure of the ecoinvent Data Glossary.

JSON-LD and the Semantic Web

All Data Glossary metadata is published in the form of JSON-LD, a a lightweight format for linked data that enables organisations to establish a common understanding of data without relying on internal definitions. JSON-LD is a W3C standard (defined by the JSON-LD 1.1 specification) and implements the RDF data model. The RDF data model is a graph-based data model that is used to describe and interconnect resources on the web.

In addition to the web view, the Data Glossary is published as a set of JSON-LD files, each of which represents a single Data Glossary entry. These can be accessed via the following button on each entries page:

You can read more about the JSON-LD format on https://json-ld.org/, but the following key points will allow you to get started:

  1. Objects in JSON-LD (both top-level or nested in a file) can be uniquely identified with a @id field, normally a URL which will link to a web-view representation of the object.
  2. The meaning of all fields in a JSON-LD object are defined by an included @context field, which can be an embedded object or an external file reference. This provides a mapping between the field name used in the JSON-LD file to definitions available on the web.
  3. The shape of objects (i.e. which fields are expected and their definitions) is defined by an @type field. This can reference common standards (the ecoinvent Data Glossary often uses https://schema.org/ as an example) or custom schemas for specific datasets. The custom schemas for the ecoinvent Data Glossary can be seen in the Linked Data Schema section.

@id Permanent URL v Friendly URL

Cool URLs don't change, and this is an important concept in RDF framework: the @id field should be stable, so references to a particular object will always be valid. This makes the use of common names in the @id hard to align with an evolving Data Glossary which is expected to have names changes over time. To avoid this issue, the @id is an opaque URL, based on the entries UUID (universally unique identifier). This is a permanent reference to the object and is where the JSON-LD file can be found. The friendly URL is a human-readable reference, based on the name of the Data Glossary entry, and is used for the web-view representation of the object. This is not guaranteed to be stable, and should not be used for programmatic access.

The @id URl will automatically forward you to the friendly URL if you request the web-view of the object i.e. if you navigate to it in a web browser.

Programmatic Access

Content negotiation is used to retrieve the JSON-LD files from the @id address by specifying the correct media type in the request header. This can be done by setting the header Accept:Application/ld+json, For example:

$ curl https://glossary.ecoinvent.org/ids/c4d1b1ec-1ddb-4800-87db-ffbfbb29d94f -H"Accept:Application/ld+json"

To enable programmatic navigation, a JSON-LD representation of the Data Glossary site navigation can be retrieved from the top-level domain:

$ curl https://glossary.ecoinvent.org/ -H "Accept:Application/ld+json"

The ecoinvent Data Glossary is made available under the Open Database License.

Any rights in individual contents of the database are licensed under the Database Contents License.

© 2023 ecoinvent. All rights reserved.