*! version 1.0.0 24apr2015

Title

eurostatuse -- Import Eurostat data

Syntax

eurostatuse table_name [, options]

table_name is the Eurostat data file to be downloaded, unzipped and processed.

Main
long creates output in the long format (e.g. time in rows)

[no]label drops the label variables

[no]flags drops the flag variables

[no]erase saves the original .tsv file in the active folder

save saves output in a Stata data (.dta) file

clear clears data in memory

Select data
start() defines start period

end() defines end period

geo() set a list of countries to be kept

keepdim() limits by other dimensions

Dialogue box

db eurostatuse

You can access the dialogue box by clicking on the link above or just typing: db eurostatuse

Description

eurostatuse imports data from the Eurostat repository into Stata. It also provides
information on the data set, downloads labels, separates flags and values, implements
the reshape to long format, and fixes time formats.

table_name should include just one Eurostat data file. You should only
specify the name (case sensitive), not the .tsv or .gz extension. Eurostat refers to the table
name as 'product code', indicated between brackets after the titles in
the navigation tree.

Eurostat navigation tree: https://ec.europa.eu/eurostat/data/database.

See also: https://ec.europa.eu/eurostat/data/bulkdownload
and https://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing.

Options

Main

long creates output in the long format (time in rows). Default is wide. Depending on the size of the data set this may take a while.

[no]erase saves the original .tsv file in the active folder.

[no]label removes the label variables. The codes may be self-explanatory.

[no]flags removes the flags Eurostat uses to comment on the data.

save saves output in a Stata data (.dta) file.

clear clears data memory before proceeding.

Select data

These options significantly reduce processing time of long data requests.

start() defines the start period (e.g. 2008, 2010Q3, 2012M09). If not sure
about the time code, download the full table first for a small sample depending
on geo() or keepdim().

end() defines the end period (as above). You do not have to specify both
end and start period.

geo() selects data by country_abbreviations (see below). For an
aggregate, use area codes (EA, EU28 etc.) for a list of member states and other
countries, use EU 2-digit codes separated by a space and don't use quotes.

keepdim() selects by other dimensions. Multiple dimensions have to be
separated by a semicolon but need not be named. Just enter the desired values
within a dimension, each separated by a space. The ordering of the dimensions is
not important and you should not use quotes for the values.

Remarks

The Eurostat repository at https://ec.europa.eu/eurostat/data/database
contains a large number of EU policy data sets, generally time series (monthly, quarterly, annually).
Each series is stored in a separate file that also contains a string-date variable and header
with information about the series.

eurostatuse imports data series into a Stata dataset.
The output is a file with the same name as the data set.

The following country abbreviations are used by Eurostat and can be used
as country_abbreviations in geo().

Table: Geographical regions and country abbreviations

Aggregates
EU28 European Union (28 countries)
EU European Union (changing composition)
EA19 Euro area (19 countries)
EA Euro area (changing composition)

EU Member States
BE Belgium
BG Bulgaria
CZ Czech Republic
DK Denmark
DE Germany
EE Estonia
IE Ireland
EL Greece
ES Spain
FR France
HR Croatia
IT Italy
CY Cyprus
LV Latvia
LT Lithuania
LU Luxembourg
HU Hungary
MT Malta
NL Netherlands
AT Austria
PL Poland
PT Portugal
RO Romania
SI Slovenia
SK Slovakia
FI Finland
SE Sweden
UK United Kingdom

Other countries
IS Iceland
LI Liechtenstein
NO Norway
CH Switzerland
ME Montenegro
TR Turkey
US United States

Examples

. eurostatuse une_ltu_a, noflags nolabel long geo(BE DE FR)

. eurostatuse namq_10_gdp, noflags start(2000Q1) keepdim(CLV_PCH_PRE ; SCA ; B1GQ P3 P51G)

Install

Download the following file: eurostatuse.ado and put it in your personal ado
folder (by default, on Windows the folder is C:\ado\personal\, on OS X it is found
within the Stata folder in the library). Put it in the subfolder e\
to keep the folder orderly. Stata will automatically search this directory for
programs on the next run and have the command ready when you call it.

If you use Windows you also need to install 7-zip into the program files directory
(C:\Program Files\7-Zip\7zG.exe). If you install it elsewhere, the ado needs to
be changed - you can do that. Mac users don't need to do anything. A Linux shell
should also be straightforward to add but it is currently not in the ado.

You can download 7-zip from http://www.7-zip.org/download.html.

Authors

Sebastien Fontenay

UCL-ESL IRES

sebastien.fontenay@uclouvain.be

Sem Vandekerckhove

HIVA-KU Leuven

sem.vandekerckhove@kuleuven.be