Description Usage Arguments Details Author(s) See Also Examples
Function to download Quality of Government (QOG) data and
load it as a data frame in R. The result carries an
xtdata
attribute that can be passed to the
xtmerge
panel data method. Please visit the
QOG Institute website at http://www.qog.pol.gu.se/
for a presentation of QOG research.
1 2 3 |
file |
a filename to save the dataset at. If set to
|
replace |
whether to overwrite the dataset even if a
file already exists at the download location. Defaults to
|
path |
a folder path to prepend to the filename and
to the codebook if |
version |
the QOG version: |
format |
the QOG format, usually |
codebook |
whether to download the codebook. Calls
|
variables |
a selection of variables to import.
|
years |
a selection of years to import. Effective
only with the |
... |
other arguments supplied to the import method,
which is |
This version of the package handles all four QOG datasets:
QOG Standard | std
| 15 May 2013 |
QOG Social Policy | soc
| 4 April 2012 |
QOG Basic | bas ): | 28 March 2011 |
QOG Expert Survey | exp | 3-6 September 2012 |
URL: | http://www.qog.pol.gu.se | |
Each QOG dataset is available in a variety of data formats:
QOG datasets std
and bas
require format cs
(cross-section) or ts
(time series).
QOG dataset soc
requires
format cs
, tsl
(time series, long) or
tsw
(time series, wide)
QOG dataset
exp
requires format cntry
(country-level)
or ind
(individual survey)
The QOG Standard series comes in CSV, SPSS and Stata file
formats, CVS being the only format that contains numeric
codes instead of QOG value labels. Datasets outside of
the QOG Standard series are available only as Stata items
and require that file
ends in .dta
when
version
is not std
. The only exception is
dataset csyom
, which automatically sets
version
to std
and requires file
to
end in .csv
. Filenames with inadequate extensions
will be modified to conform to these expectations if they
do not.
Francois Briatte f.briatte@ed.ac.uk
1 2 3 4 5 6 7 8 9 10 11 | # Show URL to QOG Standard cross-section.
qogdata()
# Show URL to QOG Social Policy time series, long format.
qogdata(version = "soc", format = "tsl")
## Download codebook and recent years from QOG Basic cross-section (not run).
# QOG = qogdata(file = "qog.cs.txt", version = "bas", format = "cs",
# years = 2002:2012, codebook = TRUE)
## Download QOG Standard cross-section years of measurement (not run).
# QOG = qogdata(tempfile(fileext = ".csv"), format = "csyom")
## Show QOG years of measurement for Gini coefficient (not run).
# table(QOG$wdi_gini)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.