Parsing EUROSTAT
To parse a EUROSTAT supply and use table with mario, user needs to download the database in correct and specific format from EUROSTAT website. The supply and use tables should be donwloaded as follow:
Where to go
How to configure the database
In which format download the file
When the use and supply files are downloaded, mario can be used to parse the database
In [1]:
# importing the parser
from mario import parse_eurostat
In [2]:
# Defining the file path
supply_path = r"C:\Users\payam\Politecnico di Milano\DENG-SESAM - MARIO\Examples\parse_eurostat\supply.xls"
use_path = r"C:\Users\payam\Politecnico di Milano\DENG-SESAM - MARIO\Examples\parse_eurostat\use.xls"
In [3]:
italy_sut = parse_eurostat(
supply_path = supply_path,
use_path = use_path,
region = "Italy",
year = 2011
)
In [7]:
# how is the the structure of database
print(italy_sut)
name = None table = SUT scenarios = ['baseline'] Activity = 65 Commodity = 65 Factor of production = 6 Satellite account = 1 Consumption category = 3 Region = 1
In [5]:
# Looking some of the items
print(italy_sut.get_index('Activity'))
['Crop and animal production, hunting and related service activities', 'Forestry and logging', 'Fishing and aquaculture', 'Mining and quarrying', 'Manufacture of food products; beverages and tobacco products', 'Manufacture of textiles, wearing apparel, leather and related products', 'Manufacture of wood and of products of wood and cork, except furniture; manufacture of articles of straw and plaiting materials', 'Manufacture of paper and paper products', 'Printing and reproduction of recorded media', 'Manufacture of coke and refined petroleum products', 'Manufacture of chemicals and chemical products', 'Manufacture of basic pharmaceutical products and pharmaceutical preparations', 'Manufacture of rubber and plastic products', 'Manufacture of other non-metallic mineral products', 'Manufacture of basic metals', 'Manufacture of fabricated metal products, except machinery and equipment', 'Manufacture of computer, electronic and optical products', 'Manufacture of electrical equipment', 'Manufacture of machinery and equipment n.e.c.', 'Manufacture of motor vehicles, trailers and semi-trailers', 'Manufacture of other transport equipment', 'Manufacture of furniture; other manufacturing', 'Repair and installation of machinery and equipment', 'Electricity, gas, steam and air conditioning supply', 'Water collection, treatment and supply', 'Sewerage, waste management, remediation activities', 'Construction', 'Wholesale and retail trade and repair of motor vehicles and motorcycles', 'Wholesale trade, except of motor vehicles and motorcycles', 'Retail trade, except of motor vehicles and motorcycles', 'Land transport and transport via pipelines', 'Water transport', 'Air transport', 'Warehousing and support activities for transportation', 'Postal and courier activities', 'Accommodation and food service activities', 'Publishing activities', 'Motion picture, video, television programme production; programming and broadcasting activities', 'Telecommunications', 'Computer programming, consultancy, and information service activities', 'Financial service activities, except insurance and pension funding', 'Insurance, reinsurance and pension funding, except compulsory social security', 'Activities auxiliary to financial services and insurance activities', 'Imputed rents of owner-occupied dwellings', 'Real estate activities excluding imputed rents', 'Legal and accounting activities; activities of head offices; management consultancy activities', 'Architectural and engineering activities; technical testing and analysis', 'Scientific research and development', 'Advertising and market research', 'Other professional, scientific and technical activities; veterinary activities', 'Rental and leasing activities', 'Employment activities', 'Travel agency, tour operator reservation service and related activities', 'Security and investigation, service and landscape, office administrative and support activities', 'Public administration and defence; compulsory social security', 'Education', 'Human health activities', 'Residential care activities and social work activities without accommodation', 'Creative, arts and entertainment activities; libraries, archives, museums and other cultural activities; gambling and betting activities', 'Sports activities and amusement and recreation activities', 'Activities of membership organisations', 'Repair of computers and personal and household goods', 'Other personal service activities', 'Activities of households as employers; undifferentiated goods- and services-producing activities of households for own use', 'Activities of extraterritorial organisations and bodies']
In [6]:
print(italy_sut.get_index('Consumption category'))
['Final consumption expediture', 'Gross Capital formation', 'Exports of goods and services']