pymrio

Multi-Regional Input-Output Analysis in Python.

https://github.com/indecol/pymrio

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    3 of 11 committers (27.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.0%) to scientific vocabulary

Keywords

calculations input-output-analysis mrio python
Last synced: 6 months ago · JSON representation ·

Repository

Multi-Regional Input-Output Analysis in Python.

Basic Info
Statistics
  • Stars: 194
  • Watchers: 12
  • Forks: 84
  • Open Issues: 54
  • Releases: 23
Topics
calculations input-output-analysis mrio python
Created over 11 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Contributing License Citation

README.rst

.. image:: https://raw.githubusercontent.com/IndEcol/pymrio/master/doc/source/_static/textlogo.png
    :target: http://pymrio.readthedocs.io/en/latest/?badge=latest
    :alt: pymrio logo

-------

*******************************************************
pymrio: Multi-Regional Input-Output Analysis in Python
*******************************************************

.. image:: https://img.shields.io/pypi/v/pymrio.svg
    :target: https://pypi.python.org/pypi/pymrio/
.. image:: https://anaconda.org/conda-forge/pymrio/badges/version.svg   
    :target: https://anaconda.org/conda-forge/pymrio
.. image:: https://github.com/IndEcol/pymrio/workflows/build/badge.svg
    :target: https://github.com/IndEcol/pymrio/actions
.. image:: https://coveralls.io/repos/github/IndEcol/pymrio/badge.svg?branch=master
    :target: https://coveralls.io/github/IndEcol/pymrio
.. image:: https://readthedocs.org/projects/pymrio/badge/?version=latest
    :target: http://pymrio.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status
.. image:: https://img.shields.io/badge/License-GPL%20v3-blue.svg
    :target: https://www.gnu.org/licenses/gpl-3.0
.. image:: https://zenodo.org/badge/21688312.svg
    :target: https://zenodo.org/badge/latestdoi/21688312

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:

.. code:: bash

    pip install pymrio --upgrade
    
or when using conda install it by

.. code:: bash

    conda install -c conda-forge pymrio

or update to the latest version by

.. code:: bash

    conda update -c conda-forge pymrio

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:

.. code:: bash

    pip install git+https://github.com/IndEcol/pymrio@master



Quickstart    
==========

A small test mrio is included in the package. 

To use it call

.. code:: python

    import pymrio
    test_mrio = pymrio.load_test()

The test mrio consists of six regions and eight sectors:  

.. code:: python


    print(test_mrio.sectors)
    print(test_mrio.regions)
    print(test_mrio.extensions)

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

.. code:: python

    test_mrio.Z
    test_mrio.emissions.F
    
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: 

.. code:: python

    test_mrio.calc_all()

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

.. code:: python

    test_mrio.A
    test_mrio.emissions.D_cba
    test_mrio.emissions.D_exp

To visualize the accounts:


.. code:: python

    import matplotlib.pyplot as plt
    test_mrio.emissions.plot_account('emission_type1')
    plt.show()

Everything can be saved with

.. code:: python
    
    test_mrio.save_all('some/folder')

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. 

.. _`Stadler 2021`: https://openresearchsoftware.metajnl.com/articles/10.5334/jors.251/

For the full bibtex key see CITATION_ file.

.. _CITATION: CITATION

Contributing
=============

Want to contribute? Great!
Please check `CONTRIBUTING.rst`_ if you want to help to improve Pymrio.
  
.. _CONTRIBUTING.rst: https://github.com/IndEcol/pymrio/blob/master/CONTRIBUTING.rst
   
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).

.. _twitter: https://twitter.com/kst_stadler

.. _downloading: http://pymrio.readthedocs.io/en/latest/notebooks/autodownload.html
.. _parsing: http://pymrio.readthedocs.io/en/latest/handling.html
.. _documentation: http://pymrio.readthedocs.io/en/latest/
.. _tutorials: https://pymrio.readthedocs.io/en/latest/notebooks/full_tutorial.html
.. _EXIOBASE: http://www.exiobase.eu/
.. _WIOD: http://www.wiod.org/home
.. _OECD: https://www.oecd.org/sti/ind/inter-country-input-output-tables.htm
.. _EORA26: http://www.worldmrio.com/simplified/

Owner

  • Name: Industrial Ecology
  • Login: IndEcol
  • Kind: organization
  • Email: is4ie@yale.edu
  • Location: Global society of scholars and practitioners of industrial ecology

Open source software and other material for industrial ecology

Citation (CITATION)

@article{stadler2021_Pymrio,
  title = {Pymrio \textendash{} {{A Python Based Multi}}-{{Regional Input}}-{{Output Analysis Toolbox}}},
  author = {Stadler, Konstantin},
  year = {2021},
  month = may,
  volume = {9},
  pages = {8},
  publisher = {{Ubiquity Press}},
  issn = {2049-9647},
  doi = {10.5334/jors.251},
  abstract = {Pymrio is an open source tool for Environmentally Extended Multi-Regional Input-Output (EE MRIO) analysis developed in Python. It provides a high-level abstraction layer for global EE MRIO databases in order to simplify common EE MRIO data tasks. Among others, Pymrio includes parsers for several openly available EE MRIO databases (EXIOBASE v1 \textendash{} v3, WIOD, Eora26, OECD-ICIO) as well as methods for production and consumption based accounts calculation, aggregation, stressor origin estimation and visualization. The use of a consistent storage format including meta data and modification history for MRIOs allows to exchange data with other analysis tools, aiming for an increased interoperability of Industrial Ecology analysis software.},
  copyright = {Authors who publish with this journal agree to the following terms:    Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a  Creative Commons Attribution License  that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.  Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.  Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See  The Effect of Open Access ).  All third-party images reproduced on this journal are shared under Educational Fair Use. For more information on  Educational Fair Use , please see  this useful checklist prepared by Columbia University Libraries .   All copyright  of third-party content posted here for research purposes belongs to its original owners.  Unless otherwise stated all references to characters and comic art presented on this journal are \textcopyright, \textregistered{} or \texttrademark{} of their respective owners. No challenge to any owner's rights is intended or should be inferred.},
  journal = {Journal of Open Research Software},
  keywords = {Consumption Based Accounting,Eora26,EXIOBASE,Footprinting,Multi Regional Input Output Analysis,OECD-ICIO,Python,Sustainability Analysis,WIOD},
  language = {en},
  number = {1}
}


GitHub Events

Total
  • Create event: 7
  • Release event: 1
  • Issues event: 12
  • Watch event: 27
  • Issue comment event: 13
  • Push event: 66
  • Pull request review event: 2
  • Pull request event: 7
  • Fork event: 10
Last Year
  • Create event: 7
  • Release event: 1
  • Issues event: 12
  • Watch event: 27
  • Issue comment event: 13
  • Push event: 66
  • Pull request review event: 2
  • Pull request event: 7
  • Fork event: 10

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 579
  • Total Committers: 11
  • Avg Commits per committer: 52.636
  • Development Distribution Score (DDS): 0.033
Past Year
  • Commits: 151
  • Committers: 5
  • Avg Commits per committer: 30.2
  • Development Distribution Score (DDS): 0.026
Top Committers
Name Email Commits
Konstantin Stadler k****r@n****o 560
Hazim Hussein h****n@n****o 6
Didier D****9 3
Felix Beckebanze 1****e 2
jaimeoliver1 j****1@g****m 2
Yo Yehudi y****h@g****m 1
Samuel Juhel 1****l 1
Richard Wood r****d@n****o 1
Pascal Corpet p****t 1
Joshua Adelman s****s 1
Francis Barre 7****e 1
Committer Domains (Top 20 + Academic)
ntnu.no: 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 115
  • Total pull requests: 45
  • Average time to close issues: 8 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 46
  • Total pull request authors: 18
  • Average comments per issue: 1.57
  • Average comments per pull request: 1.42
  • Merged pull requests: 32
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 10
  • Pull requests: 7
  • Average time to close issues: 4 months
  • Average time to close pull requests: 4 months
  • Issue authors: 9
  • Pull request authors: 3
  • Average comments per issue: 0.5
  • Average comments per pull request: 0.43
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • konstantinstadler (50)
  • ghost (4)
  • MaximeAgez (3)
  • danielhorengreenford (3)
  • spjuhel (3)
  • jbnsn (3)
  • cfrancois7 (3)
  • jaimeoliver1 (2)
  • rich-wood (2)
  • Didou09 (2)
  • majeau-bettez (2)
  • erm-akif (2)
  • dailylifeofwei (2)
  • ruairidhcumming (1)
  • filiptomic (1)
Pull Request Authors
  • konstantinstadler (13)
  • hazimhussein (6)
  • Didou09 (4)
  • jaimeoliver1 (3)
  • Kajwan (3)
  • Beckebanze (3)
  • spjuhel (2)
  • pcorpet (2)
  • rich-wood (2)
  • trietmnj (1)
  • bixiou (1)
  • francis-barre (1)
  • yochannah (1)
  • ghost (1)
  • MohamedhBadr (1)
Top Labels
Issue Labels
enhancement (14) bug (10) documentation (3)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 6,940 last-month
  • Total docker downloads: 62
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 10
    (may contain duplicates)
  • Total versions: 82
  • Total maintainers: 1
proxy.golang.org: github.com/IndEcol/pymrio
  • Versions: 28
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/indecol/pymrio
  • Versions: 28
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: pymrio

A python module for automating input output calculations and generating reports

  • Versions: 26
  • Dependent Packages: 3
  • Dependent Repositories: 10
  • Downloads: 6,940 Last month
  • Docker Downloads: 62
Rankings
Docker downloads count: 2.7%
Dependent repos count: 4.7%
Forks count: 5.5%
Average: 5.6%
Stargazers count: 6.4%
Downloads: 7.3%
Dependent packages count: 7.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

doc/rtd-requirements.txt pypi
  • docutils <0.18
  • ipykernel *
  • nbsphinx *
  • sphinx >=1.6.4
  • sphinx_rtd_theme >=0.2.4
setup.py pypi
  • docutils *
  • matplotlib *
  • numpy *
  • openpyxl *
  • pandas *
  • requests *
  • xlrd *
.github/workflows/publish_pypi.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/publish_test_pypi.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
  • pypa/gh-action-pypi-publish release_candidates composite
.github/workflows/tests_and_coverage.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • conda-incubator/setup-miniconda v2 composite
environment.yml conda
  • black >=22.8
  • country_converter >=0.8.0
  • coveralls
  • docutils >=0.14
  • ipykernel
  • ipython
  • isort >=5.6.0
  • jupyterlab 3.*
  • jupytext
  • matplotlib
  • nbsphinx
  • nbval
  • openpyxl >=3.0.6
  • pandas >=1.5
  • pdbpp
  • pynvim
  • pytest >=5.4.3
  • pytest-black
  • python 3.9.*
  • requests >=2.18
  • sphinx >=1.6.4
  • sphinx_rtd_theme >=0.2.4
  • xlrd >1.1.0