add_archigos() allows you to add some information about leaders to dyad-year or state-year data. The function leans on an abbreviated version of the data, which also comes in this package.

add_archigos(data)

Arguments

data

a dyad-year data frame (either "directed" or "non-directed") or state-year data frame

Value

add_archigos() takes a dyad-year or state-year data frame and adds a few summary variables based off the leader-level data. These include whether there was a leader transition in the state-year (or first/second state in the dyad-year), whether there was an "irregular" leader transition, the number of leaders in the state-year, the unique leader ID for Jan. 1 of the year, and the unique leader ID for Dec. 31 of the year.

Details

The function leans on attributes of the data that are provided by the create_dyadyear() or create_stateyear() function. Make sure that function (or data created by that function) appear at the top of the proverbial pipe.

References

Goemans, Henk E., Kristian Skrede Gleditsch, and Giacomo Chiozza. 2009. "Introducing Archigos: A Dataset of Political Leaders" Journal of Peace Research 46(2): 269--83.

Author

Steven V. Miller

Examples

# \donttest{ # just call `library(tidyverse)` at the top of the your script library(magrittr) cow_ddy %>% add_archigos()
#> Joining, by = c("ccode1", "year")
#> Joining, by = c("ccode2", "year")
#> # A tibble: 2,063,670 x 13 #> ccode1 ccode2 year leadertransition1 irregular1 n_leaders1 jan1leadid1 #> <dbl> <dbl> <dbl> <dbl> <dbl> <int> <chr> #> 1 2 20 1920 0 0 1 81dd2320-1e42-11… #> 2 2 20 1921 1 0 2 81dd2320-1e42-11… #> 3 2 20 1922 0 0 1 81dd2321-1e42-11… #> 4 2 20 1923 1 0 2 81dd2321-1e42-11… #> 5 2 20 1924 0 0 1 81dd2322-1e42-11… #> 6 2 20 1925 0 0 1 81dd2322-1e42-11… #> 7 2 20 1926 0 0 1 81dd2322-1e42-11… #> 8 2 20 1927 0 0 1 81dd2322-1e42-11… #> 9 2 20 1928 0 0 1 81dd2322-1e42-11… #> 10 2 20 1929 1 0 2 81dd2322-1e42-11… #> # … with 2,063,660 more rows, and 6 more variables: dec31leadid1 <chr>, #> # leadertransition2 <dbl>, irregular2 <dbl>, n_leaders2 <int>, #> # jan1leadid2 <chr>, dec31leadid2 <chr>
create_stateyears() %>% add_archigos()
#> Joining, by = c("ccode", "year")
#> # A tibble: 16,731 x 8 #> ccode statenme year leadertransition irregular n_leaders jan1leadid #> <dbl> <chr> <dbl> <dbl> <dbl> <int> <chr> #> 1 2 United States of… 1816 NA NA NA NA #> 2 2 United States of… 1817 NA NA NA NA #> 3 2 United States of… 1818 NA NA NA NA #> 4 2 United States of… 1819 NA NA NA NA #> 5 2 United States of… 1820 NA NA NA NA #> 6 2 United States of… 1821 NA NA NA NA #> 7 2 United States of… 1822 NA NA NA NA #> 8 2 United States of… 1823 NA NA NA NA #> 9 2 United States of… 1824 NA NA NA NA #> 10 2 United States of… 1825 NA NA NA NA #> # … with 16,721 more rows, and 1 more variable: dec31leadid <chr>
# }