*! version 1.0 8may2018

*! version 1.1 21may2018
help gciget

Title

gciget -- Reads Global Competitiveness Index data from http://reports.weforum.org/global-competitiveness-index-2017-2018/downloads/ into Stata

Syntax

gciget [varlist] [, options]

Variables to be retrieved

Variables
varlist List of Global Competitiveness Index (GCI) variables to be retrieved

options

Main
clear replace data in memory

noxtset do not declare the loaded data to be panel data

noquery suppress summary calculations by xtset

panelvar(newvar) generate numeric panelvar newvar

Advanced
url(filename) download link

sheet("sheetname") excel worksheet to load

cellrange([start][:end]) excel cell range to load

nowarnings do not display warnings

Description

gciget facilitates the retrieval of country level data of the Global Competitiveness Index (World Economic Forum, 2018) from
http://reports.weforum.org/ using stata. Please note that
gciget does not provide autonomous access to the GCI data, but only facilitates data retrieval under exactly those terms and conditions under which the owner of the data grants access.
gciget is designed for being used with version 2018-02-26 of the Global Competitiveness Index Dataset (World Economic Forum, 2018) and might not work with later published versions of the GCI.
Only values and labels are retrieved, but no further information that is provided at
http://reports.weforum.org/, information about the source of the data, for instance. Visiting the website of the
Global Competitiveness Report is strongly recommended to get familiar with the data and with the terms and conditions under which users are allowed to use the data.
gciget is similar to the user written command wbopendata that facilitates the retrieval of World Bank country level data.

Variables

Variables

varlist specifies the list of variables of the Global Competitiveness Index Dataset to be retrieved from
http://reports.weforum.org/global-competitiveness-index-2017-2018/downloads/.
The original names of the GCI variables are expected, even if they are invalid stata names (e.g., GCI.A.02.01). gciget will automatically rename these variables by replacing "." with "_".
Variables not found in the GCI are ignored. If varlist is left unspecified, all variables in the GCI are retrieved.
gciget always downloads the variables year, countrycode, country, imfincgroup, imfregion, and wefregion, which hence do not need to be included in varlist.

Options

Main

clear clears data in memory before loading the GCI data.

noxtset prevents gciget from declaring the loaded date to be panel data. Without noxtset gciget declares the loaded data to be panel data (see xtset).
For this, gciget generates a new numeric panelvar, which is a numeric equivalent to the string variable countrycode. year serves as timevar.

noquery suppresses summary calculations by xtset. With noxtset noquery has no effect.

panelvar(newvar) sepcifies the name of the numeric panelvar that is generated by gciget. The default name is cnNumber. With noxtset specifying panelvar has no effect.

Advanced

url(filename) specifies the url of the GCI data. The default is the currently valid web address http://www3.weforum.org/docs/GCR2017-2018/GCI_Dataset_2007-2017.xlsx.
Specifying url(filename) might become necessary if a new version of the GCI is published and the name of the data file changes, or if the web address changes for any other reason.
url(filename) may also be used to specify the path to the GCI data, if the excel file GCI_Dataset_2007-2017.xlsx has already been downloaded and locally stored (see examples).

sheet("sheetname") specifies the excel worksheet to load. The default is the currently valid name "Data".
Specifying sheet("sheetname") might become necessary if a new version of the GCI is published and the name of the relevant excel worksheet changes.
"sheetname" is passed through to import excel.

"cellrange([start][:end])" specifies a range of cells within the excel sheet to load. The default is the currently valid range A3:FM6527.
Specifying "cellrange([start][:end])" might become neasseary if a new version of the GCI is published and the structure of the excel file changes.
start:end is passed through to import excel.

nowarnings prevents gciget from displaying warnings that are routinely issued if the options url(filename), sheet("sheetname"), and "cellrange([start][:end])" deviate from the respective default.

Examples

Loading all variables of the GCI into stata's already cleared memory

. gciget

Loading three selected GCI variables, replacing all data in stata's memory

. gciget EOSQ048 EOSQ051 GCI.A.02.01, clear

The same as above, using a locally stored copy of the excel file GCI_Dataset_2007-2017.xlsx, first using Stata for MS Windows and second using Stata for Mac or Stata for Unix, see [D] cd

. gciget EOSQ048 EOSQ051 GCI.A.02.01, clear url(C:\data\gci\GCI_Dataset_2007-2017.xlsx)

. gciget EOSQ048 EOSQ051 GCI.A.02.01, clear url(~/data/gci/GCI_Dataset_2007-2017.xlsx)

Stored results

The results saved in r() are those saved by xtset. With option noxtset no results are saved.

References

Schwab, K., ed. (2017). The Global Competitiveness Report 2017-2018, Geneva: World Economic Forum.

World Economic Forum (2018). The Global Competitiveness Index Dataset 2007-2018, http://www3.weforum.org/docs/GCR2017-2018/GCI_Dataset_2007-2017.xlsx.

Also see

Manual: [D] import excel, [XT] xtset

Help: [D] import excel, [XT] xtset

Online: wbopendata

Authors

Oleg Badunenko

University of Portsmouth

Portsmouth,
UK

E-mail: obadunenko@port.ac.uk

Harald Tauchmann

Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU)

Nürnberg,
Germany

E-mail: harald.tauchmann@fau.de

Disclaimer

The World Economic Forum is the provider of the Global Competitiveness Index 2017-2018, a framework and a corresponding set of indicators for 137 economies.
The software gciget.ado provides a practical way to read the indicators into Stata (R).
The responsibility of complying with the terms and conditions of use under which the owner of the data grants access to the indicators is entirely with the user but not with the authors of the software gciget.ado.
Any user of gciget.ado is responsible for making him or herself familiar with the terms of use under which she or he is allowed to work with the data of the Global Competitiveness Index.
For more information and methodology, please see (http://wef.ch/gcr17).
In no event will the authors, owners, and creators of gciget.ado, or their employers or any other party who may modify and/or redistribute this software,
accept liability for any loss or damage suffered as a result of using the gciget.ado software.