Giter Site home page Giter Site logo

maximeagez / pylcaio Goto Github PK

View Code? Open in Web Editor NEW
37.0 2.0 7.0 48.83 MB

A Python class to hybridize lifecycle assessment (LCA) and environmentally extended input-output (EEIO) databases.

License: GNU General Public License v2.0

Python 78.74% Jupyter Notebook 21.26%
exiobase life-cycle-assessment carbon-footprint scientific-research input-output industrial-ecology ecoinvent brightway2 database energy-consumption

pylcaio's Introduction

pyLCAIO

An object class to hybridize lifecycle assessment (LCA) and environmentally extended input-output (EEIO) databases.

  • Create your own LCA-IO hybrid database (e.g., combining ecoinvent and exiobase data)
  • Automates hybridization and correction for double-counting with two available methods (STAM and binary)
  • Default parameters only allow the hybridization of ecoinvent 3.5, 3.6, 3.7, 3.7.1, 3.8 and 3.9 with EXIOBASE3.7+ (v3.7 and higher)
  • The resulting hybrid-ecoinvent database can be exported to brightway2 and the GUI activity-browser
  • Includes matching of ecoinvent and EXIOBASE environmental flows to Impact World+

Specific additional features, only available while hybridization ecoinvent3.5 with exiobase

  • Can accept capitals-endogenized version of EXIOBASE
  • Includes extrapolated additional environmental extensions for EXIOBASE (from USEEIO)
  • Includes regionalized characterization matrices for use with Impact World+

This library will be regularly updated to provide support for newer versions of ecoinvent.

System requirements

Under 12GM of RAM you will most likely run into a MemoryError, making it impossible to generate a database

Dependencies

  • Python 3
  • Pandas
  • Numpy
  • Scipy
  • pymrio
  • ecospold2matrix
  • pickle
  • brightway2
  • bw2agg

Related publications

  • Majeau-Bettez, G., Agez, M., Wood, R., Södersten, C., Margni, M., Strømman, A. H., & Samson, R. (2017). Streamlined Hybridization software: merging Ecoinvent and Exiobase. In Biennial Conference of the International Society for Industrial Ecology.
  • Agez, M., Majeau-Bettez, G., Margni, M., Strømman, A. H., & Samson, R. (2019). Lifting the veil on the correction of double counting incidents in hybrid Life Cycle Assessment. Journal of Industrial Ecology, 24(3), 517–533. https://doi.org/https://doi.org/10.1111/jiec.12945
  • Agez, M., Wood, R., Margni, M., Strømman, A. H., Samson, R., & Majeau-Bettez, G. (2020). Hybridization of complete LCA and MRIO databases for a comprehensive product system coverage. Journal of Industrial Ecology, 24(4), 774–790. https://doi.org/10.1111/jiec.12979
  • Agez, M., Muller, E., Patouillard, L., Södersten, C. J. H., Arvesen, A., Margni, M., Samson, R., & Majeau-Bettez, G. (2021). Correcting remaining truncations in hybrid LCA database compilation. Journal of Industrial Ecology. https://doi.org/10.1111/jiec.13132

pylcaio's People

Contributors

jakobsarthur avatar maximeagez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pylcaio's Issues

Patching exiobase

Could you provide some info on what the xlsx file patching_exiobase represents? I see it is used for constructing the gamma matrix (where the STAM_table is elemently multiplied with the patching table), however, if I do this in Excel I get a different result from the gamma filter shown in supplementary table of the paper Agez et al. (2020).

bug in cleaning sector names of IO

The following line is causing inconsistencies between the sector names from the concordance excel file (productTaypeName) and the filtered sector_of_IO list. this is because there are sector names that have brackets with numbers and brakcets without. The split function cuases the issue. E.g:

"Wood and products of wood and cork (except furniture); articles of straw and plaiting materials (20)"
becomes:
"Wood and products of wood and cork"

can be fixed by replacing the following line:

cleaning up exiobase sector names

[i.split(' (')[0] if re.findall(r'\d', i) else i for i in self.sectors_of_IO]

with:

cleaning up exiobase sector names

self.sectors_of_IO = [re.sub(r' (\d\d)', '', i) for i in self.sectors_of_IO]

Support plan for Ecoinvent 3.8?

First, thank you for sharing this brillient work!
Is there a plan to update the package and support the new Ecoinvent 3.8 database? Thanks!

AttributeError: 'DataFrame' object has no attribute 'todense'

Hi, Maxime Agez,
Thanks for sharing your excellent work about the Hybrid LCA database generated using Ecoinvent and EXIOBASE.
I want to construct the hybrid LCA ecoinvent 3.8_exiobase 3.8.1.
Due to specific additional features are not available for hybridization ecoinvent 3.8 with exiobase, i made the following settings.
path_to_capitals = ''
complete_extensions = False
impact_world = False
regionalized = False
lcaio_object = database_loader.combine_ecoinvent_exiobase(path_to_capitals=path_to_capitals, complete_extensions=complete_extensions, impact_world=impact_world, regionalized=regionalized)
However, when i tried to update hybrid-ecoinvent, I got the following error. “AttributeError: 'DataFrame' object has no attribute 'todense'.” Could you please tell me how can I deal with this problem? Thank you very much.

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.