IndEcol / pymrio

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

Added GLORIA parser in tools.ioparser #139

Open francis-barre opened 2 months ago

francis-barre commented 2 months ago

fix #128

A parser for GLORIA was coded following Issue #128 , 3 functions were coded, one to read GLORIA in its original SUT structure, one (__construct_IO) to construct the IO matrices from the SUT ones, and a final one (the parse_gloria that users should call) that uses the two previous ones and returns an IOSystem.

The __construct_IO is quite useless for GLORIA as I came to realize that the supply matrix in GLORIA is diagonal (commodities and industries match one to one), but it can be used in the future to parse other SUT databases into pymrio. The __construct_IO function can build the IO matrices from the SUT using one of the four models described in Miller Blair 2009.

I also added a (very) simple test and a mock gloria, it only tests that parsing gloria with all possible parameters works.