get_uds: Get UDS data in 'xtdata' format

Description Usage Value Author(s) References Examples

Description

Function to download the Unified Democracy Scores (UDS) by Pemstein, Meserve and Melton (2010). The result carries an xtdata attribute that can be passed to the xtmerge panel data method.

Usage

1

Value

a data frame with country-year observations

Author(s)

Francois Briatte f.briatte@ed.ac.uk

References

Pemstein, Daniel, Stephen A. Meserve & James Melton. 2010. "Democratic Compromise: A Latent Variable Analysis of Ten Measures of Regime Type." Political Analysis 18(4): 426-449. http://www.unified-democracy-scores.org/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# By default, the function downloads the UDS dataset.
head(UDS <- get_uds())
# Basic visualization of average scores in the 2000s.
if(require(countrycode) & require(ggplot2)) {
  UDS$ccode = countrycode(UDS$ccodecow, "cown", "iso3n")
  xtmap(aggregate(uds_mean ~ ccode, mean, data = subset(UDS, year > 2000)),
        "uds_mean", quantize = 5, continent = c("Africa", "Asia"),
        iso3n = "ccode") +
    scale_fill_brewer("Mean UDS since 2000", palette = "RdYlGn")
}

briatte/qogdata documentation built on May 13, 2019, 7:43 a.m.