Description Usage Arguments Details Value Author(s) References Examples
Function to download state-level historical events from
Gleditsch and Ward (1999, updated 3 May 2013) and Powell
and Thyne (2011, updated c. 2013). The result carries an
xtdata
attribute that can be passed to the
xtmerge
panel data method.
1 2 |
start |
the first year of measurement to include.
Defaults to |
end |
the last year of measurement to include.
Defaults to |
independence |
name under which to create the state
independence variable. Defaults to |
coups |
name under which to create the state coups
variable. Defaults to |
The variables produced by this function are gw_indep (years of independence, coded 0/1), from Gleditsch and Ward, and pt_coup (attempted and successful coups d'\'Etat), from Powell and Thyne. The revised gross domestic product and population estimates from Gleditsch (2002) are based on older and shorter versions of the Penn World Table than the QOG datasets, and are therefore not included.
a data frame with country-year observations
Francois Briatte f.briatte@ed.ac.uk
Gleditsch, Kristian S. & Michael D. Ward. 1999. "Interstate System Membership: A Revised List of the Independent States since 1816.". International Interactions 25: 393-413, http://privatewww.essex.ac.uk/~ksg/statelist.html.
Gleditsch, Kristian S. 2002. "Expanded Trade and GDP Data," Journal of Conflict Resolution 46: 712-24.
Powell, Jonathan M. & Clayton L. Thyne. 2011. "Global Instances of Coups from 1950 to 2010: A New Dataset.". Journal of Peace Research 48(2): 249-259, http://www.uky.edu/~clthyn2/coup_data/home.htm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Download data up to 2012.
head(G <- get_gwpt(end = 2012))
if(require(countrycode) & require(ggplot2)) {
# Get geographic markers.
G$iso3c = countrycode(G$ccode, "iso3n", "iso3c")
G$continent = countrycode(G$ccode, "iso3n", "continent")
# Plot the full data.
qplot(data = subset(G, !is.na(continent)),
x = year, y = reorder(iso3c, as.numeric(pt_coup), mean),
fill = continent, alpha = pt_coup, geom = "tile") +
scale_fill_brewer("Continent", palette = "Set1") +
scale_alpha_manual("Event", values = c(0, .5, 1)) +
scale_x_continuous(breaks = seq(1953, 2013, 10)) +
labs(y = NULL)
}
if(require(ggplot2)) {
# Time distribution.
qplot(data = subset(G, pt_coup != "No verified coup attempt"),
x = year, fill = pt_coup, binwidth = 3, alpha = I(2/3),
position = "stack", stat = "bin", geom = "bar") +
theme(legend.position = "bottom") +
scale_fill_brewer("", palette = "Set1") +
labs(x = NULL)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.