Skip to main content

This package converts Life Cycle Assessment inventory formats. Lavoisier is developed by the Center of Life Cycle Sustainable Assessment (Gyro) of the Federal University of Technology - Paraná (UTFPR) and the Brazilian Institute for Information in Science and Technology (IBICT)

Project description

Lavoisier

Python library for conversions between Life Cycle Assessment (LCA) inventory formats. Currently, it does both ways of conversion between EcoSpold 2 and ILCD 1 formats. Other versions and other dataset types are to be included due time as Lavoisier is a work in progress.

Lavoisier's objective is to make possible a cohesive conversion with lower loss of information between LCA inventory formats. This objective is in line with the efforts in the LCA community for a higher interoperability within data formats, in a way having a dataset of one inventory format does not limit its usability with other inventory formats.

Right now, Lavoisier is incorpored in the Brazilian Life Cycle Inventory database (namely SICV-Brasil) to make possible the conversion of Ecospold 2 datasets from Brazilian reseach to ILCD 1 format on the upload process.

The field conversion is based on Greendelta's converter https://github.com/GreenDelta/olca-conversion-service, but Lavoisier can overcome some shortcomings from OpenLCA converter such as loss of Pedigree matrix uncertainty and coefficient information, some input flows not converted and loss of all parameters and mathematical equations.

The project is still updating frequently and feedback is welcomed. The main branch has the most stable version, while the development branch has the latest updates of the library. Tests are made mainly on Linux (Ubuntu).

Installation

Lavoisier will require the following packages:

  • pathlib to help with file and diretory paths
  • pint to help with unit conversion
  • xmltodict to help with XML parsing
  • openturns to help with uncertainty conversion
  • Crypto to help with UUID conversion

To install the dependencies beforehand, use the commands below

  • Install dependent libraries
pip install pathlib pint xmltodict openturns crypto
  • Install Lavoisier
python3 pip install Lavoisier

If you want to install it via github clone, just execute the setup.py file. In the case of uninstalling or trying to install it by pip again, it is recomended to run as administrator or sudo, since problems related to .pyc files could raise. Follow the steps bellow:

  • Clone github repository
git clone https://github.com/JosePauloSavioli/IBICT-converter
  • Go to repository and install the library
cd path/to/cloned/library
python3 setup.py install

Conversion

Lavoisier works by creating a Converter class using the method get_converter(input_: tuple, output: tuple, path: str, save_path: str, mode: str). The input_ and output tuples are the format and elementary flow mapping to be used in conversion. Currently, available format options are "ILCD1" and "EcoSpold2" and available elementary flow mappings are "EF3.0" for ILCD and "ecoinvent3.7" for EcoSpold 2. The mode is an entry to specify if the conversion is to single file(s) of the output format (to file) or to a single database (to database - available only for EcoSpold2 to ILCD1 conversion).

The Converter class has the information about the two formats and is changeable within that conversion. It has a main attributes that can be changed before conversion: the elementary flow mapping file (attr: elem_flow_mapping). Other attributes are set depending on the conversion being carried out. Too see these attribute options one can print the converter.

For example, to convert a file and a directory of files from EcoSpold 2 to ILCD 1:

# To convert a file
converter = get_converter(("EcoSpold2", "ecoinvent3.7"), ("ILCD1", "EF3.0"),
                           "path_to_file", "path_to_save_directory", "to_file")

# To convert a directory with files
converter = get_converter(("EcoSpold2", "ecoinvent3.7"), ("ILCD1", "EF3.0"),
                           "path_to_directory", "path_to_save_directory", "to_file")

# To see the available options
print(converter)

The Converter class has one method called convert which is used to carry out the conversion at any given time.

converter.convert()

Support

This projects were supported by the GYRO laboratory from the Federal University of Technology - Paraná (UTFPR) with the Brazilian Institute of Information in Science and Technology (IBICT) and the help of Embrapa. It began with the support of REAL (Resource Efficiency through Application of Life Cycle Thinking) of the UN Environment and The Life Cycle Initiative funded by the European Commission. -> GYRO website: http://gyro.ct.utfpr.edu.br

Logo GYROLogo UTFPRLogo IBICT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Lavoisier-2.0.15.post1.tar.gz (31.2 MB view details)

Uploaded Source

File details

Details for the file Lavoisier-2.0.15.post1.tar.gz.

File metadata

  • Download URL: Lavoisier-2.0.15.post1.tar.gz
  • Upload date:
  • Size: 31.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for Lavoisier-2.0.15.post1.tar.gz
Algorithm Hash digest
SHA256 74409e77194762485ec1a6332be0eaff2fe17d924cd330c5db48e3903ea5a909
MD5 7249f0fa04980832d82663155cc39077
BLAKE2b-256 0a4dbe0f6e99a139b2a2480b5d789f8be238ba40f7ded1a09a0dadd1109a464e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page