Extract all the countries belonging to an IGO on a specific date.
Arguments
- ioname
Any valid
ioname
of an IGO as specified on igo_year_format3. It could be also a vector of IGOs.- year
Year to be assessed, an integer or an array of year. If
NULL
the latest year available of the IGO would be extracted.- status
Character or vector with the membership status to be extracted. See Details on state_year_format3.
Value
A data.frame
.
Examples
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
igo_members("EU", year = 1993) %>% as_tibble()
#> # A tibble: 12 × 8
#> ioname ccode state statenme year value category orgname
#> <chr> <dbl> <chr> <chr> <dbl> <dbl> <fct> <chr>
#> 1 EU 200 uk United Kingdom 1993 1 Full Membership European…
#> 2 EU 205 ireland Ireland 1993 1 Full Membership European…
#> 3 EU 210 netherlands Netherlands 1993 1 Full Membership European…
#> 4 EU 211 belgium Belgium 1993 1 Full Membership European…
#> 5 EU 212 luxembourg Luxembourg 1993 1 Full Membership European…
#> 6 EU 220 france France 1993 1 Full Membership European…
#> 7 EU 230 spain Spain 1993 1 Full Membership European…
#> 8 EU 235 portugal Portugal 1993 1 Full Membership European…
#> 9 EU 255 germany Germany 1993 1 Full Membership European…
#> 10 EU 325 italy Italy 1993 1 Full Membership European…
#> 11 EU 350 greece Greece 1993 1 Full Membership European…
#> 12 EU 390 denmark Denmark 1993 1 Full Membership European…
igo_members("EU") %>% as_tibble()
#> # A tibble: 28 × 8
#> ioname ccode state statenme year value category orgname
#> <chr> <dbl> <chr> <chr> <dbl> <dbl> <fct> <chr>
#> 1 EU 200 uk United Kingdom 2014 1 Full Membership European…
#> 2 EU 205 ireland Ireland 2014 1 Full Membership European…
#> 3 EU 210 netherlands Netherlands 2014 1 Full Membership European…
#> 4 EU 211 belgium Belgium 2014 1 Full Membership European…
#> 5 EU 212 luxembourg Luxembourg 2014 1 Full Membership European…
#> 6 EU 220 france France 2014 1 Full Membership European…
#> 7 EU 230 spain Spain 2014 1 Full Membership European…
#> 8 EU 235 portugal Portugal 2014 1 Full Membership European…
#> 9 EU 255 germany Germany 2014 1 Full Membership European…
#> 10 EU 290 poland Poland 2014 1 Full Membership European…
#> # ℹ 18 more rows
igo_members("NAFTA", year = c(1995:1998)) %>% as_tibble()
#> # A tibble: 12 × 8
#> ioname ccode state statenme year value category orgname
#> <chr> <dbl> <chr> <chr> <dbl> <dbl> <fct> <chr>
#> 1 NAFTA 2 usa United States of America 1995 1 Full Member… North …
#> 2 NAFTA 20 canada Canada 1995 1 Full Member… North …
#> 3 NAFTA 70 mexico Mexico 1995 1 Full Member… North …
#> 4 NAFTA 2 usa United States of America 1996 1 Full Member… North …
#> 5 NAFTA 20 canada Canada 1996 1 Full Member… North …
#> 6 NAFTA 70 mexico Mexico 1996 1 Full Member… North …
#> 7 NAFTA 2 usa United States of America 1997 1 Full Member… North …
#> 8 NAFTA 20 canada Canada 1997 1 Full Member… North …
#> 9 NAFTA 70 mexico Mexico 1997 1 Full Member… North …
#> 10 NAFTA 2 usa United States of America 1998 1 Full Member… North …
#> 11 NAFTA 20 canada Canada 1998 1 Full Member… North …
#> 12 NAFTA 70 mexico Mexico 1998 1 Full Member… North …
# Extract different status
igo_members("ACCT", status = c("Associate Membership", "Observer")) %>%
as_tibble()
#> # A tibble: 25 × 8
#> ioname ccode state statenme year value category orgname
#> <chr> <dbl> <chr> <chr> <dbl> <dbl> <fct> <chr>
#> 1 ACCT 347 kosovo Kosovo 2014 2 Associate Me… Franco…
#> 2 ACCT 352 cyprus Cyprus 2014 2 Associate Me… Franco…
#> 3 ACCT 694 qatar Qatar 2014 2 Associate Me… Franco…
#> 4 ACCT 42 domrepublic Dominican Republic 2014 3 Observer Franco…
#> 5 ACCT 70 mexico Mexico 2014 3 Observer Franco…
#> 6 ACCT 94 costarica Costa Rica 2014 3 Observer Franco…
#> 7 ACCT 165 uruguay Uruguay 2014 3 Observer Franco…
#> 8 ACCT 290 poland Poland 2014 3 Observer Franco…
#> 9 ACCT 305 austria Austria 2014 3 Observer Franco…
#> 10 ACCT 310 hungary Hungary 2014 3 Observer Franco…
#> # ℹ 15 more rows
# States no members of the UN
igo_members("UN", status = "No Membership") %>%
as_tibble()
#> # A tibble: 2 × 8
#> ioname ccode state statenme year value category orgname
#> <chr> <dbl> <chr> <chr> <dbl> <dbl> <fct> <chr>
#> 1 UN 347 kosovo Kosovo 2014 0 No Membership United Nations
#> 2 UN 713 taiwan Taiwan 2014 0 No Membership United Nations
# Vectorized
igo_members(c("NAFTA", "EU"), year = 1993) %>%
as_tibble() %>%
arrange(state)
#> # A tibble: 15 × 8
#> ioname ccode state statenme year value category orgname
#> <chr> <dbl> <chr> <chr> <dbl> <dbl> <fct> <chr>
#> 1 EU 211 belgium Belgium 1993 1 Full Me… Europe…
#> 2 NAFTA 20 canada Canada 1993 1 Full Me… North …
#> 3 EU 390 denmark Denmark 1993 1 Full Me… Europe…
#> 4 EU 220 france France 1993 1 Full Me… Europe…
#> 5 EU 255 germany Germany 1993 1 Full Me… Europe…
#> 6 EU 350 greece Greece 1993 1 Full Me… Europe…
#> 7 EU 205 ireland Ireland 1993 1 Full Me… Europe…
#> 8 EU 325 italy Italy 1993 1 Full Me… Europe…
#> 9 EU 212 luxembourg Luxembourg 1993 1 Full Me… Europe…
#> 10 NAFTA 70 mexico Mexico 1993 1 Full Me… North …
#> 11 EU 210 netherlands Netherlands 1993 1 Full Me… Europe…
#> 12 EU 235 portugal Portugal 1993 1 Full Me… Europe…
#> 13 EU 230 spain Spain 1993 1 Full Me… Europe…
#> 14 EU 200 uk United Kingdom 1993 1 Full Me… Europe…
#> 15 NAFTA 2 usa United States of Ameri… 1993 1 Full Me… North …
# Use countrycodes 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)
}
#> # A tibble: 28 × 10
#> ioname ccode state statenme year value category orgname iso3c continent
#> <chr> <dbl> <chr> <chr> <dbl> <dbl> <fct> <chr> <chr> <chr>
#> 1 EU 200 uk United … 2014 1 Full Me… Europe… GBR Europe
#> 2 EU 205 ireland Ireland 2014 1 Full Me… Europe… IRL Europe
#> 3 EU 210 netherlan… Netherl… 2014 1 Full Me… Europe… NLD Europe
#> 4 EU 211 belgium Belgium 2014 1 Full Me… Europe… BEL Europe
#> 5 EU 212 luxembourg Luxembo… 2014 1 Full Me… Europe… LUX Europe
#> 6 EU 220 france France 2014 1 Full Me… Europe… FRA Europe
#> 7 EU 230 spain Spain 2014 1 Full Me… Europe… ESP Europe
#> 8 EU 235 portugal Portugal 2014 1 Full Me… Europe… PRT Europe
#> 9 EU 255 germany Germany 2014 1 Full Me… Europe… DEU Europe
#> 10 EU 290 poland Poland 2014 1 Full Me… Europe… POL Europe
#> # ℹ 18 more rows