Skip to main content

Python based tools for working with LCA foreground model disclosures

Project description

lca_disclosures

Python based tools for working with LCA foreground model disclosures

Disclosure framework based on "Disclosure of product system models in life cycle assessment: achieving Transparency and Privacy" by Brandon Kuczenski in J Ind Ecol. (doi: 10.1111/jiec12810)

This package was originally authored by James Joyce. Code and testing related to Brightway 2 have been branched into the lca_disclosures_bw2 repository so as to remove dependencies from the core program. The original repository lca_disclosures is still operational.

Supported software frameworks

The lca_disclosures repository supports the generation of a disclosure specification from the following software:

Support (and testing) for Brightway2 is available in the original repository lca_disclosures.

Usage

To use the disclosure framework, instantiate the appropriate Disclosure subclass and supply it with the software-specific input data. The disclosure object can be used to answer questions about the model:

  • listing foreground flows, background flows, and emissions;
  • identifying cutoff flows (flows that exit the model boundary with no impacts);
  • performing an aggregation of the model into a unit process

The disclosure object can also be serialized to JSON or saved as an Excel spreadsheet.

Requirements

  • pandas, to write to excel
  • scipy, to perform matrix operations

Contents of an LCA Disclosure

A disclosure has six parts, including three lists of flows:

  • i An ordered list of foreground flows, beginning with the functional unit of the system (length = p);
  • ii An ordered list of flows from background processes or activities (length = n);
  • iii An ordered list of environmental or social "emissions" (length = m).

And three sparse matrix specifications:

  • iv A list of nonzero entries in the p x p sparse matrix defining the foreground;
  • v A list of nonzero entries in the n x p sparse matrix defining the foreground's dependency on the background;
  • vi A list of nonzero entries in the m x p sparse matrix defining the foreground's direct emissions.

A visual representation of the disclosure is found in Figure 3 of the above paper:

![Graphical depiction of an LCA disclosure]("https://github.com/AntelopeLCA/lca_disclosures/blob/master/jie-disclosure_fig3.png" =384x)

Development

The base Disclosure class is abstract, and a subclass must be created for each supported software type. A subclass must populate the following methods:

  • _prepare_efn() returns the evaluated filename used to store disclosure serializations.
  • _prepare_disclosure() returns a 6-tuple corresponding to the 6 disclosure elements, in the order listed above.
  • __init__() must be written to handle input data and then call the superclass __init__, which computes _prepare_disclosure() and stores the output.

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

lca_disclosures-0.2.0rc1.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lca_disclosures-0.2.0rc1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file lca_disclosures-0.2.0rc1.tar.gz.

File metadata

  • Download URL: lca_disclosures-0.2.0rc1.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.6

File hashes

Hashes for lca_disclosures-0.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 451d785284189d79fc73aeecf630f451c187535df9d29aa8c93d0c4e98243215
MD5 0560da28d7cc6678246d3d843bf910be
BLAKE2b-256 bb0217f0c2d029e47116084a46641f977134ee110daaf0cac0d27bf506482d05

See more details on using hashes here.

File details

Details for the file lca_disclosures-0.2.0rc1-py3-none-any.whl.

File metadata

  • Download URL: lca_disclosures-0.2.0rc1-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.6

File hashes

Hashes for lca_disclosures-0.2.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 62517e0643de2a0237b0f8788a9bc53d9967734305eb5e11d4f6be315a023679
MD5 56afdff001f7cf0e07a23e7ea7a064ca
BLAKE2b-256 4901242c9298ab5f2997843e20fa107e01596a900c2dca8671dca07293fdd75a

See more details on using hashes here.

Supported by

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