Pymrio Tutorial for WIOD

This tutorial follows the example given in the Pymrio article (Stadler et al 2018 sub).

Pymrio requires a Python version >= 3.5. If you don't have Python installed, I recommend to use the Anaconda Scientific Python package.

Pymrio is available on the Python Package Index PyPI and on the Anaconda Cloud. Thus, two possibilites exist to install pymrio and all required packages.

For using the version on PyPI use:

pip install pymrio --upgrade

To install from the Anaconda Cloud do:

conda install -c konstantinstadler pymrio

You can than import the pymrio package with

In [1]:
import pymrio

In this example here, we will use the WIOD MRIO database.

First, the pymrio MRIO download function is used to get the WIOD MRIO database with:

In [6]:
raw_wiod_path = '/tmp/wiod/raw'
pymrio.download_wiod2013(storage_folder=raw_wiod_path,
                         years=[2008])
Out[6]:
Description: WIOD metadata file for pymrio
MRIO Name: WIOD
System: ixi
Version: data13
File: /tmp/wiod/raw/metadata.json
History:
20180112 09:23:36 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/water/wat_may12.zip to wat_may12.zip
20180112 09:23:36 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/materials/mat_may12.zip to mat_may12.zip
20180112 09:23:35 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/land/lan_may12.zip to lan_may12.zip
20180112 09:23:35 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/AIR/AIR_may12.zip to AIR_may12.zip
20180112 09:23:34 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/CO2/CO2_may12.zip to CO2_may12.zip
20180112 09:23:33 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/EM/EM_may12.zip to EM_may12.zip
20180112 09:23:32 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/EU/EU_may12.zip to EU_may12.zip
20180112 09:23:32 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/SEA/WIOD_SEA_July14.xlsx to WIOD_SEA_July14.xlsx
20180112 09:23:31 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/update_sep12/wiot/wiot08_row_sep12.xlsx to wiot08_row_sep12.xlsx

This downloads the 2008 MRIO table from WIOD. Omitting the year parameter would result getting all years. The function returns a pymrio meta data object, which gives information about the WIOD version, system (in this case industry by industry) and records about from where the data was received.

To parse the database into a pymrio object use:

In [82]:
wiod = pymrio.parse_wiod(raw_wiod_path, year=2008)

The available data can be explored by for example:

In [83]:
wiod.get_sectors()
Out[83]:
Index(['AtB', 'C', '15t16', '17t18', '19', '20', '21t22', '23', '24', '25',
       '26', '27t28', '29', '30t33', '34t35', '36t37', 'E', 'F', '50', '51',
       '52', 'H', '60', '61', '62', '63', '64', 'J', '70', '71t74', 'L', 'M',
       'N', 'O', 'P'],
      dtype='object', name='sector')

or

In [84]:
wiod.get_regions()
Out[84]:
Index(['AUS', 'AUT', 'BEL', 'BGR', 'BRA', 'CAN', 'CHN', 'CYP', 'CZE', 'DEU',
       'DNK', 'ESP', 'EST', 'FIN', 'FRA', 'GBR', 'GRC', 'HUN', 'IDN', 'IND',
       'IRL', 'ITA', 'JPN', 'KOR', 'LTU', 'LUX', 'LVA', 'MEX', 'MLT', 'NLD',
       'POL', 'PRT', 'ROU', 'RUS', 'SVK', 'SVN', 'SWE', 'TUR', 'TWN', 'USA',
       'RoW'],
      dtype='object', name='region')
In [85]:
wiod.Z
Out[85]:
region AUS ... RoW
sector AtB C 15t16 17t18 19 20 21t22 23 24 25 ... 63 64 J 70 71t74 L M N O P
region sector
AUS AtB 4445.324330 41.919400 15625.681890 536.968630 154.395870 936.835140 273.018600 0.000000 215.708440 93.909230 ... 19.761917 0.001627 0.140044 0.043667 11.680006 3.113827 61.711687 9.898359 10.256983 0.000038
C 16.277934 3838.070873 189.934275 11.313686 3.253063 14.271582 58.136067 4424.333299 193.328895 20.968263 ... 0.211888 0.034300 0.005817 0.088101 14.418832 0.315809 0.182157 0.273387 0.493510 0.000861
15t16 1049.495726 100.611347 6754.110522 68.387761 19.663697 14.570366 49.431980 36.266290 835.587643 54.070009 ... 1.621756 1.588110 3.701685 2.743954 27.665274 14.865583 86.096798 46.736852 79.637133 0.006089
17t18 36.908420 43.779214 108.986668 355.675875 102.268333 18.335691 50.188234 15.538649 45.917943 45.612614 ... 0.401032 0.181367 1.492579 0.632427 1.492750 6.550554 0.878764 2.252624 2.428735 0.001057
19 9.518107 11.289978 28.105965 91.723266 26.373410 4.728489 12.942764 4.007176 11.841522 11.762783 ... 0.039708 0.017958 0.147786 0.062619 0.147803 0.648594 0.087010 0.223040 0.240478 0.000105
20 36.819811 47.491171 33.027878 7.296923 2.098101 931.529917 29.447854 10.273590 19.271625 19.486462 ... 0.027123 0.082776 0.063378 0.205954 0.790532 2.353193 2.554166 1.827102 1.287573 0.010418
21t22 115.900527 153.248506 1246.425549 52.200097 15.009220 90.326674 2821.000424 23.198240 363.916574 142.223056 ... 2.204172 10.102687 15.418063 6.195107 48.596887 56.890466 21.913868 17.326665 25.336693 0.025942
23 490.156419 1026.213186 158.889100 9.179523 2.639409 35.551012 77.346703 518.540713 250.877221 41.087803 ... 59.028995 4.487274 11.189084 11.512628 36.303514 27.566443 17.222495 18.549700 17.863948 0.011255
24 1025.411077 395.338597 254.521411 58.428801 16.800175 134.600162 414.014715 254.533734 1940.073909 858.289530 ... 2.603711 1.444149 1.194342 9.237368 19.609616 28.268265 42.763999 112.870262 29.349604 0.052557
25 79.516332 189.301500 747.545652 34.083913 9.800233 36.346518 308.640250 35.017383 356.994995 269.405154 ... 0.973279 2.427753 0.704863 3.349751 6.259412 2.576908 3.199048 4.867827 37.445945 0.008494
26 38.658080 105.010424 262.224086 5.283083 1.519054 40.469744 29.765072 8.536396 105.011698 39.029102 ... 0.186875 0.421755 0.195426 0.657503 1.604297 1.160610 1.514350 1.381380 2.173674 0.001937
27t28 212.089806 1310.988269 836.157336 42.125453 12.112433 307.140650 183.821644 39.748282 376.009535 192.166872 ... 15.617744 7.959440 2.380652 18.293034 25.094179 4.177664 5.533838 4.012130 26.919745 0.049209
29 168.914698 614.130627 121.573026 9.601957 2.760879 22.279107 45.205836 36.726841 49.857619 28.242531 ... 3.642359 30.309729 6.825963 28.606393 41.232405 7.775303 17.255305 6.985789 19.145209 0.031949
30t33 100.297729 364.656884 72.187314 5.701425 1.639347 13.228830 26.842204 21.807568 29.604327 16.769776 ... 2.002236 16.661519 3.752291 15.725181 22.665809 4.274151 9.485390 3.840148 10.524287 0.017563
34t35 94.161797 279.637968 68.165787 8.294429 2.384917 8.080558 19.639293 18.150425 25.406816 11.405865 ... 12.703247 8.769379 12.768384 12.610675 64.711016 21.845125 12.221815 5.288575 124.684698 0.005111
36t37 52.529450 213.596124 135.683995 26.057759 7.492447 110.342068 35.268883 21.252913 64.355459 29.135448 ... 0.226041 1.816351 1.501001 0.734132 5.457432 3.653690 3.040151 2.261301 6.176947 0.330733
E 698.423156 1719.046355 885.618629 86.361355 24.831684 143.282141 356.331393 124.990480 359.975571 187.401518 ... 0.158169 0.222314 0.298537 1.804297 0.696923 0.819074 0.433625 0.588291 0.542892 0.000114
F 633.714316 4242.094785 376.754403 28.695921 8.251007 109.473492 151.285346 935.469320 167.746506 93.523215 ... 0.967638 3.020002 6.822620 4.445031 6.978164 3.820432 4.213175 4.269064 3.135682 0.006102
50 1132.348543 2138.419658 1023.262884 159.073383 45.738761 230.146065 723.933947 115.779055 392.670136 231.061142 ... 0.542576 1.055301 1.163450 0.619550 0.820108 3.190926 0.401245 0.715443 0.335334 0.000000
51 1394.463193 1572.454263 4088.518869 419.871502 120.726663 276.108617 963.440976 976.941746 1308.409695 535.714326 ... 0.822974 0.880188 2.617088 1.334045 8.044024 8.112138 13.165919 10.882036 17.335205 0.125509
52 1445.528277 1659.816747 3579.884070 371.567853 106.837791 289.884901 858.592422 1003.348917 1302.437162 535.855098 ... 3.508417 8.412820 2.943161 4.183650 25.137596 9.350485 9.915846 14.368875 9.505814 0.045543
H 140.934734 216.771700 561.956674 27.457908 7.895041 23.433113 167.690188 103.972792 168.583295 31.931233 ... 13.417060 5.803010 31.833836 6.093826 44.016163 31.470631 22.222129 15.193905 8.820562 0.024843
60 476.976916 3184.818553 1993.405269 126.355111 36.331187 218.706857 510.934567 264.079532 529.984384 320.186820 ... 24.160506 27.963040 34.284311 29.296585 51.018691 66.987976 39.638572 6.561055 44.037984 0.014616
61 9.552743 170.427724 31.177072 4.611883 1.326064 3.898249 15.919886 15.316702 13.456574 5.596796 ... 2.683645 27.565014 25.181994 128.915922 66.003832 27.081238 6.700347 2.041265 17.273710 0.000000
62 6.869618 20.121560 11.067713 1.786162 0.513581 1.669552 11.293316 2.145138 6.468971 1.904794 ... 56.890998 228.034250 187.103415 40.923609 416.402802 518.481234 387.002863 28.960407 154.036071 0.000035
63 297.699414 738.735542 1195.706686 45.976713 13.219798 325.523642 634.162539 98.547353 630.174898 72.132960 ... 23.523008 76.260841 59.942885 23.682097 132.257649 162.850890 120.792474 9.267663 53.423142 0.000042
64 223.155110 423.626089 355.814018 35.236625 10.131668 74.415816 321.615785 114.934853 143.609205 71.615890 ... 0.183698 3.195211 4.168414 0.398777 1.136361 4.488764 2.069959 1.476196 0.879504 0.000243
J 1299.842059 4293.057285 967.646850 59.138767 17.004318 111.468536 441.552736 97.016295 296.043420 121.990028 ... 10.691209 38.702169 87.947969 49.862781 73.172178 17.970300 40.594369 12.824709 34.707057 0.069814
70 551.797175 1786.808419 797.474903 32.553813 9.360274 300.402024 541.707671 186.950544 98.494018 50.868687 ... 1.371040 55.154968 51.222023 81.507135 1.324506 14.642011 7.911327 0.554078 15.369971 0.000000
71t74 1180.063104 5310.446524 3035.907428 368.573815 105.976926 557.009305 2787.056493 1262.566488 2654.652613 1383.027258 ... 13.609769 44.055788 110.840096 45.926864 97.594121 30.529568 59.538339 18.124551 33.468160 0.097561
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
RoW 20 1.635056 2.013566 0.820348 0.216980 0.062394 59.254639 1.921591 0.293189 0.419081 0.896964 ... 80.089178 38.342266 12.072937 26.345271 629.084892 1884.054328 2120.766430 1932.161785 914.755872 0.019687
21t22 7.724918 13.129569 217.877677 2.003884 0.576182 10.939833 305.243836 2.718898 43.005354 12.827419 ... 2356.505474 5432.580816 7910.918929 1128.083167 26948.165198 16081.684247 9758.327387 6011.875100 10934.428273 2.548514
23 388.152158 836.374409 81.538931 2.390291 0.687287 25.409174 52.937556 426.332774 189.227887 25.663685 ... 940.236675 261.091828 154.913923 129.072765 789.857491 574.234856 141.229352 242.320646 423.896780 0.056465
24 365.270981 132.696731 32.705396 14.943534 4.296752 45.776375 137.849053 88.781323 694.935609 304.297810 ... 259.001665 86.217475 90.520415 172.206457 1469.037784 568.857200 464.549470 10243.419875 1465.864732 0.523719
25 8.286214 22.575945 90.951788 2.964467 0.852379 4.080999 38.578026 4.433015 43.078751 33.263153 ... 1122.804886 762.399457 140.149436 493.458933 3238.293742 384.585818 748.594202 2193.842232 2876.932893 0.139278
26 1.956064 6.043732 11.152563 0.099052 0.028483 1.540591 0.842093 0.991921 5.264341 1.845787 ... 119.947154 60.337788 18.657645 135.596128 389.433240 439.866913 502.917719 1116.624356 400.017883 0.111932
27t28 9.581514 191.520139 34.196454 2.872105 0.825822 19.202156 17.107983 2.899187 23.417741 40.398734 ... 1298.244145 315.873918 171.199863 733.140609 4511.622232 548.761711 543.615393 931.955552 1147.905601 0.648180
29 35.895862 148.406916 4.062407 0.206493 0.059371 4.226874 5.044632 4.710717 6.153871 1.448788 ... 697.828174 319.985813 314.995799 181.223515 1068.322357 753.097670 271.294575 3154.318917 314.337084 0.227289
30t33 5.438695 14.663099 4.288701 0.942037 0.270862 0.581584 5.573272 0.601050 3.175119 2.472000 ... 818.546621 8308.403067 731.275786 808.302796 21372.986647 1858.083732 2393.918095 2193.940291 4724.352592 1.743540
34t35 3.580771 6.292762 1.143145 0.089681 0.025786 0.295067 0.589052 0.144417 0.873163 0.518826 ... 1252.400960 1279.511149 517.703475 418.842054 6459.762846 2627.353449 1120.680148 392.761307 7211.302026 0.984097
36t37 1.423158 15.919915 2.520675 0.997691 0.286871 1.144750 1.872070 0.537275 2.212297 1.106440 ... 103.922288 113.850921 471.973179 181.271520 482.787859 773.675064 852.380832 323.697939 504.572681 0.169314
E 0.802647 18.560578 1.105187 0.052474 0.015090 0.173761 0.567528 20.428639 0.819155 0.253561 ... 4605.709269 7342.310696 5072.978446 5141.941351 12517.586986 15224.240044 12110.158949 12791.419341 10535.612431 4.831273
F 0.690587 4.550382 0.398577 0.018475 0.005314 0.228649 0.150437 0.984623 0.227128 0.110467 ... 982.318867 2242.910054 3428.713588 7483.145885 5407.731676 10000.889751 6437.551020 11354.319342 3839.537017 22.570339
50 0.055638 0.158419 0.091477 0.004071 0.001171 0.012600 0.039960 0.049854 0.052195 0.025508 ... 522.931361 593.953802 533.712735 225.393607 984.574183 1437.815851 342.158934 1088.152585 555.415078 0.513696
51 2.752223 189.554149 11.612952 0.481597 0.138475 0.853480 4.639344 230.537056 6.007003 1.436657 ... 3519.981195 7342.086914 2956.802019 2056.102533 13468.319458 8755.578709 4942.954370 19728.444632 9261.002711 4.393748
52 1.031890 1.526614 3.043862 0.176287 0.050688 0.267343 1.589181 0.516815 1.104595 0.320696 ... 2200.648191 3472.751467 2002.609268 1022.444732 6822.892202 4692.901833 2286.924606 8058.010782 4256.950765 6.790453
H 0.783462 1.108244 3.597303 0.117633 0.033825 0.112285 0.844576 0.471689 0.894151 0.123268 ... 5697.775736 2180.164612 7534.073416 1565.207855 12160.455853 16699.714473 7750.382855 5346.893566 4441.279950 1.070657
60 0.680310 190.942239 7.225673 0.281982 0.081079 0.435869 2.825101 234.376543 3.367219 0.414917 ... 7703.649094 5140.042568 7039.531612 1167.017249 10630.975028 10255.302827 4952.250191 6210.736712 5982.700080 13.287645
61 0.085508 0.190833 0.040526 0.003698 0.001063 0.008164 0.032342 0.082525 0.046836 0.007787 ... 319.845929 351.739712 393.717271 249.455177 1314.984794 916.026979 435.280134 803.452478 647.422802 0.257212
62 7.703932 22.053451 12.157162 2.137970 0.614733 1.580617 13.245788 2.369183 7.540798 2.183210 ... 532.908584 1341.365292 1312.401998 197.515757 2930.795161 3507.522443 2074.276308 875.609110 1119.259998 0.346236
63 0.308886 0.802305 0.698779 0.064745 0.018614 0.151014 0.529874 0.096219 0.398736 0.083757 ... 3504.280492 1807.314685 1701.271137 373.643784 3223.972374 4095.498850 1417.898957 2264.941271 2108.901331 0.387366
64 0.166596 0.499486 0.348924 0.032884 0.009460 0.065116 0.304461 0.102210 0.231570 0.101406 ... 2172.194846 20440.020040 11710.122737 1468.996337 9246.282287 15881.469928 6012.447058 7642.069297 4260.482612 8.457208
J 4.774312 8.175419 8.364439 0.128402 0.036924 0.501054 3.041203 0.527920 1.128715 0.542113 ... 7415.709712 8091.081325 38655.926218 5758.940639 19989.913847 23896.327061 9546.835763 3563.218290 8195.767795 54.664765
70 7.339967 23.635663 8.385978 0.273455 0.078627 3.690224 5.954991 2.422823 0.176277 0.184588 ... 1727.970393 5199.410339 7493.075988 2705.769797 9495.163791 8103.153981 5036.228134 6230.303094 7501.857446 0.007471
71t74 3.657849 17.761648 9.827292 1.145630 0.329414 1.860358 9.415961 4.389323 8.278023 4.489652 ... 6246.240339 12482.298686 24886.499828 6015.478162 70478.453504 20430.836359 13305.638974 15560.647836 12040.071161 83.100716
L 0.547432 0.780406 1.176073 0.200903 0.057766 0.248589 0.636937 0.238198 1.078893 0.160527 ... 608.700335 709.004146 1595.531658 620.253937 1194.982705 4557.146576 518.488155 921.621306 901.624286 0.000000
M 1.319036 9.927575 11.742183 2.639874 0.759049 1.003295 4.474255 4.120725 4.517280 1.687657 ... 91.678620 463.402398 1802.804212 212.193133 1571.999239 7706.676330 5223.189539 1488.980938 527.910083 0.001030
N 7.894845 0.291041 11.603507 2.279403 0.655404 1.749095 6.793279 0.164896 18.550374 0.174962 ... 39.843405 106.735687 305.274672 70.364956 895.599603 1415.975389 840.530518 3513.234966 395.244668 0.000020
O 1.244926 3.686620 4.381357 0.155217 0.044633 0.562692 2.533730 0.758305 2.141030 0.484539 ... 5414.944076 4371.240663 5815.525102 2897.014578 14958.970521 15443.391745 7897.357003 8895.570576 16565.733127 44.703532
P 0.001018 0.000104 0.003666 0.000135 0.000039 0.000031 0.000096 0.000021 0.000116 0.000052 ... 1.324062 0.244611 1.104726 1.141934 50.552086 0.000000 1.089908 4.570108 41.517464 3.460032

1435 rows × 1435 columns

WIOD includes several satellite accounts, which are stored as child objects in pymrio. For example, in order to see the AIR emissions provided by WIOD:

In [86]:
wiod.AIR.F
Out[86]:
region AUS ... RoW
sector AtB C 15t16 17t18 19 20 21t22 23 24 25 ... 63 64 J 70 71t74 L M N O P
stressor
CO2 6.471152e+03 2.331841e+04 3256.861259 392.819896 91.570641 147.075293 2100.167306 7928.850694 8832.607331 82.623337 ... 4.530961e+04 23843.716275 17594.617416 11774.769870 5.787274e+04 1.118612e+05 25382.470248 4.575128e+04 4.851286e+04 0.0
CH4 3.226169e+06 1.370016e+06 1221.450093 41.723574 6.112471 64.722688 189.787544 33785.867211 768.018325 22.631731 ... 2.031444e+04 2430.969769 3979.962245 5525.320218 1.617241e+04 8.865122e+04 5001.012041 1.394311e+04 1.360473e+07 0.0
N2O 6.527106e+04 1.243851e+02 527.652440 10.773378 1.335362 14.793543 111.798406 146.523698 10421.185919 6.723839 ... 7.185897e+02 320.774141 342.725185 215.478088 1.228492e+03 2.995831e+03 272.108324 7.680525e+03 9.170715e+04 0.0
NOX 2.000881e+05 1.709849e+05 70375.533177 3875.234721 964.709338 9146.373832 36269.747108 18894.321469 34546.808023 663.707765 ... 1.419601e+05 87411.639720 68809.569199 60385.601411 2.027940e+05 4.224802e+05 99579.016981 1.666314e+05 1.565510e+05 0.0
SOX 1.976645e+04 4.713841e+04 45815.675397 1068.354291 265.958435 2521.542160 26680.445075 150018.069958 91733.983039 182.976023 ... 6.973313e+04 42938.026115 33800.385037 29662.394375 9.961571e+04 2.075292e+05 48914.840693 8.185206e+04 7.690040e+04 0.0
CO 1.496859e+06 7.159254e+05 227663.413138 16225.875707 4039.304699 38296.499606 82187.571692 56833.653485 393632.686253 2778.990301 ... 1.385415e+06 853066.323392 671525.284261 589314.228014 1.979104e+06 4.123062e+06 971810.003503 1.626186e+06 1.527810e+06 0.0
NMVOC 3.824729e+05 2.409498e+05 141642.740887 5460.933412 1359.456610 12888.958231 28691.901753 65893.299291 105133.073315 935.288872 ... 3.377663e+05 207978.880902 163718.896513 143675.714632 4.825085e+05 1.005209e+06 236928.772636 3.964667e+05 3.724824e+05 0.0
NH3 4.049434e+05 4.575323e+02 112.157985 4.313657 0.449874 13.342974 48.333137 4.143371 366.328954 4.740067 ... 4.569925e+02 324.340516 229.110878 244.663450 1.643215e+03 1.357458e+03 113.829614 6.203676e+02 4.965187e+03 0.0

8 rows × 1435 columns

WIOD, however, does neither provide any normalized data (A-matrix, satellite account coefficient data) nor any consumption based accounts (footprints).

In order to calculate them, one could go through all the missing data and compute each account. Pymrio provides the required function, for example to calculate the A-matrix:

In [87]:
x = pymrio.calc_x(Z=wiod.Z, Y=wiod.Y)
A = pymrio.calc_A(Z=wiod.Z, x=x)
In [88]:
A
Out[88]:
region AUS ... RoW
sector AtB C 15t16 17t18 19 20 21t22 23 24 25 ... 63 64 J 70 71t74 L M N O P
region sector
AUS AtB 9.545243e-02 3.464238e-04 2.208112e-01 8.678046e-02 9.675727e-02 9.363744e-02 9.559073e-03 0.000000e+00 8.643145e-03 8.966548e-03 ... 1.143737e-04 5.153717e-09 2.285107e-07 7.786856e-08 1.517644e-05 4.463792e-06 1.377724e-04 2.552552e-05 2.604967e-05 6.252650e-09
C 3.495287e-04 3.171799e-02 2.684019e-03 1.828425e-03 2.038639e-03 1.426456e-03 2.035491e-03 2.209097e-01 7.746427e-03 2.002071e-03 ... 1.226316e-06 1.086802e-07 9.492337e-09 1.571046e-07 1.873514e-05 4.527246e-07 4.066696e-07 7.050016e-07 1.253368e-06 1.432423e-07
15t16 2.253534e-02 8.314566e-04 9.544437e-02 1.105227e-02 1.232291e-02 1.456320e-03 1.730739e-03 1.810798e-03 3.348087e-02 5.162659e-03 ... 9.386042e-06 5.031958e-06 6.040074e-06 4.893121e-06 3.594692e-05 2.131039e-05 1.922126e-04 1.205233e-04 2.022545e-04 1.013494e-06
17t18 7.925177e-04 3.617934e-04 1.540124e-03 5.748141e-02 6.408983e-02 1.832667e-03 1.757217e-03 7.758542e-04 1.839870e-03 4.355138e-03 ... 2.321002e-06 5.746660e-07 2.435455e-06 1.127767e-06 1.939607e-06 9.390472e-06 1.961856e-06 5.808983e-06 6.168260e-06 1.759452e-07
19 2.043780e-04 9.330088e-05 3.971739e-04 1.482356e-02 1.652777e-02 4.726164e-04 4.531590e-04 2.000807e-04 4.744738e-04 1.123122e-03 ... 2.298108e-07 5.689976e-08 2.411432e-07 1.116643e-07 1.920475e-07 9.297846e-07 1.942504e-07 5.751684e-07 6.107418e-07 1.742097e-08
20 7.906150e-04 3.924691e-04 4.667269e-04 1.179269e-03 1.314845e-03 9.310718e-02 1.031044e-03 5.129666e-04 7.721879e-04 1.860587e-03 ... 1.569789e-07 2.622776e-07 1.034144e-07 3.672652e-07 1.027179e-06 3.373392e-06 5.702218e-06 4.711662e-06 3.270051e-06 1.734127e-06
21t22 2.488679e-03 1.266452e-03 1.761362e-02 8.436151e-03 9.406024e-03 9.028225e-03 9.877037e-02 1.158302e-03 1.458164e-02 1.357960e-02 ... 1.275682e-05 3.201056e-05 2.515780e-05 1.104735e-05 6.314445e-05 8.155468e-05 4.892308e-05 4.468136e-05 6.434762e-05 4.318119e-06
23 1.052491e-02 8.480671e-03 2.245310e-03 1.483519e-03 1.654073e-03 3.553353e-03 2.708104e-03 2.589105e-02 1.005231e-02 3.923105e-03 ... 3.416350e-04 1.421802e-05 1.825734e-05 2.052975e-05 4.717104e-05 3.951756e-05 3.844951e-05 4.783528e-05 4.536908e-05 1.873476e-06
24 2.201819e-02 3.267096e-03 3.596719e-03 9.442783e-03 1.052838e-02 1.345340e-02 1.449570e-02 1.270902e-02 7.773614e-02 8.195035e-02 ... 1.506918e-05 4.575816e-06 1.948819e-06 1.647242e-05 2.547979e-05 4.052365e-05 9.547135e-05 2.910657e-04 7.453921e-05 8.748107e-06
25 1.707418e-03 1.564396e-03 1.056379e-02 5.508362e-03 6.141640e-03 3.632864e-03 1.080628e-02 1.748439e-03 1.430431e-02 2.572307e-02 ... 5.632927e-06 7.692382e-06 1.150131e-06 5.973401e-06 8.133178e-06 3.694097e-06 7.141929e-06 1.255297e-05 9.510149e-05 1.413828e-06
26 8.300874e-04 8.678108e-04 3.705568e-03 8.538085e-04 9.519657e-04 4.044984e-03 1.042151e-03 4.262275e-04 4.207677e-03 3.726538e-03 ... 1.081552e-06 1.336338e-06 3.188789e-07 1.172484e-06 2.084547e-06 1.663780e-06 3.380811e-06 3.562251e-06 5.520482e-06 3.223368e-07
27t28 4.554108e-03 1.083406e-02 1.181599e-02 6.807970e-03 7.590656e-03 3.069896e-02 6.436061e-03 1.984656e-03 1.506619e-02 1.834829e-02 ... 9.038893e-05 2.521964e-05 3.884532e-06 3.262082e-05 3.260617e-05 5.988842e-06 1.235439e-05 1.034633e-05 6.836809e-05 8.190956e-06
29 3.627028e-03 5.075203e-03 1.717985e-03 1.551789e-03 1.730196e-03 2.226815e-03 1.582771e-03 1.833794e-03 1.997727e-03 2.696625e-03 ... 2.108044e-05 9.603697e-05 1.113799e-05 5.101199e-05 5.357540e-05 1.114620e-05 3.852276e-05 1.801469e-05 4.862310e-05 5.317948e-06
30t33 2.153648e-03 3.013541e-03 1.020101e-03 9.214175e-04 1.027351e-03 1.322232e-03 9.398136e-04 1.088865e-03 1.186205e-03 1.601195e-03 ... 1.158810e-05 5.279235e-05 6.122649e-06 2.804173e-05 2.945086e-05 6.127160e-06 2.117629e-05 9.902833e-06 2.672854e-05 2.923322e-06
34t35 2.021893e-03 2.310941e-03 9.632713e-04 1.340478e-03 1.494587e-03 8.076584e-04 6.876214e-04 9.062618e-04 1.018017e-03 1.089043e-03 ... 7.352105e-05 2.778595e-05 2.083430e-05 2.248783e-05 8.408238e-05 3.131583e-05 2.728541e-05 1.363798e-05 3.166618e-04 8.507998e-07
36t37 1.127941e-03 1.765168e-03 1.917391e-03 4.211241e-03 4.695389e-03 1.102878e-02 1.234853e-03 1.061171e-03 2.578636e-03 2.781882e-03 ... 1.308230e-06 5.755143e-06 2.449197e-06 1.309132e-06 7.091124e-06 5.237705e-06 6.787190e-06 5.831359e-06 1.568760e-05 5.505095e-05
E 1.499692e-02 1.420628e-02 1.251494e-02 1.395701e-02 1.556160e-02 1.432117e-02 1.247606e-02 6.240851e-03 1.442373e-02 1.789329e-02 ... 9.154146e-07 7.044061e-07 4.871253e-07 3.217489e-06 9.055480e-07 1.174175e-06 9.680754e-07 1.517063e-06 1.378784e-06 1.903253e-08
F 1.360746e-02 3.505686e-02 5.324030e-03 4.637599e-03 5.170766e-03 1.094197e-02 5.296883e-03 4.670855e-02 6.721375e-03 8.929691e-03 ... 5.600280e-06 9.568936e-06 1.113253e-05 7.926546e-06 9.067090e-06 5.476737e-06 9.405984e-06 1.100890e-05 7.963694e-06 1.015661e-06
50 2.431441e-02 1.767199e-02 1.446004e-02 2.570813e-02 2.866371e-02 2.300329e-02 2.534676e-02 5.780919e-03 1.573376e-02 2.206195e-02 ... 3.140204e-06 3.343744e-06 1.898412e-06 1.104805e-06 1.065609e-06 4.574315e-06 8.957863e-07 1.844958e-06 8.516482e-07 0.000000e+00
51 2.994267e-02 1.299483e-02 5.777609e-02 6.785618e-02 7.565735e-02 2.759728e-02 3.373251e-02 4.877930e-02 5.242621e-02 5.115054e-02 ... 4.763030e-06 2.788892e-06 4.270328e-06 2.378918e-06 1.045202e-05 1.162906e-05 2.939314e-05 2.806219e-05 4.402623e-05 2.089121e-05
52 3.103917e-02 1.371680e-02 5.058842e-02 6.004975e-02 6.695343e-02 2.897423e-02 3.006150e-02 5.009782e-02 5.218689e-02 5.116398e-02 ... 2.030524e-05 2.665619e-05 4.802384e-06 7.460440e-06 3.266258e-05 1.340428e-05 2.213729e-05 3.705392e-05 2.414192e-05 7.580637e-06
H 3.026227e-03 1.791411e-03 7.941179e-03 4.437522e-03 4.947688e-03 2.342159e-03 5.871258e-03 5.191425e-03 6.754904e-03 3.048826e-03 ... 7.765230e-05 1.838695e-05 5.194358e-05 1.086674e-05 5.719248e-05 4.511436e-05 4.961128e-05 3.918148e-05 2.240159e-05 4.135182e-06
60 1.024191e-02 2.631948e-02 2.816941e-02 2.042048e-02 2.276814e-02 2.185993e-02 1.788911e-02 1.318565e-02 2.123576e-02 3.057176e-02 ... 1.398308e-04 8.860144e-05 5.594204e-05 5.224277e-05 6.629123e-05 9.602985e-05 8.849378e-05 1.691941e-05 1.118433e-04 2.432832e-06
61 2.051217e-04 1.408422e-03 4.405726e-04 7.453346e-04 8.310221e-04 3.896332e-04 5.573955e-04 7.647723e-04 5.391867e-04 5.343877e-04 ... 1.553181e-05 8.734029e-05 4.108970e-05 2.298877e-04 8.576220e-05 3.882200e-05 1.495864e-05 5.263940e-06 4.387005e-05 0.000000e+00
62 1.475082e-04 1.662855e-04 1.564012e-04 2.886648e-04 3.218522e-04 1.668731e-04 3.954076e-04 1.071080e-04 2.592029e-04 1.818716e-04 ... 3.292612e-04 7.225310e-04 3.052984e-04 7.297651e-05 5.410537e-04 7.432628e-04 8.639905e-04 7.468203e-05 3.912055e-04 5.854582e-09
63 6.392364e-03 6.104943e-03 1.689689e-02 7.430379e-03 8.284623e-03 3.253636e-02 2.220364e-02 4.920529e-03 2.525026e-02 6.887328e-03 ... 1.361413e-04 2.416340e-04 9.780938e-05 4.223080e-05 1.718492e-04 2.334530e-04 2.696712e-04 2.389911e-05 1.356788e-04 6.965676e-09
64 4.791708e-03 3.500865e-03 5.028115e-03 5.694654e-03 6.349344e-03 7.437922e-03 1.126058e-02 5.738767e-03 5.754226e-03 6.837957e-03 ... 1.063165e-06 1.012409e-05 6.801641e-06 7.111149e-07 1.476533e-06 6.434816e-06 4.621220e-06 3.806759e-06 2.233677e-06 4.051845e-08
J 2.791092e-02 3.547802e-02 1.367411e-02 9.557522e-03 1.065632e-02 1.114137e-02 1.545988e-02 4.844083e-03 1.186206e-02 1.164773e-02 ... 6.187622e-05 1.226286e-04 1.435055e-04 8.891718e-05 9.507640e-05 2.576112e-05 9.062762e-05 3.307189e-05 8.814554e-05 1.162065e-05
70 1.184849e-02 1.476626e-02 1.126936e-02 5.261080e-03 5.865925e-03 3.002543e-02 1.896656e-02 9.334555e-03 3.946522e-03 4.856993e-03 ... 7.935000e-06 1.747596e-04 8.357947e-05 1.453466e-04 1.720999e-06 2.098989e-05 1.766217e-05 1.428835e-06 3.903513e-05 0.000000e+00
71t74 2.533896e-02 4.388576e-02 4.290132e-02 5.956587e-02 6.641394e-02 5.567354e-02 9.758191e-02 6.304072e-02 1.063683e-01 1.320528e-01 ... 7.876762e-05 1.395916e-04 1.808588e-04 8.189850e-05 1.268091e-04 4.376531e-05 1.329204e-04 4.673892e-05 8.499911e-05 1.623910e-05
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
RoW 20 3.510882e-05 1.664020e-05 1.159258e-05 3.506659e-05 3.910152e-05 5.922550e-03 6.727978e-05 1.463913e-05 1.679201e-05 8.564303e-05 ... 4.635225e-04 1.214882e-04 1.969953e-05 4.697987e-05 8.174026e-04 2.700865e-03 4.734647e-03 4.982587e-03 2.323206e-03 3.276844e-06
21t22 1.658736e-04 1.085033e-04 3.078895e-03 3.238512e-04 3.610832e-04 1.093445e-03 1.068736e-02 1.357563e-04 1.723166e-03 1.224775e-03 ... 1.363846e-02 1.721324e-02 1.290832e-02 2.011640e-03 3.501515e-02 2.305371e-02 2.178563e-02 1.550320e-02 2.777018e-02 4.242034e-04
23 8.334615e-03 6.911835e-03 1.152251e-03 3.862992e-04 4.307110e-04 2.539668e-03 1.853478e-03 2.128706e-02 7.582105e-03 2.450394e-03 ... 5.441694e-03 8.272746e-04 2.527745e-04 2.301674e-04 1.026303e-03 8.231878e-04 3.152969e-04 6.248875e-04 1.076571e-03 9.398751e-06
24 7.843298e-03 1.096612e-03 4.621698e-04 2.415051e-03 2.692702e-03 4.575386e-03 4.826445e-03 4.432906e-03 2.784513e-02 2.905466e-02 ... 1.498993e-03 2.731818e-04 1.477030e-04 3.070850e-04 1.908797e-03 8.154787e-04 1.037115e-03 2.641535e-02 3.722858e-03 8.717362e-05
25 1.779261e-04 1.865686e-04 1.285267e-03 4.790928e-04 5.341712e-04 4.078992e-04 1.350714e-03 2.213432e-04 1.726107e-03 3.175999e-03 ... 6.498322e-03 2.415678e-03 2.286832e-04 8.799544e-04 4.207683e-03 5.513186e-04 1.671249e-03 5.657399e-03 7.306548e-03 2.318299e-05
26 4.200168e-05 4.994567e-05 1.576002e-04 1.600803e-05 1.784992e-05 1.539833e-04 2.948380e-05 4.952723e-05 2.109350e-04 1.762376e-04 ... 6.942037e-04 1.911815e-04 3.044386e-05 2.418001e-04 5.060108e-04 6.305662e-04 1.122772e-03 2.879510e-03 1.015926e-03 1.863128e-05
27t28 2.057395e-04 1.582731e-03 4.832404e-04 4.641661e-04 5.175285e-04 1.919271e-03 5.989938e-04 1.447582e-04 9.383172e-04 3.857312e-03 ... 7.513691e-03 1.000853e-03 2.793485e-04 1.307364e-03 5.862185e-03 7.866711e-04 1.213631e-03 2.403292e-03 2.915337e-03 1.078904e-04
29 7.707755e-04 1.226441e-03 5.740710e-05 3.337164e-05 3.720676e-05 4.224796e-04 1.766253e-04 2.352090e-04 2.465773e-04 1.383318e-04 ... 4.038736e-03 1.013881e-03 5.139817e-04 3.231645e-04 1.388127e-03 1.079595e-03 6.056697e-04 8.134241e-03 7.983221e-04 3.783253e-05
30t33 1.167826e-04 1.211765e-04 6.060493e-05 1.522443e-04 1.697448e-04 5.812983e-05 1.951344e-04 3.001078e-05 1.272227e-04 2.360290e-04 ... 4.737404e-03 2.632534e-02 1.193230e-03 1.441396e-03 2.777103e-02 2.663635e-03 5.344463e-03 5.657652e-03 1.199844e-02 2.902145e-04
34t35 7.688827e-05 5.200366e-05 1.615412e-05 1.449356e-05 1.615982e-05 2.949217e-05 2.062420e-05 7.210811e-06 3.498644e-05 4.953800e-05 ... 7.248370e-03 4.054156e-03 8.447417e-04 7.468948e-04 8.393505e-03 3.766412e-03 2.501937e-03 1.012838e-03 1.831455e-02 1.638042e-04
36t37 3.055881e-05 1.315629e-04 3.562041e-05 1.612387e-04 1.797774e-04 1.144187e-04 6.554592e-05 2.682645e-05 8.864373e-05 1.056440e-04 ... 6.014585e-04 3.607389e-04 7.701232e-04 3.232502e-04 6.273113e-04 1.109093e-03 1.902955e-03 8.347403e-04 1.281464e-03 2.818247e-05
E 1.723488e-05 1.533854e-04 1.561774e-05 8.480458e-06 9.456626e-06 1.736757e-05 1.987059e-05 1.020014e-03 3.282241e-05 2.421028e-05 ... 2.665591e-02 2.326426e-02 8.277628e-03 9.169302e-03 1.626475e-02 2.182454e-02 2.703614e-02 3.298604e-02 2.675730e-02 8.041716e-04
F 1.482867e-05 3.760455e-05 5.632409e-06 2.985855e-06 3.330247e-06 2.285363e-05 5.267168e-06 4.916284e-05 9.100709e-06 1.054748e-05 ... 5.685248e-03 7.106705e-03 5.594665e-03 1.334423e-02 7.026546e-03 1.433666e-02 1.437194e-02 2.928010e-02 9.751275e-03 3.756862e-03
50 1.194688e-06 1.309183e-06 1.292692e-06 6.579291e-07 7.335663e-07 1.259355e-06 1.399098e-06 2.489237e-06 2.091397e-06 2.435528e-06 ... 3.026507e-03 1.881954e-03 8.708642e-04 4.019303e-04 1.279308e-03 2.061164e-03 7.638756e-04 2.806088e-03 1.410588e-03 8.550535e-05
51 5.909724e-05 1.566484e-03 1.641061e-04 7.783168e-05 8.677966e-05 8.530607e-05 1.624352e-04 1.151086e-02 2.406925e-04 1.371735e-04 ... 2.037217e-02 2.326355e-02 4.824642e-03 3.666519e-03 1.750009e-02 1.255146e-02 1.103523e-02 5.087498e-02 2.352018e-02 7.313450e-04
52 2.215730e-05 1.261601e-05 4.301374e-05 2.849014e-05 3.176559e-05 2.672115e-05 5.564125e-05 2.580488e-05 4.425963e-05 3.062034e-05 ... 1.273643e-02 1.100348e-02 3.267677e-03 1.823262e-03 8.865337e-03 6.727456e-03 5.105598e-03 2.077970e-02 1.081138e-02 1.130280e-03
H 1.682292e-05 9.158580e-06 5.083457e-05 1.901082e-05 2.119725e-05 1.122303e-05 2.957075e-05 2.355170e-05 3.582741e-05 1.176973e-05 ... 3.297633e-02 6.907895e-03 1.229342e-02 2.791137e-03 1.580071e-02 2.393968e-02 1.730286e-02 1.378837e-02 1.127952e-02 1.782123e-04
60 1.460800e-05 1.577955e-03 1.021082e-04 4.557166e-05 5.081090e-05 4.356550e-05 9.891395e-05 1.170256e-02 1.349199e-04 3.961665e-05 ... 4.458548e-02 1.628633e-02 1.148647e-02 2.081069e-03 1.381338e-02 1.470137e-02 1.105598e-02 1.601602e-02 1.519427e-02 2.211746e-03
61 1.836065e-06 1.577052e-06 5.726811e-07 5.976891e-07 6.664055e-07 8.159836e-07 1.132371e-06 4.120538e-06 1.876667e-06 7.434970e-07 ... 1.851134e-03 1.114494e-03 6.424323e-04 4.448378e-04 1.708628e-03 1.313160e-03 9.717703e-04 2.071914e-03 1.644260e-03 4.281323e-05
62 1.654230e-04 1.822507e-04 1.717965e-04 3.455211e-04 3.852430e-04 1.579839e-04 4.637686e-04 1.182948e-04 3.021496e-04 2.084551e-04 ... 3.084251e-03 4.250142e-03 2.141459e-03 3.522175e-04 3.808134e-03 5.028169e-03 4.630857e-03 2.257988e-03 2.842585e-03 5.763145e-05
63 6.632573e-06 6.630282e-06 9.874656e-06 1.046354e-05 1.166512e-05 1.509398e-05 1.855222e-05 4.804274e-06 1.597680e-05 7.997219e-06 ... 2.028130e-02 5.726512e-03 2.775980e-03 6.662956e-04 4.189074e-03 5.871056e-03 3.165483e-03 5.840747e-03 5.355978e-03 6.447764e-05
64 3.577238e-06 4.127777e-06 4.930753e-06 5.314405e-06 5.928232e-06 6.508422e-06 1.065996e-05 5.103417e-06 9.278705e-06 9.682380e-06 ... 1.257175e-02 6.476461e-02 1.910752e-02 2.619569e-03 1.201417e-02 2.276670e-02 1.342289e-02 1.970709e-02 1.082035e-02 1.407713e-03
J 1.025166e-04 6.756203e-05 1.182004e-04 2.075126e-05 2.313990e-05 5.008076e-05 1.064802e-04 2.635937e-05 4.522608e-05 5.176152e-05 ... 4.291901e-02 2.563675e-02 6.307525e-02 1.026956e-02 2.597393e-02 3.425631e-02 2.131347e-02 9.188695e-03 2.081480e-02 9.099021e-03
70 1.576078e-04 1.953262e-04 1.185048e-04 4.419358e-05 4.927398e-05 3.688409e-04 2.084993e-04 1.209730e-04 7.063195e-06 1.762465e-05 ... 1.000077e-02 1.647443e-02 1.222652e-02 4.825030e-03 1.233756e-02 1.161618e-02 1.124346e-02 1.606648e-02 1.905247e-02 1.243486e-06
71t74 7.854333e-05 1.467830e-04 1.388724e-04 1.851474e-04 2.064381e-04 1.859443e-04 3.296767e-04 2.191616e-04 3.316892e-04 4.286765e-04 ... 3.615061e-02 3.955041e-02 4.060754e-02 1.072703e-02 9.157631e-02 2.928839e-02 2.970506e-02 4.012722e-02 3.057818e-02 1.383222e-02
L 1.175477e-05 6.449308e-06 1.661944e-05 3.246837e-05 3.620128e-05 2.484669e-05 2.230079e-05 1.189337e-05 4.322979e-05 1.532728e-05 ... 3.522902e-03 2.246494e-03 2.603444e-03 1.106060e-03 1.552703e-03 6.532845e-03 1.157534e-03 2.376643e-03 2.289856e-03 0.000000e+00
M 2.832305e-05 8.204192e-05 1.659323e-04 4.266347e-04 4.756832e-04 1.002802e-04 1.566550e-04 2.057503e-04 1.810013e-04 1.611392e-04 ... 5.305973e-04 1.468300e-03 2.941653e-03 3.783907e-04 2.042580e-03 1.104782e-02 1.166086e-02 3.839729e-03 1.340734e-03 1.714365e-07
N 1.695224e-04 2.405173e-06 1.639727e-04 3.683784e-04 4.107304e-04 1.748235e-04 2.378499e-04 8.233382e-06 7.432884e-04 1.670556e-05 ... 2.305969e-04 3.381941e-04 4.981196e-04 1.254774e-04 1.163699e-03 2.029855e-03 1.876499e-03 9.059800e-03 1.003803e-03 3.328246e-09
O 2.673173e-05 3.046639e-05 6.191428e-05 2.508488e-05 2.797102e-05 5.624150e-05 8.871230e-05 3.786265e-05 8.578819e-05 4.626430e-05 ... 3.133942e-02 1.385036e-02 9.489248e-03 5.166065e-03 1.943697e-02 2.213870e-02 1.763098e-02 2.293957e-02 4.207200e-02 7.440960e-03
P 2.184964e-08 8.607322e-10 5.180862e-08 2.175294e-08 2.425357e-08 3.131646e-09 3.357920e-09 1.051279e-09 4.667549e-09 4.971642e-09 ... 7.663117e-06 7.750549e-07 1.802592e-06 2.036339e-06 6.568494e-05 0.000000e+00 2.433237e-06 1.178523e-05 1.054419e-04 5.759267e-04

1435 rows × 1435 columns

Alternativly, pymrio provides a function which iterates through all missing accounts and calculates them:

In [89]:
wiod.calc_all()
Out[89]:
<pymrio.core.mriosystem.IOSystem at 0x7f99ce516400>

At this point, a basic EE MRIO analysis is accomplished. For example, the regional consumption based accounts of the AIR emissions are now given by:

In [90]:
wiod.AIR.D_cba_reg
Out[90]:
region AUS AUT BEL BGR BRA CAN CHN CYP CZE DEU ... PRT ROU RUS SVK SVN SWE TUR TWN USA RoW
stressor
CO2 4.404070e+05 1.022100e+05 1.586176e+05 42924.986975 4.059629e+05 5.659664e+05 5.031700e+06 13943.187686 108758.745642 1.054136e+06 ... 7.658922e+04 1.173831e+05 1.311461e+06 40459.233377 24251.728341 9.434506e+04 3.494179e+05 2.246294e+05 6.210161e+06 5.620778e+06
CH4 4.275465e+06 7.599975e+05 1.030354e+06 464018.748607 1.352464e+07 4.068558e+06 5.433871e+07 157009.091900 780222.089424 6.668537e+06 ... 8.948877e+05 1.344168e+06 1.532052e+07 411099.098085 182504.004554 7.352664e+05 3.652537e+06 1.104729e+06 3.917121e+07 7.560548e+07
N2O 9.588178e+04 3.086814e+04 4.609171e+04 13203.713081 5.899229e+05 1.634371e+05 1.831795e+06 3200.309665 27441.728571 2.914646e+05 ... 3.091511e+04 5.163863e+04 4.422776e+05 13658.674182 7011.741463 3.576881e+04 9.538255e+04 3.551477e+04 1.182906e+06 3.590470e+06
NOX 2.359815e+06 3.324339e+05 4.508892e+05 142917.818720 2.786076e+06 1.904551e+06 1.925370e+07 35972.513098 292246.717821 2.701648e+06 ... 3.025544e+05 3.380263e+05 4.444685e+06 125333.624730 73379.182597 3.524920e+05 1.797639e+06 8.632669e+05 1.845556e+07 3.504645e+07
SOX 2.399335e+06 1.983047e+05 3.702525e+05 400357.951750 1.699074e+06 2.088103e+06 3.245490e+07 43500.967386 225907.785277 1.951840e+06 ... 1.918064e+05 4.979996e+05 1.398364e+06 103186.610826 48180.228365 2.078760e+05 1.548830e+06 1.075249e+06 1.523013e+07 2.860410e+07
CO 2.173900e+07 1.371366e+06 2.167114e+06 703172.284772 2.681292e+07 7.525147e+06 9.904520e+07 144686.477852 829881.093571 1.099191e+07 ... 1.194956e+06 2.055640e+06 2.165403e+07 455232.910264 580264.681074 2.048666e+06 4.860666e+06 4.927789e+06 1.005814e+08 3.566157e+08
NMVOC 3.101630e+06 3.582680e+05 5.920832e+05 190582.650539 5.323333e+06 2.131757e+06 2.016103e+07 43518.270216 273912.655126 2.923060e+06 ... 4.003833e+05 6.065405e+05 4.179851e+06 138654.031320 142881.841642 5.666544e+05 1.738178e+06 1.095519e+06 2.095710e+07 4.208942e+07
NH3 3.851776e+05 9.254548e+04 1.245648e+05 45897.394639 1.345046e+06 4.204562e+05 6.415339e+06 8931.594745 67224.140441 8.505438e+05 ... 8.987684e+04 1.911781e+05 7.889417e+05 35515.968170 23476.633339 8.488958e+04 5.979386e+05 1.032068e+05 3.090159e+06 8.572543e+06

8 rows × 41 columns

In [91]:
wiod.AIR.unit
Out[91]:
unit unit
stressor
CO2 Gg
CH4 t
N2O t
NOX undef
SOX undef
CO t
NMVOC t
NH3 t

Pymrio can be linked with the country converter coco to ease the aggreagtion of MRIO and results into different classifications. Using the country converter, WIOD can be aggregated into EU and non-EU countries with singling out Germany by:

In [92]:
import country_converter as coco
wiod.aggregate(region_agg = coco.agg_conc(original_countries='WIOD',
                                          aggregates=[{'DEU': 'DEU', 'GBR':'GBR'}, 'EU'],
                                          missing_countries='Other',
                                          merge_multiple_string=None))
Out[92]:
<pymrio.core.mriosystem.IOSystem at 0x7f99ce516400>

We rename the EU account to reflect that is does not include Germany:

In [93]:
wiod.rename_regions({'EU':'Rest of EU'})
Out[93]:
<pymrio.core.mriosystem.IOSystem at 0x7f99ce516400>

The regional footprint account are now:

In [94]:
wiod.AIR.D_cba_reg
Out[94]:
region Other Rest of EU DEU GBR
stressor
CO2 2.436179e+07 3.472823e+06 1.054136e+06 7.397044e+05
CH4 2.540661e+08 2.711250e+07 6.668537e+06 5.235498e+06
N2O 9.705186e+06 1.128531e+06 2.914646e+05 2.118832e+05
NOX 1.043111e+08 1.093267e+07 2.701648e+06 2.164933e+06
SOX 1.037493e+08 8.344435e+06 1.951840e+06 1.421854e+06
CO 7.661455e+08 5.466639e+07 1.099191e+07 1.068169e+07
NMVOC 1.280392e+08 1.577316e+07 2.923060e+06 2.986943e+06
NH3 2.672782e+07 3.493227e+06 8.505438e+05 5.900984e+05

To visualize for example the CH4 accounts:

In [97]:
import matplotlib.pyplot as plt
with plt.style.context('ggplot'):
    wiod.AIR.plot_account('CH4', figsize=(8,5))
    plt.savefig('airch4.png', dpi=300)
    plt.show()

To calculate the source (in terms of regions and sectors) of a certain stressor or impact driven by consumption, one needs to diagonalize this stressor/impact. This can be done with pymrio by:

In [107]:
diag_CH4 = wiod.AIR.diag_stressor('CH4')

and be reassigned to the aggreagated WIOD system:

In [108]:
wiod.CH4_source = diag_CH4

In the next step the automatic calculation routine of pymrio is called again to compute the missing accounts in this new extension: and be reassigned to the aggreagated WIOD system:

In [109]:
wiod.calc_all()
Out[109]:
<pymrio.core.mriosystem.IOSystem at 0x7f99ce516400>

The diagonalzied CH4 data now shows the source and destination of the specified stressor (CH4):

In [111]:
wiod.CH4_source.D_cba
Out[111]:
region Other ... GBR
sector AtB C 15t16 17t18 19 20 21t22 23 24 25 ... 63 64 J 70 71t74 L M N O P
region sector
Other AtB 6.120041e+07 8.455234e+04 3.658411e+07 2.988418e+06 867172.684194 230646.602537 441913.627992 1.766666e+05 6.045454e+05 197135.975631 ... 669.903691 3406.973739 8805.678036 6656.233633 4123.121986 19984.727842 9398.054711 44359.672517 12305.895420 3.055303e+00
C 1.008359e+06 6.714292e+06 2.047332e+06 6.420307e+05 117665.005135 33160.714629 281538.575874 5.643346e+06 1.564758e+06 231675.430540 ... 1405.758158 9357.742729 20287.540899 18680.219527 8586.783042 49408.298618 15853.401016 93562.146555 23512.720979 4.041194e+00
15t16 3.968202e+03 6.218228e+01 8.736127e+04 5.178453e+02 639.802755 24.298048 128.945944 1.099366e+02 4.216024e+02 83.091425 ... 0.460965 3.215184 8.818689 5.805941 3.871073 18.671491 8.695184 44.370659 11.707402 1.748308e-03
17t18 9.369869e+01 2.287802e+01 2.464623e+02 1.185856e+04 200.126039 4.500219 68.017013 3.330082e+01 7.862589e+01 59.680321 ... 0.093075 0.848278 1.738428 1.444981 0.919367 6.608830 2.031215 12.658218 3.765588 1.256168e-03
19 5.587156e+00 1.040420e+00 1.268140e+01 1.252185e+02 1231.987687 0.344568 4.205279 1.580128e+00 4.194052e+00 3.043624 ... 0.008632 0.117312 0.225215 0.171093 0.106037 1.104701 0.343349 1.430827 0.646012 7.547227e-05
20 1.561308e+02 6.147493e+01 4.322541e+02 1.245953e+02 27.379324 1381.359789 234.397113 7.234533e+01 1.014235e+02 37.539388 ... 0.179911 1.387275 2.795978 4.283582 1.350480 7.781235 3.029624 10.408169 3.996475 3.366896e-03
21t22 6.751097e+02 1.627560e+02 4.484595e+03 7.334511e+02 188.101338 39.183536 14327.285990 2.534831e+02 6.916735e+02 214.739864 ... 0.953524 7.149111 21.030825 15.963897 11.656301 37.133605 12.508683 58.157801 23.458376 6.876710e-03
23 1.790650e+04 3.400066e+03 2.821658e+04 7.934071e+03 1519.998585 392.952132 3281.219226 1.912358e+05 1.982417e+04 2957.791210 ... 18.755631 94.723897 213.954430 148.886705 94.359029 436.927718 126.400070 846.480169 225.285757 4.602509e-02
24 2.694867e+04 2.700883e+03 3.555563e+04 2.325546e+04 3689.291088 735.522243 6531.998421 4.783404e+03 1.619520e+05 13703.918492 ... 7.305244 85.499783 125.009957 112.840344 63.520407 396.327493 132.425376 2383.062267 240.265418 6.747982e-02
25 8.358400e+02 2.396096e+02 3.810656e+03 7.647482e+02 371.302364 28.543498 442.368979 3.097955e+02 8.592818e+02 7200.000465 ... 0.746145 11.505517 11.582911 11.146907 5.174222 39.772320 8.054072 54.214892 13.531754 5.836743e-03
26 1.315942e+03 7.695087e+02 5.280640e+03 9.447605e+02 200.893738 81.530849 367.058822 9.836938e+02 1.425007e+03 379.663226 ... 1.353884 17.458691 22.205837 34.341762 9.893636 83.535158 22.265063 99.120087 31.249722 1.589600e-02
27t28 3.949582e+03 2.871747e+03 1.295228e+04 2.884049e+03 718.706990 264.388027 1685.659619 3.366943e+03 3.849679e+03 1342.021095 ... 5.672639 89.464319 92.926938 101.498493 44.044700 464.136369 66.582120 431.634964 103.563873 5.796513e-02
29 9.501569e+01 6.065109e+01 1.935884e+02 8.053423e+01 14.653395 4.095661 29.439447 7.238835e+01 7.058591e+01 22.394188 ... 0.101733 1.240535 1.600889 1.826602 0.821058 11.989417 1.018641 6.812058 1.795579 1.256930e-03
30t33 5.476872e+01 3.265759e+01 1.573152e+02 5.125758e+01 9.665433 2.671277 29.927129 4.184367e+01 5.743871e+01 16.702589 ... 0.157455 8.551662 4.282678 3.458371 1.847720 22.561418 3.114806 24.158238 4.022266 1.655081e-03
34t35 8.482511e+01 2.749473e+01 1.775066e+02 4.436655e+01 9.255017 2.845981 23.834770 4.091727e+01 3.940561e+01 12.737457 ... 0.218583 0.908381 1.937734 2.071207 1.020793 26.418297 0.956509 7.216608 2.394056 7.651886e-04
36t37 1.675265e+02 5.552546e+01 4.432380e+02 2.949731e+02 42.805903 12.628848 112.089754 8.986565e+01 1.343993e+02 44.247558 ... 0.240189 2.695217 4.623776 4.528868 2.483860 23.619094 7.698765 46.565836 11.013037 4.476497e-02
E 1.403595e+05 9.215817e+04 3.669921e+05 1.136705e+05 16821.309524 5779.141735 58036.818431 1.233675e+05 1.386887e+05 32346.099229 ... 96.135858 712.377894 1264.895906 1105.351861 644.896991 3311.738782 898.362942 5661.464858 1709.829520 6.679862e-01
F 6.671418e+01 2.930599e+01 1.363920e+02 3.308021e+01 5.485058 1.758916 17.571153 3.848427e+01 3.341282e+01 8.270840 ... 0.054316 0.358898 0.834860 1.112270 0.396748 1.525357 0.411932 2.214370 1.005286 1.789790e-03
50 1.473884e+02 3.242555e+01 4.024322e+02 7.564697e+01 16.484610 4.705153 36.792203 6.197489e+01 6.983601e+01 21.183051 ... 0.091110 0.616489 1.289851 1.107441 0.772780 2.691458 0.708647 4.100701 1.598984 6.152276e-04
51 2.917101e+02 5.104727e+01 9.254414e+02 1.663195e+02 40.622198 10.256117 80.748760 1.760264e+02 1.497062e+02 43.119474 ... 0.129116 1.155648 1.855237 1.529971 0.986911 5.537912 1.298448 8.402936 2.353754 9.175284e-04
52 1.980672e+02 3.114731e+01 6.078705e+02 1.165154e+02 27.617980 5.589430 42.242767 7.491098e+01 8.275607e+01 24.027566 ... 0.080038 0.641078 1.179144 1.013914 0.657872 3.068789 0.738788 4.502771 1.497972 9.509817e-04
H 9.161163e+01 3.603381e+01 3.044604e+02 7.494469e+01 16.544039 3.879273 44.775176 4.875371e+01 7.019927e+01 19.953079 ... 0.427558 2.506956 9.009177 5.786757 3.487238 19.784391 8.159131 27.053358 6.473157 9.020081e-04
60 1.306433e+05 3.883769e+04 3.903510e+05 8.505062e+04 17097.565488 4587.329682 34243.834629 1.217630e+05 7.763102e+04 19389.879478 ... 121.257585 637.358436 1221.692076 970.157422 569.886192 3002.062250 959.417432 5188.163172 1412.842453 7.858543e-01
61 1.344326e+03 6.720273e+02 4.605315e+03 1.100060e+03 228.775039 73.436933 388.705914 9.202185e+02 8.402194e+02 233.150540 ... 1.164136 7.528740 13.026874 10.311059 6.234602 30.831566 9.002625 47.954412 14.872451 4.589544e-03
62 7.025370e+01 2.477774e+01 2.176760e+02 5.288287e+01 12.319219 3.104809 29.961988 3.656967e+01 4.711078e+01 12.645726 ... 0.400872 2.331830 8.282804 3.606693 1.989908 5.039581 1.174228 6.658976 3.976267 5.116654e-04
63 7.501150e+02 2.064720e+02 2.108235e+03 4.428759e+02 93.351997 26.717285 294.971136 4.288422e+02 3.868840e+02 109.204842 ... 24.826034 5.084054 12.509215 8.628373 5.505847 19.328820 5.869367 30.218240 12.439868 3.330378e-03
64 7.160093e+01 2.053783e+01 1.857915e+02 4.504288e+01 10.189179 2.372540 29.029024 3.177297e+01 4.360792e+01 10.649548 ... 0.142720 5.908736 4.015744 2.290272 1.274788 4.012211 1.062316 5.232479 2.577105 9.101693e-04
J 1.057905e+02 3.409685e+01 2.533903e+02 6.976359e+01 13.243995 3.179218 35.025344 4.984270e+01 5.772651e+01 14.831626 ... 0.135591 0.808763 8.798283 9.983568 1.171972 4.573954 0.947095 5.018313 2.402997 2.024046e-03
70 4.009327e+01 1.353161e+01 1.150544e+02 2.920940e+01 7.018406 1.576123 18.777324 1.962820e+01 2.229628e+01 6.874841 ... 0.066248 0.371273 1.276746 3.537162 0.596374 1.744151 0.464947 2.479306 1.284524 3.313915e-04
71t74 4.003462e+02 1.548823e+02 1.361723e+03 2.859492e+02 57.348454 14.952968 230.002906 2.156318e+02 3.790770e+02 84.060057 ... 0.864681 5.613067 22.938237 17.661694 32.307343 28.337788 9.022973 43.453721 20.433081 9.181638e-03
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
GBR 20 2.000422e-01 5.454195e-02 8.151368e-01 3.878745e-01 0.053347 1.472930 0.250148 1.582839e-01 5.200871e-01 0.088253 ... 0.088802 0.584860 1.830074 4.898221 0.577012 3.737935 2.903985 3.886890 1.977318 3.253135e-05
21t22 9.884119e-01 2.224861e-01 5.830676e+00 1.437209e+00 0.276256 0.055544 18.308417 5.220498e-01 3.096481e+00 0.438661 ... 0.414016 2.122992 18.048291 9.513266 5.526309 20.760576 15.305044 31.652130 11.177937 1.767870e-05
23 2.183744e+01 3.529085e+00 3.974080e+01 1.033047e+01 2.237345 0.514909 4.370331 2.420643e+02 3.049659e+01 3.709010 ... 0.348095 2.419776 7.495082 4.967229 3.051904 13.111787 4.859062 23.092436 6.719001 6.947245e-05
24 5.325144e+01 5.727935e+00 8.057743e+01 4.465230e+01 7.934088 1.406388 14.711913 1.414788e+01 8.414557e+02 28.664978 ... 0.351350 3.692617 9.608035 7.717618 4.163851 19.061807 8.903961 126.954420 13.057055 1.555767e-04
25 9.727668e-01 2.219012e-01 5.170679e+00 1.367663e+00 0.371977 0.044714 0.605914 4.691888e-01 2.729352e+00 9.680741 ... 0.161014 3.838738 3.367336 3.963191 0.902880 5.567668 2.250668 10.359250 2.834123 1.770201e-05
26 1.974633e+00 6.348137e-01 1.030502e+01 2.132264e+00 0.421779 0.135611 0.840643 2.209786e+00 4.860246e+00 1.330254 ... 0.596082 5.287810 11.020704 37.064268 2.468145 40.310585 22.092861 32.591331 19.995975 2.880693e-05
27t28 2.813773e+01 1.518249e+01 9.398045e+01 2.525050e+01 5.725239 1.659272 11.972402 2.600028e+01 4.559952e+01 12.598779 ... 1.171364 11.351622 28.661615 54.370462 8.008398 72.343295 25.132927 82.619124 22.885049 6.028148e-04
29 3.151289e-01 1.463451e-01 7.155515e-01 2.616028e-01 0.045551 0.012580 0.101183 2.257151e-01 3.324839e-01 0.073039 ... 0.008861 0.103520 0.243057 0.309568 0.102587 1.925858 0.143972 0.643460 0.199668 2.827839e-06
30t33 3.105359e-01 1.712632e-01 8.910380e-01 3.221453e-01 0.071169 0.014046 0.157962 2.500831e-01 5.523582e-01 0.114256 ... 0.012664 0.391931 0.365858 0.326273 0.142666 1.438764 0.265489 3.518572 0.313606 5.563921e-06
34t35 7.589583e-01 1.780247e-01 1.344476e+00 3.277294e-01 0.070104 0.022184 0.148950 2.989953e-01 4.313005e-01 0.089470 ... 0.038255 0.217855 0.745272 0.590423 0.314851 3.928255 0.384131 1.999467 0.555115 4.906527e-06
36t37 1.702979e-01 5.201870e-02 5.090770e-01 5.360197e-01 0.054614 0.009291 0.099053 1.053597e-01 3.126257e-01 0.068908 ... 0.016776 0.176081 0.446172 0.443790 0.171798 1.587881 0.967603 2.347109 1.082592 1.244562e-04
E 2.354224e+02 5.606692e+01 1.152846e+03 3.536711e+02 47.232557 12.184222 233.801401 3.633556e+02 1.314554e+03 156.358296 ... 84.695190 828.545122 2458.369835 1710.310436 889.822088 5738.760570 2899.662691 10913.660772 2677.657219 3.343791e-03
F 7.426710e-02 1.836039e-02 2.731157e-01 9.046532e-02 0.014838 0.003156 0.044210 1.098496e-01 2.107248e-01 0.024751 ... 0.154551 0.932531 3.730183 17.570835 0.470916 8.602413 0.867968 3.796908 1.398547 9.530366e-07
50 8.964672e-02 1.901743e-02 4.014399e-01 1.365744e-01 0.019114 0.003601 0.067239 5.850685e-02 4.596364e-01 0.042928 ... 0.052081 0.545460 1.678625 1.112100 0.597034 2.056668 1.121701 4.476159 1.077987 1.183451e-06
51 3.088434e-01 6.958213e-02 1.474519e+00 5.569160e-01 0.074388 0.012701 0.270170 1.965917e-01 1.979513e+00 0.175827 ... 0.068362 1.409606 2.038704 1.639295 0.703303 6.026781 2.143482 16.446690 2.507304 4.709171e-06
52 3.918129e-01 8.635857e-02 1.923585e+00 7.491106e-01 0.096748 0.016225 0.359054 2.522937e-01 2.748557e+00 0.240020 ... 0.091897 1.986871 2.662656 2.203725 0.841767 8.380705 2.997356 23.081123 3.372363 5.916739e-06
H 1.113608e-01 4.390106e-02 3.986463e-01 1.077135e-01 0.023937 0.004759 0.055543 8.577262e-02 1.620509e-01 0.029420 ... 0.022379 0.138366 0.571953 0.353780 0.176948 1.161726 0.532458 1.631887 0.349026 2.333077e-06
60 2.754940e+00 6.609753e-01 1.332172e+01 4.460628e+00 0.608487 0.182822 2.403979 2.429349e+00 1.006287e+01 1.319905 ... 2.296966 12.586465 26.799924 16.732540 8.596100 52.970544 34.879116 110.677337 19.030206 3.828495e-05
61 4.536998e+00 1.624189e+00 1.579957e+01 3.828540e+00 0.816974 0.298668 1.283757 2.523284e+00 2.900859e+00 0.789541 ... 0.008069 0.045226 0.106559 0.089867 0.044655 0.197549 0.074564 0.344930 0.098596 1.765620e-05
62 4.590595e-01 1.346961e-01 1.539794e+00 4.665823e-01 0.109073 0.023550 0.262561 2.616871e-01 5.725218e-01 0.111555 ... 0.163308 1.027234 4.233953 1.561368 0.717304 1.713055 0.388553 2.063975 1.388645 4.100640e-06
63 2.484291e-01 6.925377e-02 9.400353e-01 2.977646e-01 0.052919 0.012708 0.128143 1.640988e-01 6.779286e-01 0.080418 ... 7.599879 1.100903 3.470155 2.050127 1.014550 2.824016 1.672181 4.698872 2.168139 2.284501e-06
64 1.407675e-01 3.448308e-02 5.260340e-01 1.754490e-01 0.031017 0.005951 0.091087 9.748329e-02 4.102414e-01 0.046842 ... 0.116249 30.787555 8.118920 3.387044 1.166617 5.551196 1.342909 5.628860 2.033493 1.992910e-06
J 2.945134e-01 7.269180e-02 9.089373e-01 3.443261e-01 0.059329 0.011210 0.115796 1.908816e-01 4.660894e-01 0.070914 ... 0.062332 0.352247 38.891187 9.358224 0.480883 2.639336 0.481299 2.278986 0.917589 4.211499e-06
70 3.417731e-02 8.092379e-03 1.393168e-01 5.109920e-02 0.008031 0.001594 0.029035 2.296072e-02 1.296233e-01 0.014935 ... 0.040260 0.278102 1.589287 61.416295 0.198766 1.658600 0.367760 1.805509 0.512929 5.159811e-07
71t74 5.326215e-01 1.496871e-01 2.209102e+00 6.653873e-01 0.122527 0.023684 0.422826 3.977440e-01 1.720979e+00 0.191070 ... 0.422122 2.242442 14.520247 9.000279 36.758745 13.267614 5.749922 19.445780 10.256187 8.305999e-06
L 9.466196e-02 2.089716e-02 2.996809e-01 1.029974e-01 0.016117 0.003543 0.049667 5.734222e-02 2.664158e-01 0.029178 ... 0.038338 0.405192 1.175770 13.516836 1.529716 428.845380 0.481035 2.251237 0.818851 1.123609e-06
M 9.777632e-02 3.145764e-02 3.258355e-01 1.032990e-01 0.018104 0.003624 0.049653 8.012579e-02 2.512514e-01 0.030422 ... 0.078080 0.737394 2.960776 1.948723 1.218851 12.071626 262.719456 6.602460 1.921072 1.096000e-06
N 3.228073e-02 6.435460e-03 1.143816e-01 3.778054e-02 0.005771 0.001157 0.017438 2.534468e-02 1.303597e-01 0.012955 ... 0.015608 0.167765 1.189860 0.421127 0.153445 0.781366 0.315437 469.171324 0.862370 3.515825e-07
O 6.700844e+02 2.086950e+02 2.736001e+03 8.992386e+02 160.827573 30.700483 999.991278 5.071570e+02 1.914000e+03 234.813335 ... 524.375291 3968.472958 13437.782869 8261.318163 5982.530122 32294.925107 9563.583351 50181.679099 684163.130669 1.518889e-02
P 2.450826e-04 6.504063e-05 1.110552e-03 3.772696e-04 0.000053 0.000013 0.000249 3.237921e-04 9.242410e-04 0.000124 ... 0.000637 0.001564 0.004888 0.005580 0.002203 0.006706 0.008064 0.016136 0.006521 8.560598e+01

140 rows × 140 columns

In this square footprint matrix, every column respresents the amount of stressor occuring in each region - sector driven by the consumption stated in the column header. Conversly, each row states where the stressor impacts occuring in the row are distributed due (from where they are driven).

In [174]:
CH4_source_reg = wiod.CH4_source.D_cba.groupby(
    level='region', axis=0).sum().groupby(
    level='region', axis=1).sum()
In [175]:
CH4_source_reg
Out[175]:
region DEU GBR Other Rest of EU
region
DEU 1.485343e+06 4.634238e+04 2.892830e+05 3.819713e+05
GBR 5.139252e+04 1.833541e+06 2.112405e+05 1.879226e+05
Other 3.696832e+06 2.711860e+06 2.457410e+08 1.317725e+07
Rest of EU 7.402886e+05 4.186665e+05 1.756700e+06 1.128755e+07
In [177]:
import seaborn as sns
CH4_source_reg.columns.name = 'Receiving region'
CH4_source_reg.index.name = 'Souce region'
sns.heatmap(CH4_source_reg, vmax=5E6, 
            annot=True, cmap='YlOrRd', linewidths=0.1,
            cbar_kws={'label': 'CH4 emissions ({})'.format(wiod.CH4_source.unit.unit[0])})
plt.savefig('airch4_source_reg.png', dpi=300)
plt.show()

Storing the MRIO database can be done with

In [178]:
storage_path = '/tmp/wiod/aly'
wiod.save_all(storage_path)
Out[178]:
<pymrio.core.mriosystem.IOSystem at 0x7f99ce516400>

From where it can be received subsequently by:

In [180]:
wiod = pymrio.load_all(storage_path)

The meta attribute of pymrio mentioned at the beginning kept track of all modifications of the system. This can be shown with:

In [183]:
wiod.meta
Out[183]:
Description: WIOD metadata file for pymrio
MRIO Name: WIOD
System: industry-by-industry
Version: data13
File: /tmp/wiod/aly/metadata.json
History:
20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/factor_inputs
20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/SEA
20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/AIR
20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/CO2
20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/EM
20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/EU
20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/lan
20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/mat
20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/wat
20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/CH4_source
 ... (more lines in history)

Custom notes can be added to the meta with:

In [184]:
wiod.meta.note("Custom note")

The history of the meta data can be filtered for specific entries like:

In [ ]:
 
In [185]:
wiod.meta.file_io_history
Out[185]:
['20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/factor_inputs',
 '20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/SEA',
 '20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/AIR',
 '20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/CO2',
 '20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/EM',
 '20180112 12:34:15 - FILEIO -  Added satellite account from /tmp/wiod/aly/EU',
 '20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/lan',
 '20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/mat',
 '20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/wat',
 '20180112 12:34:14 - FILEIO -  Added satellite account from /tmp/wiod/aly/CH4_source',
 '20180112 12:34:14 - FILEIO -  Loaded IO system from /tmp/wiod/aly',
 '20180112 12:33:33 - FILEIO -  Saved WIOD to /tmp/wiod/aly',
 '20180112 10:22:55 - FILEIO -  Extension wat parsed from /tmp/wiod/raw',
 '20180112 10:22:54 - FILEIO -  Extension mat parsed from /tmp/wiod/raw',
 '20180112 10:22:53 - FILEIO -  Extension lan parsed from /tmp/wiod/raw',
 '20180112 10:22:52 - FILEIO -  Extension EU parsed from /tmp/wiod/raw',
 '20180112 10:22:50 - FILEIO -  Extension EM parsed from /tmp/wiod/raw',
 '20180112 10:22:48 - FILEIO -  Extension CO2 parsed from /tmp/wiod/raw',
 '20180112 10:22:47 - FILEIO -  Extension AIR parsed from /tmp/wiod/raw',
 '20180112 10:22:45 - FILEIO -  SEA file extension parsed from /tmp/wiod/raw',
 '20180112 10:22:39 - FILEIO -  WIOD data parsed from /tmp/wiod/raw/wiot08_row_sep12.xlsx',
 '20180112 09:23:36 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/water/wat_may12.zip to wat_may12.zip',
 '20180112 09:23:36 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/materials/mat_may12.zip to mat_may12.zip',
 '20180112 09:23:35 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/land/lan_may12.zip to lan_may12.zip',
 '20180112 09:23:35 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/AIR/AIR_may12.zip to AIR_may12.zip',
 '20180112 09:23:34 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/CO2/CO2_may12.zip to CO2_may12.zip',
 '20180112 09:23:33 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/EM/EM_may12.zip to EM_may12.zip',
 '20180112 09:23:32 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/EU/EU_may12.zip to EU_may12.zip',
 '20180112 09:23:32 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/SEA/WIOD_SEA_July14.xlsx to WIOD_SEA_July14.xlsx',
 '20180112 09:23:31 - FILEIO -  Downloaded http://www.wiod.org/protected3/data13/update_sep12/wiot/wiot08_row_sep12.xlsx to wiot08_row_sep12.xlsx']

This tutorial gave a short overview about the basic functionality of pymrio. For more information about the capabilities of pymrio check the online documentation.

In [ ]: