knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Create country-year/month/day panels consistent with the COW or Gleditsch & Ward lists of independent states. I mainly use this for merging different data sources:
What the package does:
library("states") data(gwstates) data(cowstates)
sfind
, this can be helpful for manual coding:sfind(260)[, 1:6] sfind("German")[, 1:6]
countries <- state_panel(1991, 2001) str(countries)
data("polity") str(polity) plot_missing(polity, x = "polity", ccode = "ccode", statelist = "COW")
For the underlying data (missing info requires date input):
polity$date <- as.Date(paste0(polity$year, "-01-01")) mm <- missing_info(polity, x = "polity", ccode = "ccode", time = "date", period = "year", statelist = "COW") head(mm)
The package is on CRAN and can be installed with:
install.packages("states")
Or to install from GitHub:
library("remotes") remotes::install_github("andybega/states")
For the Gleditsch and Ward (G&W) state data:
Gleditsch, Kristian S. & Michael D. Ward. 1999. "Interstate System Membership: A Revised List of the Independent States since 1816." International Interactions 25: 393-413.
For the Correlates of War (COW) state data:
Correlates of War Project. 2017. "State System Membership List, v2016." Online, https://correlatesofwar.org
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.