| Title: | Access the Intergovernmental Organizations Database |
|---|---|
| Description: | Tools for searching, extracting and recoding information from the Intergovernmental Organizations ('IGO') Database (v3), distributed by the Correlates of War Project <https://correlatesofwar.org/>. The package includes IGO-year, state-year and joint membership data. See also Pevehouse, J. C. et al. (2020) <doi:10.1177/0022343319881175>. |
| Authors: | Diego Hernangómez [aut, cre, cph] (ORCID: <https://orcid.org/0000-0001-8457-4658>), The Correlates of War Project [cph] (for the data) |
| Maintainer: | Diego Hernangómez <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.2.9000 |
| Built: | 2026-06-09 19:15:51 UTC |
| Source: | https://github.com/dieghernan/igoR |
Create a dyadic version of the data. The unit of observation is a state dyad, and the result summarizes joint memberships across IGOs over time.
igo_dyadic(country1, country2, year = 1816:2014, ioname = NULL)igo_dyadic(country1, country2, year = 1816:2014, ioname = NULL)
country1, country2
|
State or vector of states to compare. Values can be any valid state name or code as specified in states2016. |
year |
Year to assess, as an integer or vector of years. |
ioname |
Optional. |
The arguments country1 and country2 are named for compatibility with
earlier versions of igoR. Values are matched against states in
states2016.
This function tries to replicate the information contained in the original
file distributed by The Correlates of War Project (dyadic_format3.dta).
That file is not included in this package due to its size.
The result is a data.frame with one row for each common
year selected via country1, country2 and year.
An additional column, dyadid, computed as (1000 * ccode1) + ccode2, is
provided to identify relationships.
For each IGO selected via ioname, or all IGOs if the default option is
used, a column using lowercase ioname as an identifier is provided with
the following coding system:
| Category | Numerical Value |
| No Joint Membership | 0 |
| Joint Full Membership | 1 |
| Missing data | -9 |
| State Not System Member | -1 |
See igo_recode_dyadic() for an easy way to recode the
numerical values into factors.
If one state in an IGO is a full member but the other is an associate member or observer, that IGO is not coded as a joint membership.
A coded data.frame with years and state dyads as rows
and selected IGOs as columns. See Details.
Some results from this function differ from the original data set for some
IGOs regarding "Missing data" (-9) and "State Not System Member" (-1).
However, it is not clear how to fully replicate those values.
See Codebook Version 3 IGO Data.
Codebook Version 3 IGO Data for full reference.
Pevehouse, J. C., Nordstrom, T., McManus, R. W. & Jamison, A. S. (2020). Tracking organizations in the world: The Correlates of War IGO Version 3.0 data sets. Journal of Peace Research, 57(3), 492–503. doi:10.1177/0022343319881175.
state_year_format3, states2016, igo_search(), igo_recode_dyadic().
usa_esp <- igo_dyadic("USA", "Spain") nrow(usa_esp) ncol(usa_esp) dplyr::tibble(usa_esp) # Use custom arguments. custom <- igo_dyadic( country1 = c("France", "Germany"), country2 = c("Sweden", "Austria"), year = 1992:1993, ioname = "EU" ) dplyr::glimpse(custom)usa_esp <- igo_dyadic("USA", "Spain") nrow(usa_esp) ncol(usa_esp) dplyr::tibble(usa_esp) # Use custom arguments. custom <- igo_dyadic( country1 = c("France", "Germany"), country2 = c("Sweden", "Austria"), year = 1992:1993, ioname = "EU" ) dplyr::glimpse(custom)
Extract all states that belong to an IGO in one or more years.
igo_members(ioname, year = NULL, status = "Full Membership")igo_members(ioname, year = NULL, status = "Full Membership")
ioname |
Any valid |
year |
Year to assess, as an integer or vector of years. If
|
status |
Character or vector with the membership status to be extracted. See Details in state_year_format3. |
A data.frame.
Codebook Version 3 IGO Data for full reference.
Pevehouse, J. C., Nordstrom, T., McManus, R. W. & Jamison, A. S. (2020). Tracking organizations in the world: The Correlates of War IGO Version 3.0 data sets. Journal of Peace Research, 57(3), 492–503. doi:10.1177/0022343319881175.
igo_year_format3, igo_search(), state_year_format3.
library(dplyr) igo_members("EU", year = 1993) %>% as_tibble() igo_members("EU") %>% as_tibble() igo_members("NAFTA", year = c(1995:1998)) %>% as_tibble() # Extract different statuses. igo_members("ACCT", status = c("Associate Membership", "Observer")) %>% as_tibble() # States that are not members of the UN. igo_members("UN", status = "No Membership") %>% as_tibble() # Vectorized search. igo_members(c("NAFTA", "EU"), year = 1993) %>% as_tibble() %>% arrange(state) # Use the countrycode package to get additional codes. if (requireNamespace("countrycode", quietly = TRUE)) { library(countrycode) EU <- igo_members("EU") EU$iso3c <- countrycode(EU$ccode, origin = "cown", destination = "iso3c") EU$continent <- countrycode(EU$ccode, origin = "cown", destination = "continent" ) tibble(EU) }library(dplyr) igo_members("EU", year = 1993) %>% as_tibble() igo_members("EU") %>% as_tibble() igo_members("NAFTA", year = c(1995:1998)) %>% as_tibble() # Extract different statuses. igo_members("ACCT", status = c("Associate Membership", "Observer")) %>% as_tibble() # States that are not members of the UN. igo_members("UN", status = "No Membership") %>% as_tibble() # Vectorized search. igo_members(c("NAFTA", "EU"), year = 1993) %>% as_tibble() %>% arrange(state) # Use the countrycode package to get additional codes. if (requireNamespace("countrycode", quietly = TRUE)) { library(countrycode) EU <- igo_members("EU") EU$iso3c <- countrycode(EU$ccode, origin = "cown", destination = "iso3c") EU$continent <- countrycode(EU$ccode, origin = "cown", destination = "continent" ) tibble(EU) }
These functions convert the numerical codes in igo_year_format3 and
state_year_format3 into factors. Use
igo_recode_igoyear() with values from igo_year_format3,
igo_recode_stateyear() with values from state_year_format3 and
igo_recode_dyadic() with values from igo_dyadic().
igo_recode_igoyear(x) igo_recode_stateyear(x) igo_recode_dyadic(x)igo_recode_igoyear(x) igo_recode_stateyear(x) igo_recode_dyadic(x)
x |
Numerical value (or vector of values) to recode. |
The recoded values as factors.
Other datasets:
igo_year_format3,
state_year_format3,
states2016
data("igo_year_format3") # Recode memberships for some states. library(dplyr) samp <- igo_year_format3 %>% select(ioname:year, spain, france) %>% filter(year > 2000) %>% as_tibble() glimpse(samp) # Recode. samp %>% mutate( spain = igo_recode_igoyear(spain), france = igo_recode_igoyear(france) ) %>% glimpse()data("igo_year_format3") # Recode memberships for some states. library(dplyr) samp <- igo_year_format3 %>% select(ioname:year, spain, france) %>% filter(year > 2000) %>% as_tibble() glimpse(samp) # Recode. samp %>% mutate( spain = igo_recode_igoyear(spain), france = igo_recode_igoyear(france) ) %>% glimpse()
Search for IGOs by name or string pattern.
igo_search(pattern = NULL, exact = FALSE)igo_search(pattern = NULL, exact = FALSE)
pattern |
regex pattern. If |
exact |
Logical. When |
The information for each IGO is retrieved from the last year available in igo_year_format3.
An additional column label is provided. This column is a clean version of
longorgname.
A data.frame.
Codebook Version 3 IGO Data for full reference.
Pevehouse, J. C., Nordstrom, T., McManus, R. W. & Jamison, A. S. (2020). Tracking organizations in the world: The Correlates of War IGO Version 3.0 data sets. Journal of Peace Research, 57(3), 492–503. doi:10.1177/0022343319881175.
# Return all values. library(dplyr) all <- igo_search() all %>% tibble() # Search by pattern. igo_search("EU") %>% select(ionum:orgname) %>% tibble() igo_search("EU", exact = TRUE) %>% select(ionum:orgname) %>% tibble() # Use integers. igo_search(10) %>% select(ionum:orgname) %>% tibble() igo_search(10, exact = TRUE) %>% select(ionum:orgname) %>% tibble() # Use several patterns (regex style). igo_search("NAFTA|UN|EU") %>% select(ionum:orgname) %>% tibble() # Use several exact patterns (regex style). igo_search("^NAFTA$|^UN$|^EU$") %>% select(ionum:orgname) %>% tibble()# Return all values. library(dplyr) all <- igo_search() all %>% tibble() # Search by pattern. igo_search("EU") %>% select(ionum:orgname) %>% tibble() igo_search("EU", exact = TRUE) %>% select(ionum:orgname) %>% tibble() # Use integers. igo_search(10) %>% select(ionum:orgname) %>% tibble() igo_search(10, exact = TRUE) %>% select(ionum:orgname) %>% tibble() # Use several patterns (regex style). igo_search("NAFTA|UN|EU") %>% select(ionum:orgname) %>% tibble() # Use several exact patterns (regex style). igo_search("^NAFTA$|^UN$|^EU$") %>% select(ionum:orgname) %>% tibble()
Find COW codes, abbreviations and names for one or more states.
igo_search_states(state)igo_search_states(state)
state |
Any valid state name or code as specified in states2016. This can also be a vector of states. |
A data.frame.
Codebook Version 3 IGO Data for full reference.
Pevehouse, J. C., Nordstrom, T., McManus, R. W. & Jamison, A. S. (2020). Tracking organizations in the world: The Correlates of War IGO Version 3.0 data sets. Journal of Peace Research, 57(3), 492–503. doi:10.1177/0022343319881175.
library(dplyr) igo_search_states("Spain") %>% as_tibble() igo_search_states(c(20, 150)) %>% as_tibble() igo_search_states("congo") %>% as_tibble() igo_search_states(c("Germany", "papal states")) %>% as_tibble() igo_search_states(c("FRN", "United Kingdom", 240, "italy")) %>% as_tibble()library(dplyr) igo_search_states("Spain") %>% as_tibble() igo_search_states(c(20, 150)) %>% as_tibble() igo_search_states("congo") %>% as_tibble() igo_search_states(c("Germany", "papal states")) %>% as_tibble() igo_search_states(c("FRN", "United Kingdom", 240, "italy")) %>% as_tibble()
Extract all IGO memberships for a state in one or more years.
igo_state_membership(state, year = NULL, status = "Full Membership")igo_state_membership(state, year = NULL, status = "Full Membership")
state |
Any valid state name or code as specified in states2016. This can also be a vector of states. |
year |
Year to assess, as an integer or vector of years. If
|
status |
Character or vector with the membership status to be extracted. See Details in igo_year_format3. |
A data.frame.
Codebook Version 3 IGO Data for full reference.
Pevehouse, J. C., Nordstrom, T., McManus, R. W. & Jamison, A. S. (2020). Tracking organizations in the world: The Correlates of War IGO Version 3.0 data sets. Journal of Peace Research, 57(3), 492–503. doi:10.1177/0022343319881175.
igo_year_format3, igo_search_states(), states2016.
# Memberships on two different dates. igo_state_membership("Spain", year = 1850) igo_state_membership("Spain", year = 1870) igo_state_membership("Spain", year = 1880:1882) # Last year. igo_state_membership("ZAN")[, 1:7] # Use codes to get states. igo_state_membership("2", year = 1865) # Extract different statuses. igo_state_membership("kosovo", status = c( "Associate Membership", "Observer", "Full Membership" )) # Vectorized search. igo_state_membership(c("usa", "spain"), year = 1870:1871) # Use the countrycode package to get additional codes. if (requireNamespace("countrycode", quietly = TRUE)) { library(countrycode) IT <- igo_state_membership("Italy", year = 1880) IT$iso3c <- countrycode(IT$ccode, origin = "cown", destination = "iso3c") head(IT) }# Memberships on two different dates. igo_state_membership("Spain", year = 1850) igo_state_membership("Spain", year = 1870) igo_state_membership("Spain", year = 1880:1882) # Last year. igo_state_membership("ZAN")[, 1:7] # Use codes to get states. igo_state_membership("2", year = 1865) # Extract different statuses. igo_state_membership("kosovo", status = c( "Associate Membership", "Observer", "Full Membership" )) # Vectorized search. igo_state_membership(c("usa", "spain"), year = 1870:1871) # Use the countrycode package to get additional codes. if (requireNamespace("countrycode", quietly = TRUE)) { library(countrycode) IT <- igo_state_membership("Italy", year = 1880) IT$iso3c <- countrycode(IT$ccode, origin = "cown", destination = "iso3c") head(IT) }
Data on IGOs from 1815 to 2014 at the IGO-year level. Contains one record per IGO-year, with years listed at five-year intervals through 1965 and annually thereafter.
data.frame with
19,335 rows. Relevant
fields:
ioname: Short abbreviation for the IGO name.
orgname: Full IGO name.
year: Calendar year.
afghanistan...zimbabwe: Status of that state in the IGO. See Details.
sdate: Start year for the IGO.
deaddate: End year for the IGO.
longorgname: Longer version of the IGO name, including previous names.
ionum: IGO ID number in v2.1 and v3.0 of the data.
version: COW version number.
Possible values for the status of a state in the IGO are:
| Category | Numerical Value |
| No Membership | 0 |
| Full Membership | 1 |
| Associate Membership | 2 |
| Observer | 3 |
| Missing data | -9 |
| State Not System Member | -1 |
See the igo_recode_igoyear() section for an easy way to recode the
numerical values into factors.
Raw data used internally by igoR.
Intergovernmental Organizations (v3), The Correlates of War Project (IGO Data Stata Files).
See the Codebook Version 3 IGO Data for the full reference.
Pevehouse, J. C., Nordstrom, T., McManus, R. W. & Jamison, A. S. (2020). Tracking organizations in the world: The Correlates of War IGO Version 3.0 data sets. Journal of Peace Research, 57(3), 492–503. doi:10.1177/0022343319881175.
Other datasets:
igo_recode_igoyear(),
state_year_format3,
states2016
data("state_year_format3") # Show a glimpse. library(dplyr) state_year_format3 %>% select(ccode:afgec) %>% filter(year > 1990) %>% glimpse() # Recode a sample of numerical values to factors. sample_state_year <- state_year_format3 %>% as_tibble() %>% select(ccode:afgec) %>% filter(year == 1990) sample_state_year %>% glimpse() # Recode. sample_state_year_recoded <- sample_state_year %>% mutate(across(-c(ccode:state), igo_recode_stateyear)) sample_state_year_recoded %>% glimpse()data("state_year_format3") # Show a glimpse. library(dplyr) state_year_format3 %>% select(ccode:afgec) %>% filter(year > 1990) %>% glimpse() # Recode a sample of numerical values to factors. sample_state_year <- state_year_format3 %>% as_tibble() %>% select(ccode:afgec) %>% filter(year == 1990) sample_state_year %>% glimpse() # Recode. sample_state_year_recoded <- sample_state_year %>% mutate(across(-c(ccode:state), igo_recode_stateyear)) sample_state_year_recoded %>% glimpse()
Data on IGOs from 1815 to 2014 at the state-year level. Contains one record per state-year, with years listed at five-year intervals through 1965 and annually thereafter.
data.frame with
15,557 rows. Relevant
fields:
ccode: COW country number, see states2016.
year: Calendar year.
state: Abbreviated state name, identical to variable names in igo_year_format3.
aaaid...wassen: IGO variables containing information on state membership status. See Details.
Possible values for the status of a state in the IGO are:
| Category | Numerical Value |
| No Membership | 0 |
| Full Membership | 1 |
| Associate Membership | 2 |
| Observer | 3 |
| Missing data | -9 |
| IGO Not In Existence | -1 |
See the igo_recode_stateyear() section for an easy way to recode the
numerical values into factors.
See the Codebook Version 3 IGO Data.
Raw data used internally by igoR.
Intergovernmental Organizations (v3), The Correlates of War Project (IGO Data Stata Files).
See the Codebook Version 3 IGO Data for the full reference.
Pevehouse, J. C., Nordstrom, T., McManus, R. W. & Jamison, A. S. (2020). Tracking organizations in the world: The Correlates of War IGO Version 3.0 data sets. Journal of Peace Research, 57(3), 492–503. doi:10.1177/0022343319881175.
countrycode::countrycode() to convert between different country code
schemes.
Other datasets:
igo_recode_igoyear(),
igo_year_format3,
states2016
data("state_year_format3") dplyr::tibble(state_year_format3)data("state_year_format3") dplyr::tibble(state_year_format3)
The list of states with COW abbreviations and ID numbers, plus the field
state from state_year_format3.
data.frame with
243 rows. Relevant fields:
ccode: COW country number.
stateabb: COW state abbreviation (3 characters).
statenme: COW state name.
styear...endday: Fields that identify the beginning and end of each tenure.
version: Data file version number.
state: Abbreviated state name as it appears in state_year_format3.
This data set contains the list of states in the international system as updated and distributed by the Correlates of War Project.
These data sets identify states, their standard Correlates of War "country code" or state number (used throughout the Correlates of War project data sets), state abbreviations, and dates of membership as states and major powers in the international system.
The Correlates of War Project includes a state in the international system from 1816 to 2016 according to the following criteria:
Before 1920, the entity must have had a population greater than 500,000 and have had diplomatic missions at or above the rank of charge d'affaires with Britain and France.
After 1920, the entity must be a member of the League of Nations or the United Nations, or have a population greater than 500,000 and receive diplomatic missions from two major powers.
The state variable was added to the original data to help comparisons
across data sets in this package.
State System Membership (v2016), The Correlates of War Project.
Correlates of War Project. 2017. "State System Membership List, v2016." Online, https://correlatesofwar.org/.
Other datasets:
igo_recode_igoyear(),
igo_year_format3,
state_year_format3
# Example code. data("states2016") dplyr::glimpse(states2016)# Example code. data("states2016") dplyr::glimpse(states2016)