pymrio.parse_wiod(path, year=None, names=('isic', 'c_codes'), popvector=None)

Parse the wiod source files for the IOSystem

WIOD provides the MRIO tables in excel - format (xlsx) at (release November 2013). To use WIOD in pymrio these (for the year of analysis) must be downloaded. The interindustry matrix of these files gets parsed in IOSystem.Z, the additional information is included as factor_input extension (value added,…)

The folder with these xslx must than be passed to the WIOD parsing function. This folder may contain folders with the extension data. Every folder within the wiod root folder will be parsed for extension data and will be added to the IOSystem. The WIOD database offers the download of the environmental extensions as zip files. These can be read directly by the parser. In case a zip file and a folder with the same name are available, the data is read from the folder. If the zip files are extracted into folder, the folders must have the same name as the corresponding zip file (without the ‘zip’ extension).

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.

Since the “World Input-Output Tables in previous years’ prices” are still under construction (20141129), no parser for these is provided.

Some of the meta-parameter of the IOSystem are set automatically based on the values given in the first four cells and the name of the WIOD data files (base year, version, price, iosystem). These can be overwritten afterwards if needed.

  • path (string or pathlib.Path) – Path to the folder with the WIOD source files. In case that the path to a specific file is given, only this will be parsed irrespective of the values given in year.

  • year (int or str) – Which year in the path should be parsed. The years can be given with four or two digits (eg [2012 or 12]). If the given path contains a specific file, the value of year will not be used (but inferred from the meta data)- otherwise it must be given For the monetary data the parser searches for files with ‘wiot - two digit year’.

  • names (string or tuple, optional) – WIOD provides three different sector/final demand categories naming schemes. These can can be specified for the IOSystem. Pass:

    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.

  • TODO popvector (TO BE IMPLEMENTED (consistent with EXIOBASE))


Return type:



ParserError – If the WIOD source file are not complete or inconsistent