{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Handling the WIOD EE MRIO database" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Getting the database" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The WIOD database is available at http://www.wiod.org. You can download these files with the pymrio automatic downloader as described at [WIOD download](autodownload.ipynb#WIOD-download)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the most simple case you get the full WIOD database with:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pymrio" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "wiod_storage = \"/tmp/mrios/WIOD2013\"" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "wiod_meta = pymrio.download_wiod2013(storage_folder=wiod_storage)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This download the whole 2013 release of WIOD including all extensions. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The extension (satellite accounts) are provided as zip files. You can use them directly in pymrio (without extracting them). If you want to have them extracted, create a folder with the name of each extension (without the ending \".zip\") and extract the zip file there." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Parsing" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Parsing a single year" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "A single year of the WIOD database can be parse by:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "wiod2007 = pymrio.parse_wiod(year=2007, path=wiod_storage)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Which loads the specific year and extension data:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
regionAUS...RoW
sectorAtBC15t1617t18192021t22232425...6364J7071t74LMNOP
regionsector
AUSAtB3784.74947033.52051013821.807920474.033810136.300060810.877200234.9487900.000000185.78457081.938000...10.4818740.0008080.0317350.0232805.8614761.12384825.3330194.2915624.8747670.000791
C26.2534366671.832980324.99319320.7853955.97647326.981388105.0294726659.692127352.99263434.737431...0.2203340.0283630.0045410.0811855.4420780.2920770.2321910.3108900.4435090.001000
15t16929.95829681.4902306201.54306260.05487917.26772013.58888245.24611524.007404754.67535050.919526...0.9360951.4952633.8298242.43449813.9894958.138864133.90041048.04540862.5371530.001805
17t1831.97148833.97075195.871008295.91179585.08421816.34023843.5361159.52595339.10182938.656918...0.5602070.3670820.6511730.7792753.2153935.5154910.8543782.0592343.0276870.001752
198.2449498.76052824.72364076.31104221.9418954.21389311.2272852.45659510.0837539.969017...0.0503650.0330020.0585440.0700610.2890790.4958690.0768130.1851350.2722040.000157
\n", "

5 rows × 1435 columns

\n", "
" ], "text/plain": [ "region AUS \\\n", "sector AtB C 15t16 17t18 19 \n", "region sector \n", "AUS AtB 3784.749470 33.520510 13821.807920 474.033810 136.300060 \n", " C 26.253436 6671.832980 324.993193 20.785395 5.976473 \n", " 15t16 929.958296 81.490230 6201.543062 60.054879 17.267720 \n", " 17t18 31.971488 33.970751 95.871008 295.911795 85.084218 \n", " 19 8.244949 8.760528 24.723640 76.311042 21.941895 \n", "\n", "region \\\n", "sector 20 21t22 23 24 25 \n", "region sector \n", "AUS AtB 810.877200 234.948790 0.000000 185.784570 81.938000 \n", " C 26.981388 105.029472 6659.692127 352.992634 34.737431 \n", " 15t16 13.588882 45.246115 24.007404 754.675350 50.919526 \n", " 17t18 16.340238 43.536115 9.525953 39.101829 38.656918 \n", " 19 4.213893 11.227285 2.456595 10.083753 9.969017 \n", "\n", "region ... RoW \\\n", "sector ... 63 64 J 70 71t74 \n", "region sector ... \n", "AUS AtB ... 10.481874 0.000808 0.031735 0.023280 5.861476 \n", " C ... 0.220334 0.028363 0.004541 0.081185 5.442078 \n", " 15t16 ... 0.936095 1.495263 3.829824 2.434498 13.989495 \n", " 17t18 ... 0.560207 0.367082 0.651173 0.779275 3.215393 \n", " 19 ... 0.050365 0.033002 0.058544 0.070061 0.289079 \n", "\n", "region \n", "sector L M N O P \n", "region sector \n", "AUS AtB 1.123848 25.333019 4.291562 4.874767 0.000791 \n", " C 0.292077 0.232191 0.310890 0.443509 0.001000 \n", " 15t16 8.138864 133.900410 48.045408 62.537153 0.001805 \n", " 17t18 5.515491 0.854378 2.059234 3.027687 0.001752 \n", " 19 0.495869 0.076813 0.185135 0.272204 0.000157 \n", "\n", "[5 rows x 1435 columns]" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wiod2007.Z.head()" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
regionAUS...RoW
sectorAtBC15t1617t18192021t22232425...6364J7071t74LMNOP
stressor
CO26.367691e+032.365858e+043126.525484409.17610496.323715152.7328472170.3618898058.1479979119.70025782.396753...4.519067e+0422917.44132417723.69022913910.5675045.601616e+041.098584e+0523671.9607534.305903e+044.631917e+040.0
CH43.221551e+061.368899e+061213.87199243.7591186.25203864.497627196.13256333393.021316778.09734424.219940...2.066574e+042367.3449094044.8533986769.9921261.631978e+048.902853e+044809.7953381.357472e+041.341403e+070.0
N2O6.460006e+041.209250e+02519.40435911.0813221.35827714.745548111.627792146.8155189240.2594976.956387...7.461038e+02320.047984356.817406269.6342421.250597e+033.028098e+03266.1985317.628004e+039.028870e+040.0
NOX1.755811e+051.722916e+0568672.0020504040.8866511012.7972009028.94317436118.41046220162.14902632405.126521643.318443...1.590800e+0593897.47999377084.03804281937.1528242.207988e+054.710649e+05105912.3535181.790062e+051.693474e+050.0
SOX1.658225e+044.307541e+0446636.4399021010.280269253.2139892257.36674317059.702285108904.02006879131.591852160.838941...5.841325e+0434478.60187728304.80497330086.8401518.107600e+041.729722e+0538890.3927036.573001e+046.218337e+040.0
CO1.512935e+068.801313e+05247496.40864920642.3896525173.75423946123.28413390805.12690365080.776447406113.7133063286.315879...1.124907e+06663979.652027545086.329897579404.2845911.561340e+063.331053e+06748940.7345031.265811e+061.197511e+060.0
NMVOC3.999910e+052.800153e+05148660.5352476567.4107091646.03854314674.19980131944.464014127366.360161111694.0122361045.546880...3.455864e+05203983.475230167457.848344178000.7853754.796646e+051.023344e+06230084.6619303.888741e+053.678914e+050.0
NH35.199660e+054.613353e+02108.5765684.4127110.46263213.14282947.7896104.104788358.4820704.786318...4.530937e+02316.828348233.201236313.1924591.620282e+031.332001e+03107.0318555.911219e+024.808552e+030.0
\n", "

8 rows × 1435 columns

\n", "
" ], "text/plain": [ "region AUS \\\n", "sector AtB C 15t16 17t18 \n", "stressor \n", "CO2 6.367691e+03 2.365858e+04 3126.525484 409.176104 \n", "CH4 3.221551e+06 1.368899e+06 1213.871992 43.759118 \n", "N2O 6.460006e+04 1.209250e+02 519.404359 11.081322 \n", "NOX 1.755811e+05 1.722916e+05 68672.002050 4040.886651 \n", "SOX 1.658225e+04 4.307541e+04 46636.439902 1010.280269 \n", "CO 1.512935e+06 8.801313e+05 247496.408649 20642.389652 \n", "NMVOC 3.999910e+05 2.800153e+05 148660.535247 6567.410709 \n", "NH3 5.199660e+05 4.613353e+02 108.576568 4.412711 \n", "\n", "region \\\n", "sector 19 20 21t22 23 \n", "stressor \n", "CO2 96.323715 152.732847 2170.361889 8058.147997 \n", "CH4 6.252038 64.497627 196.132563 33393.021316 \n", "N2O 1.358277 14.745548 111.627792 146.815518 \n", "NOX 1012.797200 9028.943174 36118.410462 20162.149026 \n", "SOX 253.213989 2257.366743 17059.702285 108904.020068 \n", "CO 5173.754239 46123.284133 90805.126903 65080.776447 \n", "NMVOC 1646.038543 14674.199801 31944.464014 127366.360161 \n", "NH3 0.462632 13.142829 47.789610 4.104788 \n", "\n", "region ... RoW \\\n", "sector 24 25 ... 63 64 \n", "stressor ... \n", "CO2 9119.700257 82.396753 ... 4.519067e+04 22917.441324 \n", "CH4 778.097344 24.219940 ... 2.066574e+04 2367.344909 \n", "N2O 9240.259497 6.956387 ... 7.461038e+02 320.047984 \n", "NOX 32405.126521 643.318443 ... 1.590800e+05 93897.479993 \n", "SOX 79131.591852 160.838941 ... 5.841325e+04 34478.601877 \n", "CO 406113.713306 3286.315879 ... 1.124907e+06 663979.652027 \n", "NMVOC 111694.012236 1045.546880 ... 3.455864e+05 203983.475230 \n", "NH3 358.482070 4.786318 ... 4.530937e+02 316.828348 \n", "\n", "region \\\n", "sector J 70 71t74 L \n", "stressor \n", "CO2 17723.690229 13910.567504 5.601616e+04 1.098584e+05 \n", "CH4 4044.853398 6769.992126 1.631978e+04 8.902853e+04 \n", "N2O 356.817406 269.634242 1.250597e+03 3.028098e+03 \n", "NOX 77084.038042 81937.152824 2.207988e+05 4.710649e+05 \n", "SOX 28304.804973 30086.840151 8.107600e+04 1.729722e+05 \n", "CO 545086.329897 579404.284591 1.561340e+06 3.331053e+06 \n", "NMVOC 167457.848344 178000.785375 4.796646e+05 1.023344e+06 \n", "NH3 233.201236 313.192459 1.620282e+03 1.332001e+03 \n", "\n", "region \n", "sector M N O P \n", "stressor \n", "CO2 23671.960753 4.305903e+04 4.631917e+04 0.0 \n", "CH4 4809.795338 1.357472e+04 1.341403e+07 0.0 \n", "N2O 266.198531 7.628004e+03 9.028870e+04 0.0 \n", "NOX 105912.353518 1.790062e+05 1.693474e+05 0.0 \n", "SOX 38890.392703 6.573001e+04 6.218337e+04 0.0 \n", "CO 748940.734503 1.265811e+06 1.197511e+06 0.0 \n", "NMVOC 230084.661930 3.888741e+05 3.678914e+05 0.0 \n", "NH3 107.031855 5.911219e+02 4.808552e+03 0.0 \n", "\n", "[8 rows x 1435 columns]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wiod2007.AIR.F" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If a WIOD SEA file is present (at the root of path or in a folder named\n", "'SEA' - only one file!), the labor data of this file gets included in the\n", "factor_input extension (calculated for the the three skill levels\n", "available). The monetary data in this file is not added because it is only\n", "given in national currency:" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
regionAUS...RoW
sectorAtBC15t1617t18192021t22232425...6364J7071t74LMNOP
inputtype
EMP349.906604147.955799189.22954149.1526184.17475152.350134124.0768255.88691546.40085937.624869...0.00.00.00.00.00.00.00.00.00.0
EMPE177.972976145.153389183.69130340.2400163.16887344.836024117.4580295.85902545.33823236.800479...0.00.00.00.00.00.00.00.00.00.0
H_EMP743.950259326.446887365.28760889.9886348.279106108.256975229.72732011.71074189.72163673.069805...0.00.00.00.00.00.00.00.00.00.0
H_EMPE367.588214321.341746351.47049074.6470466.19728492.854499218.04100811.68412088.04576171.235855...0.00.00.00.00.00.00.00.00.00.0
\n", "

4 rows × 1435 columns

\n", "
" ], "text/plain": [ "region AUS \\\n", "sector AtB C 15t16 17t18 19 \n", "inputtype \n", "EMP 349.906604 147.955799 189.229541 49.152618 4.174751 \n", "EMPE 177.972976 145.153389 183.691303 40.240016 3.168873 \n", "H_EMP 743.950259 326.446887 365.287608 89.988634 8.279106 \n", "H_EMPE 367.588214 321.341746 351.470490 74.647046 6.197284 \n", "\n", "region ... RoW \\\n", "sector 20 21t22 23 24 25 ... 63 \n", "inputtype ... \n", "EMP 52.350134 124.076825 5.886915 46.400859 37.624869 ... 0.0 \n", "EMPE 44.836024 117.458029 5.859025 45.338232 36.800479 ... 0.0 \n", "H_EMP 108.256975 229.727320 11.710741 89.721636 73.069805 ... 0.0 \n", "H_EMPE 92.854499 218.041008 11.684120 88.045761 71.235855 ... 0.0 \n", "\n", "region \n", "sector 64 J 70 71t74 L M N O P \n", "inputtype \n", "EMP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n", "EMPE 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n", "H_EMP 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n", "H_EMPE 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 \n", "\n", "[4 rows x 1435 columns]" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wiod2007.SEA.F" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Provenance tracking and additional meta data is availabe in the field ```meta```:" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Description: WIOD metadata file for pymrio\n", "MRIO Name: WIOD\n", "System: industry-by-industry\n", "Version: data13\n", "File: /tmp/mrios/WIOD2013/metadata.json\n", "History:\n", "20210224 11:49:16 - FILEIO - Extension wat parsed from /tmp/mrios/WIOD2013\n", "20210224 11:49:15 - FILEIO - Extension mat parsed from /tmp/mrios/WIOD2013\n", "20210224 11:49:14 - FILEIO - Extension lan parsed from /tmp/mrios/WIOD2013\n", "20210224 11:49:13 - FILEIO - Extension EU parsed from /tmp/mrios/WIOD2013\n", "20210224 11:49:11 - FILEIO - Extension EM parsed from /tmp/mrios/WIOD2013\n", "20210224 11:49:09 - FILEIO - Extension CO2 parsed from /tmp/mrios/WIOD2013\n", "20210224 11:49:08 - FILEIO - Extension AIR parsed from /tmp/mrios/WIOD2013\n", "20210224 11:49:06 - FILEIO - SEA file extension parsed from /tmp/mrios/WIOD2013\n", "20210224 11:48:52 - METADATA_CHANGE - Changed parameter \"system\" from \"IxI\" to \"industry-by-industry\"\n", "20210224 11:48:52 - FILEIO - WIOD data parsed from /tmp/mrios/WIOD2013/wiot07_row_apr12.xlsx\n", " ... (more lines in history)\n" ] } ], "source": [ "print(wiod2007.meta)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "WIOD provides three different sector/final demand categories naming\n", "schemes. The one to use for pymrio can specified by passing a tuple \n", "```names=``` with:\n", "\n", "1) 'isic': ISIC rev 3 Codes - available for interindustry flows and final demand rows.\n", "\n", "2) 'full': Full names - available for final demand rows and final demand columns (categories) and interindustry flows.\n", "\n", "3) 'c_codes' : WIOD specific sector numbers, available for final demand rows and columns (categories) and interindustry flows.\n", "\n", "Internally, the parser relies on 1) for the interindustry flows and 3) for the final demand categories. This is the default and will also be used if just 'isic' gets passed ('c_codes' also replace 'isic' if this was passed for final demand categories). To specify different finial consumption category names, pass a tuple with (sectors/interindustry classification, fd categories), eg ('isic', 'full'). Names are case insensitive and passing the first character is sufficient.\n", "\n", "For example, for loading wiod with full sector names:\n", "\n" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
regionAUSAUT...USARoW
categoryFinal consumption expenditure by householdsFinal consumption expenditure by non-profit organisations serving households (NPISH)Final consumption expenditure by governmentGross fixed capital formationChanges in inventories and valuablesFinal consumption expenditure by householdsFinal consumption expenditure by non-profit organisations serving households (NPISH)Final consumption expenditure by governmentGross fixed capital formationChanges in inventories and valuables...Final consumption expenditure by householdsFinal consumption expenditure by non-profit organisations serving households (NPISH)Final consumption expenditure by governmentGross fixed capital formationChanges in inventories and valuablesFinal consumption expenditure by householdsFinal consumption expenditure by non-profit organisations serving households (NPISH)Final consumption expenditure by governmentGross fixed capital formationChanges in inventories and valuables
regionsector
AUSAgriculture, Hunting, Forestry and Fishing8222.7989800.0184.2051802924.0349101280.3568100.4224850.00.0251770.0000000.0...69.0832620.00.00.0000000.0107.0889050.01.79897610.7133770.000770
Mining and Quarrying2525.6969090.0137.2304594150.190757-292.0420080.6668000.00.0000000.0127190.0...0.4903080.00.00.7647530.00.0880670.00.0049560.202258-0.004381
Food, Beverages and Tobacco28619.0694790.054.444946457.899386404.5909625.6061140.00.0372210.0316060.0...1631.7733390.00.00.5544140.02918.1316430.00.9696003.5993410.001523
Textiles and Textile Products1837.9210330.08.595108453.941827-42.1968611.5222500.00.0060890.0503380.0...158.7815520.00.04.7371640.086.1890900.00.9692942.8926590.000035
Leather, Leather and Footwear473.9712190.02.216545117.064525-10.8819140.4767680.00.0019070.0157660.0...49.7302610.00.01.4836770.07.7488150.00.0871440.260064-0.000005
\n", "

5 rows × 205 columns

\n", "
" ], "text/plain": [ "region AUS \\\n", "category Final consumption expenditure by households \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 8222.798980 \n", " Mining and Quarrying 2525.696909 \n", " Food, Beverages and Tobacco 28619.069479 \n", " Textiles and Textile Products 1837.921033 \n", " Leather, Leather and Footwear 473.971219 \n", "\n", "region \\\n", "category Final consumption expenditure by non-profit organisations serving households (NPISH) \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.0 \n", " Mining and Quarrying 0.0 \n", " Food, Beverages and Tobacco 0.0 \n", " Textiles and Textile Products 0.0 \n", " Leather, Leather and Footwear 0.0 \n", "\n", "region \\\n", "category Final consumption expenditure by government \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 184.205180 \n", " Mining and Quarrying 137.230459 \n", " Food, Beverages and Tobacco 54.444946 \n", " Textiles and Textile Products 8.595108 \n", " Leather, Leather and Footwear 2.216545 \n", "\n", "region \\\n", "category Gross fixed capital formation \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 2924.034910 \n", " Mining and Quarrying 4150.190757 \n", " Food, Beverages and Tobacco 457.899386 \n", " Textiles and Textile Products 453.941827 \n", " Leather, Leather and Footwear 117.064525 \n", "\n", "region \\\n", "category Changes in inventories and valuables \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 1280.356810 \n", " Mining and Quarrying -292.042008 \n", " Food, Beverages and Tobacco 404.590962 \n", " Textiles and Textile Products -42.196861 \n", " Leather, Leather and Footwear -10.881914 \n", "\n", "region AUT \\\n", "category Final consumption expenditure by households \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.422485 \n", " Mining and Quarrying 0.666800 \n", " Food, Beverages and Tobacco 5.606114 \n", " Textiles and Textile Products 1.522250 \n", " Leather, Leather and Footwear 0.476768 \n", "\n", "region \\\n", "category Final consumption expenditure by non-profit organisations serving households (NPISH) \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.0 \n", " Mining and Quarrying 0.0 \n", " Food, Beverages and Tobacco 0.0 \n", " Textiles and Textile Products 0.0 \n", " Leather, Leather and Footwear 0.0 \n", "\n", "region \\\n", "category Final consumption expenditure by government \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.025177 \n", " Mining and Quarrying 0.000000 \n", " Food, Beverages and Tobacco 0.037221 \n", " Textiles and Textile Products 0.006089 \n", " Leather, Leather and Footwear 0.001907 \n", "\n", "region \\\n", "category Gross fixed capital formation \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.000000 \n", " Mining and Quarrying 0.012719 \n", " Food, Beverages and Tobacco 0.031606 \n", " Textiles and Textile Products 0.050338 \n", " Leather, Leather and Footwear 0.015766 \n", "\n", "region \\\n", "category Changes in inventories and valuables \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.0 \n", " Mining and Quarrying 0.0 \n", " Food, Beverages and Tobacco 0.0 \n", " Textiles and Textile Products 0.0 \n", " Leather, Leather and Footwear 0.0 \n", "\n", "region ... \\\n", "category ... \n", "region sector ... \n", "AUS Agriculture, Hunting, Forestry and Fishing ... \n", " Mining and Quarrying ... \n", " Food, Beverages and Tobacco ... \n", " Textiles and Textile Products ... \n", " Leather, Leather and Footwear ... \n", "\n", "region USA \\\n", "category Final consumption expenditure by households \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 69.083262 \n", " Mining and Quarrying 0.490308 \n", " Food, Beverages and Tobacco 1631.773339 \n", " Textiles and Textile Products 158.781552 \n", " Leather, Leather and Footwear 49.730261 \n", "\n", "region \\\n", "category Final consumption expenditure by non-profit organisations serving households (NPISH) \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.0 \n", " Mining and Quarrying 0.0 \n", " Food, Beverages and Tobacco 0.0 \n", " Textiles and Textile Products 0.0 \n", " Leather, Leather and Footwear 0.0 \n", "\n", "region \\\n", "category Final consumption expenditure by government \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.0 \n", " Mining and Quarrying 0.0 \n", " Food, Beverages and Tobacco 0.0 \n", " Textiles and Textile Products 0.0 \n", " Leather, Leather and Footwear 0.0 \n", "\n", "region \\\n", "category Gross fixed capital formation \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.000000 \n", " Mining and Quarrying 0.764753 \n", " Food, Beverages and Tobacco 0.554414 \n", " Textiles and Textile Products 4.737164 \n", " Leather, Leather and Footwear 1.483677 \n", "\n", "region \\\n", "category Changes in inventories and valuables \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.0 \n", " Mining and Quarrying 0.0 \n", " Food, Beverages and Tobacco 0.0 \n", " Textiles and Textile Products 0.0 \n", " Leather, Leather and Footwear 0.0 \n", "\n", "region RoW \\\n", "category Final consumption expenditure by households \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 107.088905 \n", " Mining and Quarrying 0.088067 \n", " Food, Beverages and Tobacco 2918.131643 \n", " Textiles and Textile Products 86.189090 \n", " Leather, Leather and Footwear 7.748815 \n", "\n", "region \\\n", "category Final consumption expenditure by non-profit organisations serving households (NPISH) \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.0 \n", " Mining and Quarrying 0.0 \n", " Food, Beverages and Tobacco 0.0 \n", " Textiles and Textile Products 0.0 \n", " Leather, Leather and Footwear 0.0 \n", "\n", "region \\\n", "category Final consumption expenditure by government \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 1.798976 \n", " Mining and Quarrying 0.004956 \n", " Food, Beverages and Tobacco 0.969600 \n", " Textiles and Textile Products 0.969294 \n", " Leather, Leather and Footwear 0.087144 \n", "\n", "region \\\n", "category Gross fixed capital formation \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 10.713377 \n", " Mining and Quarrying 0.202258 \n", " Food, Beverages and Tobacco 3.599341 \n", " Textiles and Textile Products 2.892659 \n", " Leather, Leather and Footwear 0.260064 \n", "\n", "region \n", "category Changes in inventories and valuables \n", "region sector \n", "AUS Agriculture, Hunting, Forestry and Fishing 0.000770 \n", " Mining and Quarrying -0.004381 \n", " Food, Beverages and Tobacco 0.001523 \n", " Textiles and Textile Products 0.000035 \n", " Leather, Leather and Footwear -0.000005 \n", "\n", "[5 rows x 205 columns]" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wiod2007_full = pymrio.parse_wiod(year=2007, path=wiod_storage, names=(\"full\", \"full\"))\n", "wiod2007_full.Y.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The wiod parsing routine provides some more options - for a full specification see [the API reference](../api_doc/pymrio.parse_wiod.rst)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Parsing multiple years" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Multiple years can be passed by running the parser in a for loop. " ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 4 }