Skip to contents

create_leaderdays() allows you to generate leader-day data from leader-level data provided in peacesciencer.

Usage

create_leaderdays(system = "archigos", standardize = "none")

Arguments

system

a leader system with which to create leader-days. Right now, only "archigos" is supported.

standardize

a character vector of length one: "cow", "gw", or "none". If "cow", the function standardizes the leader-days to just those that overlap with state system membership in the Correlates of War state system (see: cow_states). If "gw", the function standardizes the leader-days to just those that overlap with the state system dates of the Gleditsch-Ward date (see: gw_states). If "none", the function returns all leader-days as presented in Archigos (which is nominally denominated in Gleditsch-Ward state system codes, if not necessarily Gleditsch-Ward state system dates). Default is "none".

Value

create_leaderdays() takes leader-level data available in peacesciencerand returns a leader-day-level data frame.

Details

create_leaderdays(), as of writing, only supports the Archigos data set of leaders. I envision this function being mostly for internal uses. Basically, create_leaderyears() effectively starts by first running a version of create_leaderdays(). So, why not have this function too?

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{
create_leaderdays()
#> # A tibble: 5,298,380 × 5
#>    obsid    gwcode leader date       yrinoffice
#>    <chr>     <dbl> <chr>  <date>          <dbl>
#>  1 USA-1869      2 Grant  1869-03-04          1
#>  2 USA-1869      2 Grant  1869-03-05          1
#>  3 USA-1869      2 Grant  1869-03-06          1
#>  4 USA-1869      2 Grant  1869-03-07          1
#>  5 USA-1869      2 Grant  1869-03-08          1
#>  6 USA-1869      2 Grant  1869-03-09          1
#>  7 USA-1869      2 Grant  1869-03-10          1
#>  8 USA-1869      2 Grant  1869-03-11          1
#>  9 USA-1869      2 Grant  1869-03-12          1
#> 10 USA-1869      2 Grant  1869-03-13          1
#> # … with 5,298,370 more rows

create_leaderdays(standardize = "gw")
#> Joining, by = c("gwcode", "date")
#> # A tibble: 5,181,021 × 5
#>    obsid    gwcode leader date       yrinoffice
#>    <chr>     <dbl> <chr>  <date>          <dbl>
#>  1 USA-1869      2 Grant  1869-03-04          1
#>  2 USA-1869      2 Grant  1869-03-05          1
#>  3 USA-1869      2 Grant  1869-03-06          1
#>  4 USA-1869      2 Grant  1869-03-07          1
#>  5 USA-1869      2 Grant  1869-03-08          1
#>  6 USA-1869      2 Grant  1869-03-09          1
#>  7 USA-1869      2 Grant  1869-03-10          1
#>  8 USA-1869      2 Grant  1869-03-11          1
#>  9 USA-1869      2 Grant  1869-03-12          1
#> 10 USA-1869      2 Grant  1869-03-13          1
#> # … with 5,181,011 more rows
# }