

<!-- README.md is generated from README.qmd. Please edit that file -->

# igoR <a href='https://dieghernan.github.io/igoR/'><img src="man/figures/logo.png" align="right" height="139"/></a>

<!-- badges: start -->

[![CRAN
status](https://www.r-pkg.org/badges/version/igoR)](https://CRAN.R-project.org/package=igoR)
[![CRAN
results](https://badges.cranchecks.info/worst/igoR.svg)](https://cran.r-project.org/web/checks/check_results_igoR.html)
[![CRAN-Downloads](https://cranlogs.r-pkg.org/badges/grand-total/igoR)](https://cran.r-project.org/package=igoR)
[![r-universe](https://dieghernan.r-universe.dev/badges/igoR)](https://dieghernan.r-universe.dev/)
[![R-CMD-check](https://github.com/dieghernan/igoR/actions/workflows/check-full.yaml/badge.svg)](https://github.com/dieghernan/igoR/actions/workflows/check-full.yaml)
[![codecov](https://codecov.io/gh/dieghernan/igoR/branch/main/graph/badge.svg?token=UH3VLTTTRE)](https://app.codecov.io/gh/dieghernan/igoR)
[![coveralls](https://coveralls.io/repos/github/dieghernan/igoR/badge.svg)](https://coveralls.io/github/dieghernan/igoR)
[![CodeFactor](https://www.codefactor.io/repository/github/dieghernan/igor/badge)](https://www.codefactor.io/repository/github/dieghernan/igor)
[![DOI](https://img.shields.io/badge/DOI-10.32614/CRAN.package.igoR-blue)](https://doi.org/10.32614/CRAN.package.igoR)
[![Project Status: Inactive – The project has reached a stable, usable
state but is no longer being actively developed, support and maintenance
will be provided as time
allows.](https://www.repostatus.org/badges/latest/inactive.svg)](https://www.repostatus.org/#inactive)
[![status](https://tinyverse.netlify.app/status/igoR)](https://CRAN.R-project.org/package=igoR)

<!-- badges: end -->

**igoR** provides tools for searching, extracting and recoding data from
the Intergovernmental Organizations Database (version 3), distributed by
the Correlates of War Project ([Pevehouse et al.
2020](#ref-pevehouse2020)).

The IGO-year data set contains **534** IGOs recorded from 1816 to 2014.
The package also includes country-year membership data, state system
data ([Correlates of War Project 2025](#ref-correlatesofwarproject2025))
and functions for deriving dyad-year joint membership results.

- Source: [Intergovernmental Organizations (version
  3)](https://correlatesofwar.org/data-sets/IGOs/).
- Documentation and vignettes at <https://dieghernan.github.io/igoR/>.

> [!NOTE]
>
> This package is stable and maintained on a best-effort basis. I
> currently prioritize **CRAN** compatibility, bug fixes and regressions
> over new features.

## Installation

<div class="pkgdown-release">

Install **igoR** from
[**CRAN**](https://CRAN.R-project.org/package=igoR):

``` r
install.packages("igoR")
```

</div>

<div class="pkgdown-devel">

Check the documentation for the development version at
<https://dieghernan.github.io/igoR/dev/>.

You can install the development version from **GitHub**:

``` r
pak::pak("dieghernan/igoR")
```

Alternatively, you can install **igoR** using
[**r-universe**](https://dieghernan.r-universe.dev/igoR):

``` r
# Install igoR from r-universe.
install.packages(
  "igoR",
  repos = c(
    "https://dieghernan.r-universe.dev",
    "https://cloud.r-project.org"
  )
)
```

</div>

## Basic usage

### Search for IGOs by name

Search for IGOs related to “sugar”.

``` r
library(igoR)

result_sugar <- igo_search("Sugar")
```

| ionum | ioname | orgname | longorgname | label | sdate | deaddate | dead | integrated | replaced | igocode | version | accuracyofpre1965membershipdates | sourcesandnotes | imputed | political | social | economic |
|---:|:---|:---|:---|:---|---:|---:|---:|---:|---:|---:|---:|:---|:---|---:|---:|---:|---:|
| 40 | AMSC | African/Malgasy Sugar Council | African and Malagasy Sugar Council | African and Malagasy Sugar Council | 1966 | 1977 | 1 | 0 | 0 | NA | 2.1 | Not applicable - created 1965 or later |  | 0 | 0 | 0 | 1 |
| 1920 | GLACSEC | Group of L/A & Carib. Sugar Exp. Countries | Group of Latin American and Caribbean Sugar Exporting Countries | Group of Latin American and Caribbean Sugar Exporting Countries | 1974 | 2001 | 1 | 0 | 0 | NA | 2.3 | Not applicable - created 1965 or later |  | 0 | 1 | 0 | 0 |
| 3130 | ISuC | Intl Sugar Council | International Sugar Council | International Sugar Council | 1937 | 1967 | 1 | 0 | 0 | 91 | 3.0 | Within 5 years |  | 0 | 0 | 1 | 0 |
| 4290 | SugU | Sugar Union | Sugar Union | Sugar Union | 1902 | 1913 | 1 | 0 | 0 | 29 | 3.0 | Completely accurate, except a few minor uncertainties |  | 0 | 0 | 0 | 1 |

<p class="caption">

Table 1: IGOs related to sugar
</p>

### IGO members

Extract the members of the [European Economic
Community](https://en.wikipedia.org/wiki/European_Economic_Community)
over time.

``` r
eec_code <- igo_search("EEC", exact = TRUE)

# Get founding members.
eec_init <- igo_members(eec_code$ioname, year = eec_code$sdate)
```

| ioname | ccode | state | statenme | year | value | category | orgname |
|:---|---:|:---|:---|---:|---:|:---|:---|
| EEC | 210 | netherlands | Netherlands | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 211 | belgium | Belgium | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 212 | luxembourg | Luxembourg | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 220 | france | France | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 260 | wgermany | German Federal Republic | 1958 | 1 | Full Membership | European Economic Community |
| EEC | 325 | italy | Italy | 1958 | 1 | Full Membership | European Economic Community |

<p class="caption">

Table 2: EEC members (1958)
</p>

``` r
# Get members in the latest available year.
eec_end <- igo_members(eec_code$ioname)
```

| ioname | ccode | state | statenme | year | value | category | orgname |
|:---|---:|:---|:---|---:|---:|:---|:---|
| EEC | 200 | uk | United Kingdom | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 205 | ireland | Ireland | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 210 | netherlands | Netherlands | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 211 | belgium | Belgium | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 212 | luxembourg | Luxembourg | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 220 | france | France | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 230 | spain | Spain | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 235 | portugal | Portugal | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 255 | germany | Germany | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 325 | italy | Italy | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 350 | greece | Greece | 1992 | 1 | Full Membership | European Economic Community |
| EEC | 390 | denmark | Denmark | 1992 | 1 | Full Membership | European Economic Community |

<p class="caption">

Table 3: EEC members (1992)
</p>

## Recommended packages

- **countrycode** package for converting country names and codes across
  systems, including ISO3, Eurostat, World Bank, UN and FIPS/GEC.
- **dplyr** package for data manipulation.

## Citation

<p>

Hernangómez D (2026). <em>igoR: Access the Intergovernmental
Organizations (IGO) Database</em>.
<a href="https://doi.org/10.32614/CRAN.package.igoR">doi:10.32614/CRAN.package.igoR</a>.
<a href="https://dieghernan.github.io/igoR/">https://dieghernan.github.io/igoR/</a>.
</p>

For **LaTeX** users, a **BibTeX** entry is:

    @Manual{R-igoR,
      title = {{igoR}: Access the Intergovernmental Organizations ({IGO}) Database},
      doi = {10.32614/CRAN.package.igoR},
      author = {Diego Hernangómez},
      year = {2026},
      version = {1.1.0},
      url = {https://dieghernan.github.io/igoR/},
      abstract = {Provides tools for searching, extracting and recoding the Intergovernmental Organizations (IGO) Database (version 3), distributed by the Correlates of War Project <https://correlatesofwar.org/>. Includes IGO-year and country-year membership data, state system data and functions for deriving dyad-year joint membership results. For a description of the data, see Pevehouse, J. C. et al. (2020) <doi:10.1177/0022343319881175>.},
    }

## References

<div id="refs" class="references csl-bib-body hanging-indent">

<div id="ref-correlatesofwarproject2025" class="csl-entry">

Correlates of War Project. 2025. *State System Membership, V2024*.
<https://correlatesofwar.org>.

</div>

<div id="ref-pevehouse2020" class="csl-entry">

Pevehouse, Jon C. W., Timothy Nordstrom, Roseanne W. McManus, and Anne
Spencer Jamison. 2020. “Tracking Organizations in the World: The
<span class="nocase">Correlates of War IGO</span> Version 3.0 Datasets.”
*Journal of Peace Research* 57 (3): 492–503.
<https://doi.org/10.1177/0022343319881175>.

</div>

</div>
