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.
In the most simple case you get the full WIOD database with:
In [1]:
import pymrio
In [2]:
wiod_storage = '/tmp/mrios/WIOD2013'
In [3]:
wiod_meta = pymrio.download_wiod2013(storage_folder=wiod_storage)
This download the whole 2013 release of WIOD including all extensions.
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.
A single year of the WIOD database can be parse by:
In [4]:
wiod2007 = pymrio.parse_wiod(year=2007, path=wiod_storage)
Which loads the specific year and extension data:
In [5]:
wiod2007.Z.head()
Out[5]:
In [6]:
wiod2007.AIR.F
Out[6]:
If a WIOD SEA file is present (at the root of path or in a folder named 'SEA' - only one file!), the labor data of this file gets included in the factor_input extension (calculated for the the three skill levels available). The monetary data in this file is not added because it is only given in national currency:
In [7]:
wiod2007.SEA.F
Out[7]:
Provenance tracking and additional meta data is availabe in the field meta
:
In [8]:
print(wiod2007.meta)
WIOD provides three different sector/final demand categories naming
schemes. The one to use for pymrio can specified by passing a tuple
names=
with:
1) 'isic': ISIC rev 3 Codes - available for interindustry flows and final demand rows.
2) 'full': Full names - available for final demand rows and final demand columns (categories) and interindustry flows.
3) 'c_codes' : WIOD specific sector numbers, available for final demand rows and columns (categories) and interindustry flows.
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.
For example, for loading wiod with full sector names:
In [9]:
wiod2007_full = pymrio.parse_wiod(year=2007, path=wiod_storage, names=('full', 'full'))
wiod2007_full.Y.head()
Out[9]:
The wiod parsing routine provides some more options - for a full specification see the API reference
Multiple years can be passed by running the parser in a for loop.