A python module for automating input output calculations and generating reports


Keywords
calculations, input-output-analysis, mrio, python
License
LGPL-3.0
Install
pip install pymrio==0.5.3

Documentation

Pymrio

Pymrio: Multi-Regional Input-Output Analysis in Python.

image

image

image

image

Documentation Status

image

image

image

What is it

Pymrio is an open source tool for analysing global environmentally extended multi-regional input-output tables (EE MRIOs). Pymrio aims to provide a high-level abstraction layer for global EE MRIO databases in order to simplify common EE MRIO data tasks. Pymrio includes automatic download functions and parsers for available EE MRIO databases like EXIOBASE, WIOD and EORA26. It automatically checks parsed EE MRIOs for missing data necessary for calculating standard EE MRIO accounts (such as footprint, territorial, impacts embodied in trade) and calculates all missing tables. Various data report and visualization methods help to explore the dataset by comparing the different accounts across countries.

Further functions include:

  • analysis methods to identify where certain impacts occur
  • modifying region/sector classification
  • restructuring extensions
  • export to various formats
  • visualization routines and
  • automated report generation

Where to get it

The full source code is available on Github at: https://github.com/IndEcol/pymrio

Pymrio is registered at PyPI and on the Anaconda Cloud. Install it by:

or when using conda install it by

or update to the latest version by

The source-code of Pymrio available at the GitHub repo: https://github.com/IndEcol/pymrio

The master branch in that repo is supposed to be ready for use and might be ahead of the official releases. To install directly from the master branch use:

Quickstart

A small test mrio is included in the package.

To use it call

The test mrio consists of six regions and eight sectors:

The test mrio includes tables flow tables and some satellite accounts. To show these:

However, some tables necessary for calculating footprints (like test_mrio.A or test_mrio.emissions.S) are missing. pymrio automatically identifies which tables are missing and calculates them:

Now, all accounts are calculated, including footprints and emissions embodied in trade:

To visualize the accounts:

Everything can be saved with

See the documentation , tutorials and Stadler 2021 for further examples.

Tutorials

The documentation includes information about how to use pymrio for automatic downloading and parsing of the EE MRIOs EXIOBASE, WIOD, OECD and EORA26 as well as tutorials for the handling, aggregating and analysis of these databases.

Citation

If you use Pymrio in your research, citing the article describing the package (Stadler 2021) is very much appreciated.

For the full bibtex key see CITATION file.

Contributing

Want to contribute? Great! Please check CONTRIBUTING.rst if you want to help to improve Pymrio.

Communication, issues, bugs and enhancements

Please use the issue tracker for documenting bugs, proposing enhancements and all other communication related to pymrio.

You can follow me on twitter to get the latest news about all my open-source and research projects (and occasionally some random retweets).

Research notice

Please note that this repository is participating in a study into sustainability of open source projects. Data will be gathered about this repository for approximately the next 12 months, starting from June 2021.

Data collected will include number of contributors, number of PRs, time taken to close/merge these PRs, and issues closed.

For more information, please visit the informational page or download the participant information sheet.