Skip to content

Class for recasting Ecospold2 LCA dataset into Leontief matrix representations or Supply and Use Tables

License

Notifications You must be signed in to change notification settings

rlonka/ecospold2matrix

 
 

Repository files navigation

Ecospold2Matrix

A Python class to parse an ecospold2 life cycle assessment dataset and arrange it as matrices for further calculations.

It can recast an Ecoinvent 3 database into a Leontief coefficient matrix with extensions, or it can arrange the unallocated Ecoinvent data as Supply and Use tables (SUT).

Basic functionality

  • Conveniently store and log all parameters relevant to the data manipulation
  • Perform basic quality checks on data, and fix some potential issues
  • Arrange allocated data as Leontief technical coefficient matrix, with environmental extensions and labels
  • Arrange unallocated data as SUT
  • Optionally, change sign conventions for waste treatment
  • Optionally, scale elementary and intermediate flows to recorded production volumes
  • Save matrices to various different formats

Simple Use case

import ecospold2matrix as e2m

# Define parser object, with default and project-specific parameters
parser = e2m.Ecospold2Matrix('/database/location/', project_name='eco31_cons', positive_waste=True)

# Assemble matrices, including scaled-up flow matrices, and save to csv-files
parser.ecospold_to_Leontief(fileformats=['csv'], with_absolute_flows=True)

Short Demo

Have a look at this Ipython notebook for a demo of typical usage

Dependencies

  • Python 3
  • Pandas
  • Numpy
  • Scipy

Open Source

This tool incorporates some code from the open-source Brightway2 project. Ecospold2Matrix is also open-source, so feel most welcome to use, give feedback, modify or contribute.

About

Class for recasting Ecospold2 LCA dataset into Leontief matrix representations or Supply and Use Tables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%