Figaro Parser¶
In this example we will see how you can download FIGARO database and parse it using mario. Pleae note that the current version of mario only supports parsing Supply and Use Tables!
import mario
# download database
mario.download_figaro(
table = "SUT",
year = 2021,
path = "database"
)
This code downloades the data required to parse the tables into “databaes” folder that is the path specified in download function. Now to read the database, you can use
figaro = mario.parse_FIGARO_SUT(
"database"
)
figaro.GDP()
GDP | |
---|---|
Region | |
Argentina | 3.697371e+05 |
Austria | 3.732273e+05 |
Australia | 1.399327e+06 |
Belgium | 4.639288e+05 |
Bulgaria | 6.415996e+04 |
Brazil | 1.261838e+06 |
Canada | 1.620007e+06 |
Switzerland | 6.631132e+05 |
China | 1.506498e+07 |
Cyprus | 2.192730e+04 |
Czech Republic | 2.229991e+05 |
Germany | 3.333184e+06 |
Denmark | 3.032576e+05 |
Estonia | 2.853506e+04 |
Spain | 1.112071e+06 |
Finland | 2.257000e+05 |
Rest of the world | 9.869251e+06 |
France | 2.295100e+06 |
Great Britain | 2.479909e+06 |
Greece | 1.653957e+05 |
Croatia | 5.094699e+04 |
Hungary | 1.364844e+05 |
Indonesia | 9.760802e+05 |
Ireland | 4.139783e+05 |
India | 2.529599e+06 |
Italy | 1.645424e+06 |
Japan | 4.216607e+06 |
South Korea | 1.525140e+06 |
Lithuania | 5.095433e+04 |
Luxembourg | 6.871203e+04 |
Latvia | 3.052740e+04 |
Malta | 1.405615e+04 |
Mexico | 1.023775e+06 |
Netherlands | 7.856965e+05 |
Norway | 3.799912e+05 |
Poland | 5.243482e+05 |
Portugal | 1.928892e+05 |
Romania | 2.290875e+05 |
Russia | 1.402765e+06 |
Saudi Arabia | 6.778487e+05 |
Sweden | 4.964872e+05 |
Slovenia | 4.745088e+04 |
Slovakia | 9.250391e+04 |
Turkey | 6.526885e+05 |
United States | 1.925363e+07 |
South Africa | 3.331388e+05 |
Link to the jupyter notebook file
.