top of page

Open Source solution for input output tables

  • Writer: azurecoder
    azurecoder
  • Jan 25, 2021
  • 1 min read

So input output tables are an economic cludge format which groups together a bunch of coefficients per country per year (these are specifically country tables) so that you can work out relative inputs and exports of a country.


Last weekend I helped run a hackathon on sustainable finance. We had some great entries and some very smart approaches to bundling transition risk into credit risk.


We got sponsored data by a group called Eora which gave us a set of input-output tables. For my first pass I tried to use pymrio to read them but it I didn't find it that easy so I thought I'd right my own parser which our team might be able to use much easier.


I'm a bit of a hacky Python programmer but all the data scientists in my team would it need it in Python so I thought I'd take advantage of some of the Python 3 features and be more OO in my approach This is what it ended up looking like.


if __name__ == "__main__":    
    filepath_1 = sys.argv[1]
    filepath_2 = sys.argv[2]
    table1 = CountryTable(CountryTableSegment.PrimaryInputs, filepath_1)
    table2 = CountryTable(CountryTableSegment.PrimaryInputs, filepath_2)
    df = table2.append(table1)
    print(df)
   

And returning Pandas DataFrames. Going to make a few updates so that it reads directories and also reads each of the other parts of the country table as well.


You can learning a little about the solution here and check out the code. Trying to finish it within the next few weeks and add to pypi.



Interested and economist please feel free to get in touch.

 
 
 

4 Comments


UUdolfiJelenai
10 minutes ago

Still, we're talking about the watch world – which has an link uneasy relationship with fashion, and where nobody is eager to risk link losing decades or link even centuries of painstakingly constructed brand prestige. So the MoonSwatch, which would be a tiny tremor in an adjacent industry, felt like an earthquake. And it cleaved collector opinion onto two sides of a fault line.

Like

UUdolfiJelenai
11 hours ago

I see this auction as trading up. Not trading up to better or more valuable watches, I'm actually putting the money toward my store. I love The Armoury more than my watches and I want to see it grow. Just like how F.P. Journe has said that every link cent he's made has gone back into the business, I think about it link the same way. I wanted to buy our own physical space on the link Upper East Side of Manhattan in New York, which is a bit beyond the means of most businesses.

Like

KaleoxKendax
Apr 07

A highlight of the factory is link its fully automated storage system, which delivers link components to the workshops without human intervention. Located in a three-story, fireproof, 3,660 cubic foot space in the center of link the building, the storage area holds more than 30,000 boxes containing all the parts necessary for T2 and T3.

Like

VYanislJennyl
Mar 26

It was a joke, of course. Probably. But on race day, inside the Daytona International Speedway's grounds, you can absolutely feel the gravitas of a race-won Daytona. You see a parade of them in the paddock, perched like glistening songbirds on the wrists of well-manicured racegoers. But when link you spot a race-worn watch, it's unmistakable. Any driver who's won a Daytona sports it like they've just slapped a royal flush link on the card link table. Get a load'a that!

Like

07590333990

©2019 by Richard Conway. Proudly created with Wix.com

bottom of page