All Projects → andybega → states

andybega / states

Licence: other
Create country-year/month/day panels consistent with the COW or Gleditsch & Ward independent states lists

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to states

primaries
This is a repository for unofficial 2018 primary election returns.
Stars: ✭ 14 (+7.69%)
Mutual labels:  political-science
wikirepo
Python based Wikidata framework for easy dataframe extraction
Stars: ✭ 33 (+153.85%)
Mutual labels:  political-science
lingtypology
R package for linguistic cartography and typological databases search
Stars: ✭ 47 (+261.54%)
Mutual labels:  r-package
lqrps17
Information about and materials for graduate course "Logic of Quantitative Research in Political Science" at the University of Copenhagen, February 6-10, 2017
Stars: ✭ 16 (+23.08%)
Mutual labels:  political-science
CountryPickerView
A simple country code picker on iOS, support chinese,english,spanish,national flag,ISO 3166-1 and calling code.(一个简洁的iOS国家代码选择器,支持中文、英语、西班牙语、国旗、ISO 3166-1、国际电话区号) your can search the ISO 3166 code,calling code or country name,the picker view will refresh automatically according to the content of your search.(你可以搜索ISO 3166码,电话区号或者国家名字,pikerView将会…
Stars: ✭ 26 (+100%)
Mutual labels:  country-codes
rdomains
Classifying the content of domains
Stars: ✭ 47 (+261.54%)
Mutual labels:  r-package
countriesNowAPI
CountriesNow is an Open source API for retrieving geo-information for countries, including their states, cities, population, etc. 🌎
Stars: ✭ 78 (+500%)
Mutual labels:  country-codes
Luminescence
Development of the R package 'Luminescence'
Stars: ✭ 13 (+0%)
Mutual labels:  r-package
django-countries-plus
Django model & fixture representing all top level country data from Geonames.org
Stars: ✭ 40 (+207.69%)
Mutual labels:  country-codes
PLNmodels
A collection of Poisson lognormal models for multivariate count data analysis
Stars: ✭ 44 (+238.46%)
Mutual labels:  r-package
ScPoEconometrics
Undergraduate textbook for Econometrics with R
Stars: ✭ 100 (+669.23%)
Mutual labels:  political-science
hdx-python-country
Utilities to map between country and region codes and names and to match administrative level names from different sources. Also utilities for foreign exchange enabling obtaining current and historic FX rates for different currencies
Stars: ✭ 16 (+23.08%)
Mutual labels:  country-codes
crminer
⛔ ARCHIVED ⛔ Fetch 'Scholary' Full Text from 'Crossref'
Stars: ✭ 17 (+30.77%)
Mutual labels:  r-package
howlonguntilprayuthleaves.com
นับเวลาถอยหลังถึงวันที่พลเอกประยุทธ์ จันทร์โอชา หมดวาระการเป็นนายกรัฐมนตรี
Stars: ✭ 29 (+123.08%)
Mutual labels:  political-science
suppdata
Grabbing SUPPlementary DATA in R
Stars: ✭ 31 (+138.46%)
Mutual labels:  r-package
localized-countries
🌐 Country code to name mappings for several languages
Stars: ✭ 18 (+38.46%)
Mutual labels:  country-codes
DoReMIFaSol
Téléchargement des données sur le site de l'Insee
Stars: ✭ 25 (+92.31%)
Mutual labels:  r-package
rcppsimdjson
Rcpp Bindings for the 'simdjson' Header Library
Stars: ✭ 103 (+692.31%)
Mutual labels:  r-package
datawizard
Magic potions to clean and transform your data 🧙
Stars: ✭ 149 (+1046.15%)
Mutual labels:  r-package
geodaData
Data package for accessing GeoDa datasets using R
Stars: ✭ 15 (+15.38%)
Mutual labels:  r-package

states

R build status CRAN versions Coverage status

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:

  1. Create a master template that reflects one of the independent states lists.
  2. For each data source, normalize to a copy of the master template. Doing this by source makes it easier to identify and address issues like missing values or observation for non-independent states.
  3. In the end, merge everything together. Since all the inputs are already normalized to a proper state panel list, there should be no issues.

What the package does:

  • It contains the Gleditsch and Ward (G&W) as well as the Correlates of War (COW) state system membership lists.
library("states")
    
data(gwstates)
data(cowstates)
  • Search them with sfind, this can be helpful for manual coding:
sfind(260)[, 1:6]
#>     list ccode code3c            country_name      start        end
#> 45    GW   260    GFR German Federal Republic 1949-09-21 9999-12-31
#> 299  COW   260    GFR German Federal Republic 1955-05-05 1990-10-02
sfind("German")[, 1:6]
#>     list ccode code3c               country_name      start        end
#> 44    GW   255    GMY          Germany (Prussia) 1816-01-01 1945-05-07
#> 45    GW   260    GFR    German Federal Republic 1949-09-21 9999-12-31
#> 46    GW   265    GDR German Democratic Republic 1949-10-05 1990-10-02
#> 297  COW   255    GMY                    Germany 1816-01-01 1945-05-08
#> 298  COW   255    GMY                    Germany 1990-10-03 9999-12-31
#> 299  COW   260    GFR    German Federal Republic 1955-05-05 1990-10-02
#> 300  COW   265    GDR German Democratic Republic 1954-03-25 1990-10-02
  • You can use it to build a country-year template that matches either the COW or G&W state lists.
countries <- state_panel(1991, 2001)
    
str(countries)
#> 'data.frame':    2091 obs. of  2 variables:
#>  $ gwcode: int  2 2 2 2 2 2 2 2 2 2 ...
#>  $ year  : int  1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 ...
data("polity")
str(polity)
#> 'data.frame':    17228 obs. of  3 variables:
#>  $ ccode : num  700 700 700 700 700 700 700 700 700 700 ...
#>  $ year  : num  1800 1801 1802 1803 1804 ...
#>  $ polity: num  -6 -6 -6 -6 -6 -6 -6 -6 -6 -6 ...
    
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)
#>       ccode       date independent missing_value                    status
#> 18671     2 1800-01-01           0         FALSE Complete, non-independent
#> 18672     2 1801-01-01           0         FALSE Complete, non-independent
#> 18673     2 1802-01-01           0         FALSE Complete, non-independent
#> 18674     2 1803-01-01           0         FALSE Complete, non-independent
#> 18675     2 1804-01-01           0         FALSE Complete, non-independent
#> 18676     2 1805-01-01           0         FALSE Complete, non-independent

Install

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")

Citations

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].