Git Product home page Git Product logo

exiobase-conversion-software's Introduction

About this repository

The code in this repository supports the conversion of these tables into into the Bonsai RDF ontology.

This readme also explains the reasoning behind the choice to use the hybrid (rather than monetary) tables of EXIOBASE for the prototype.

Run it

Setup

Clone repository

$ git clone [email protected]:BONSAMURAIS/EXIOBASE-conversion-software.git
$ cd EXIOBASE-conversion-software

Create pipenv

$ pipenv install
$ pipenv shell

Install

$ python setup.py install

Download hsup and huse tables

The original data can be downloaded from the BONSAI harvard dataverse.

  • Go to the harvard dataverse homepage.
  • Download the MR_HSUP_2011_v3_3_17.xlsb and MR_HUSE_2011_v3_3_17.xlsb data files
  • Move the HSUP and HUSE files to the /data folder.

Usage

As a command line tool

Convert xslb to csv

$ excel2csv-cli -i data/MR_HSUP_2011_v3_3_17.xlsb -o data/
$ excel2csv-cli -i data/MR_HUSE_2011_v3_3_17.xlsb -o data/

Convert csv to nt

csv2rdf-cli -i data/MR_HSUP_2011_v3_3_17.csv -o data/  -c HSUP --flowtype output
csv2rdf-cli -i data/MR_HUSE_2011_v3_3_17.csv -o data/  -c HUSE --flowtype input

Contributing

All contributions to the scripts should be via pull request. Please do not edit this package directly!

Choice to use the hybrid tables of EXIOBASE

Versions of Exiobase currently available

There are monetary and hybrid tables published on exiobase.eu .

Monetary tables

The Monetary Input-Otput tables (MIOTs) are calculated for the years 1995-2011. There are two types of tables:

  • Product by product (200x200) x 49 countries/ROW regions
  • Industry by industry (163*163 ) x 49 countries//ROW regions

The MIOTs were constructed using the industry technology assumption.

Hybrid tables

The hybrid dataset includes Hybrid Supply and Use tables (HSUTs) and Hybrid Input-Output tables (HIOTs). The tables are just for the year 2011. The HIOT was constructed using the by-product technology assumption.

Differences between the two tables

The differencies between the types of tables are listed in the table below.

Table

The lack of value added in the hybrid table is a temporary issue

Selected framework for Bonsai

For the purpose of this work we have used the hybrid supply and use tables (v3.3.17) were selected for the BONSAI prototype for the following reasons:

  • The aim of Bonsai is to leave to the user the choice of algorithms to transform supply and use tables into input-output tables. Currently there are no monetary supply and use tables available. The available MIOTs are the result of the adoption of the specific industry technology assumption.
  • Hybrid tables can be easily linked to other existing LCA-datasets because the tangible flows are accounted either in tonne or TJ. Therefore there is no need to use prices that may be a further source of uncertainty.

exiobase-conversion-software's People

Contributors

agneta20 avatar boweidema avatar dependabot[bot] avatar kuzeko avatar stefano-mrc avatar tmillross avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exiobase-conversion-software's Issues

Change URI prefix for exported flow Data

See also BONSAMURAIS/rdf#15

Everything that will be deployed in the

http://rdf.bonsai.uno/data/

e.g.,

http://rdf.bonsai.uno/data/exiobase3_3_17/hsup

space needs to use the / scheme instead

This means that

 <http://rdf.bonsai.uno/data/exiobase3_3_17/huse#F_1111694>

needs to become

 <http://rdf.bonsai.uno/data/exiobase3_3_17/huse/F_1111694>

instead

Agenda point: Write parsers for EXIOBASE format to RDF

Dear all,

Not quite sure if this is your preferred channel to discuss Agenda points. If not, please delete and let me know where to post.
Anyway, regarding the agenda point
"Write parsers for EXIOBASE format to RDF":
Happy to include a RDF export functionality to pymrio (https://github.com/konstantinstadler/pymrio). This would allow to generalize the BONSAI DB for any mrio.

Connected to that: I checked the tutorials for Leontief inversion and I see that you plan the EXIOBASE HIOT tables. Currently, I do not have a parser for the hybrid tables in pymrio, but if the format is stable I can work on that.
best
kst

Identifying the determining product (from non square SUTs)

We were facing a challenge in detecting the determining product flow as theoretically these could be picked up from diagnol of the Supply tables. However, given that Exiobase is non- square i.e. 200 pdts x 164 activities, it is not that trivial to identify the determining flow directly.

Hence we have the following solution:

  • We use a separate basic correspondence vector of determining products and the activities that helps us translate the information correctly into RDF

  • Another method could be to square the Supply and Use tables before converting them to RDF. This was already done in the Mojo repository . Here the product flows are aggregated and the exclusive by-products are placed in a global market. This is useful to build the computational structure (A/Z matrix) but aggregating product flows also leads to loss of information.

Would like feedback

Consensus decision on which extensions to include

EXIOBASE has the following extensions:

  • 39 resources, e.g. Blue water consumption, building stone, anthracite
  • 5 land use types, e.g. arable land
  • 66 emissions, e.g. NOx, Mirex, lead
  • 66 emissions avoided by the use of manure
  • 66 emissions from "unregistered waste", of which ~10 are non-zero
  • 10 emissions from unregistered waste, drawn from same emissions list as above
  • 8 "Other auxilliary account not elsewhere considered", e.g. "other non market feed", "use as feed of crop residues"

In addition, there are separate supply and use tables for 19 categories of waste/materials for the following:

  • Total waste
  • Packaging materials
  • Materials in heterogeneous products
  • Stock addition (only supply)
  • "Supply of waste from materials accumulated previously in the society" (only supply)

Please provide your input on what is needed for a) a minimum viable product, and b) the final input of EXIOBASE into BONSAI. Each additional dataset represents a nontrivial burden to a group already stretched thin.

Requirements file missing dependency

The project is dependent on the python package xlrd, as it is used by pandas to load xlsx files.

This dependency should be added to the requirements file.

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.