Code Monkey home page Code Monkey logo

lca_disclosures's Introduction

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

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.

lca_disclosures's People

Contributors

bkuczenski avatar pjamesjoyce avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.