mario.parse_eurostat

mario.parse_eurostat(supply_path, use_path, region, year, consumption_categories=['Final consumption expediture', 'Gross Capital formation', 'Exports of goods and services'], factors_of_production=['Compensation of employees', 'Other taxes less other subsidies on production', 'Consumption of fixed capital', 'Operating surplus and mixed income, net', 'Taxes less subsidies on products'], imports=['Imports of goods and services'], model='Database', name=None, calc_all=False, **kwargs) object

Parsing Eurostat databases

Note

  • this function is not generally applicable to any Eurostat table: it works only for specific table formats. Please refer to the example on the website

  • first rule: it is not possible to parse file different from .xls format

  • second rule: in each .xsl file, be sure data are referring to only one region

  • third rule: use only “total” as stock/flow parameter, and only one unit of measure

  • forth rule: supply must be provided in activity by commodity, use must be provided in commodity by activitiy formats

  • fifth rule: only SUT table are supported

Parameters
  • supply_path (str) – path to the .xls file containing the supply table

  • use_path (str) – path to the .xls file containing the use table

  • region (str) – name of the region: be consistent with the Eurostat names!

  • year (int) – year to which the table is referring. Multiple years can be contained in the .xls files but one only can be parsed

  • consumption_categories (list, Optional) – By default, a list of consumption categories that balance the tables according to the Eurostat criteria. The user can decide to modify them

  • factors_of_production (list, Optional) – By default, a list of factors of production that balance the tables according to the Eurostat criteria. The user can decide to modify them

  • imports (list, Optional) – By default, a list of imports that balance the tables according to the Eurostat criteria. The user can decide to modify them

  • name (str, Optional) – for recording on the metadata

  • calc_all (bool, Optional) – if True, will calculate the main missing matrices

Return type

mario.Database