IndEcol / pymrio

Multi-Regional Input-Output Analysis in Python.
http://pymrio.readthedocs.io/en/latest/
Other
158 stars 71 forks source link

Bug: fail pymrio.load_test(); missing file #10

Closed majeau-bettez closed 8 years ago

majeau-bettez commented 9 years ago

When I run this

import pymrio pymrio.load_test()

I get this error:

OSError: File b'/home/bill/documents/praxis/informatique/pymrio/pymrio/mrio_models/test_mrio/finald_demand_Y.txt' does not exist

And indeed that file does not seem there. Here is the list of files in that directory

concordance/ emissions.txt factor_input.txt FDemissions.txt finald_demand_y.txt population.txt readme.txt trade_flows_Z.txt

This is a fresh clone, with HEAD at 92f7546803c8383d98c9df8a2d9d79a45cb27796

danielhorengreenford commented 8 years ago

I think that's a typo. Change the lower case 'y' to 'Y' in the finald_demand_y.txt file. Is that correct?

konstantinstadler commented 8 years ago

Hi Daniel,

Thanks for using pymrio and many thanks for finding issues.

I thought the y issue was fixed but somehow I missed it for the upload. I am preparing a bigger update right now, hope to finish it in April (WIOD parser, time series analysis) - if you like I can keep you updated.

Best Konstantin

On 21/03/16 21:58, danielhorengreenford wrote:

I think that's a typo. Change the lower case 'y' to 'Y' in the finald_demand_y.txt file. Is that correct?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/konstantinstadler/pymrio/issues/10#issuecomment-199482117

danielhorengreenford commented 8 years ago

Hi Konstantin,

Thanks for writing pymrio and it's my pleasure! Glad to help with something as useful as this module. I'm learning python right now for the express reason of using pymrio as I feel it will be an invaluable tool for my research.

I'm hoping to adapt it to my needs: I'm developing a metric to share responsibility for emissions embodied in trade amongst trading countries by product classification. My framework aims to quantify ethical considerations regarding utility of goods and money exchanged in a transaction. I’d be happy to explain it in more detail and share my thesis when ready if it interests you.

Once I get the normal functionality of the module working on my machine I'll make code adaptations to allocate exported emissions for each bilateral trade for each product to create a new set of national GHG inventories and a calculation of national contributions to warming or alternatively framed as climate debts and credits. My supervisor Damon Matthews has been working in this theme the last few years and I thought it prudent to bring MRIO insights into the discussion and build on the consumption based accounting and shared responsibility-BA literature.

Please keep me updated! I see you have been developing a lot on web apps showing findings from all the MRIO databases. That’s extremely helpful for communicating the findings of all these independent projects. It’s taken me awhile to familiarize myself with the MRIO world and this kind of work is a great aggregator and expedient for learning.

Have you considered adapting the parser for the Eora database? I see WIOD has a full time series from 1995 to 2009, however Eora is updated more frequently (until 2012 now) and hence has a more complete time series. Time series analysis will be a great way of inferring trends in CBA or SRBA and is only going to be more important as time elapses due to increasing international trade. I'm particularly concerned with how territorial emissions accounting is facilitating countries' reductions while allowing global emissions to have a positive net change, in effect masking the reality that emissions are being displaced with manufacturing and not actually being mitigated.

I have been running into a few more issues. Just working my way through your tutorials and had to change some things to get it working on my computer (a new Mac running El Capitan and python 3.5 in Spyder):

What are you using as a python interface -- an IDE like Spyder? You were definitely using an IPython console judging by the output you included in your tutorial.

I’m also new to GitHub and still a pretty novice coder in general, so I might try forking pymrio to make edits of my own and keep it public as I go.

Best and many thanks, Daniel

On Tue, Mar 22, 2016 at 4:22 AM, Konstantin Stadler < notifications@github.com> wrote:

Hi Daniel,

Thanks for using pymrio and many thanks for finding issues.

I thought the y issue was fixed but somehow I missed it for the upload. I am preparing a bigger update right now, hope to finish it in April (WIOD parser, time series analysis) - if you like I can keep you updated.

Best Konstantin

On 21/03/16 21:58, danielhorengreenford wrote:

I think that's a typo. Change the lower case 'y' to 'Y' in the finald_demand_y.txt file. Is that correct?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub < https://github.com/konstantinstadler/pymrio/issues/10#issuecomment-199482117

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/konstantinstadler/pymrio/issues/10#issuecomment-199696060

Daniel Horen Greenford B.Sc. Hons Physics, M.Sc. candidate | Matthews Climate Lab - C2SIMS http://www.matthewsclimatelab.org/ Geography, Urban and Environmental Studies Concordia University | 1455 Blvd. de Maisonneuve W., Suite H-1265, Montréal, Québec +1-514-975-9211 | daniel.horengreenford@gmail.com | twitter = @horengreenford https://twitter.com/horengreenford

konstantinstadler commented 8 years ago

fixed filename in the test system - load test works now (v0.2.2.2)