Coder Social home page Coder Social logo

tngtudor / ecospold2matrix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from majeau-bettez/ecospold2matrix

0.0 1.0 0.0 280 KB

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

License: BSD 2-Clause "Simplified" License

Python 100.00%

ecospold2matrix's Introduction

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

Installation

Now the code can be installed with:

pip install git+git://github.com/repo_owner/ecospold2matrix#egg=ecospold2matrix

where

  • repo_owner could be: majeau-bettez or tngTUDOR or any fork of the project

Simple Use case

	import ecospold2matrix as e2m

	# Define parser object, with default and project-specific parameters
	# Make sure that the path database/location holds the datasets and MasterData folders
	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
  • lxml
  • Six
  • xlrd
  • xlwt

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.

ecospold2matrix's People

Contributors

majeau-bettez avatar tngtudor avatar

Watchers

 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.