add_ucdp_acd()
allows you to add UCDP Armed Conflict data to a state-year data frame
Arguments
- data
state-year data frame
- type
the types of armed conflicts the user wants to consider, specified as a character vector. Options include "extrasystemic", "interstate", "intrastate", and "II". "II" is convenience shorthand for "internationalized intrastate". If you want just one (say: "intrastate"), then the type you want in quotes is sufficient. If you want multiple, wrap it in a vector with
c()
.- issue
do you want to subset the data to just different armed conflicts over different types of issues? If so, specify those here as you would with the
type
argument. Options include "territory", "government", and "both".- only_wars
subsets the conflict data to just those with intensity levels of "war" (i.e. >1,000 deaths). Defaults to FALSE.
Value
add_ucdp_acd()
takes a state-year data frame and returns state-year information from the
UCDP Armed Conflict data set (v. 20.1). The variables returned are whether there is an ongoing armed
conflict in that year, whether there was an armed conflict episode onset that year, what was the maximum
intensity observed that year (if an armed conflict was observed), and a character vector of the associated
conflict IDs that year.
Details
Right now, only state-year data are supported. It's worth saying
that "both" in the issue
argument should not be understood as
equivalent to c("territory","government")
. The former is a kind of
"AND" (in boolean speak) and is an explicit category in the data. The latter
is an "OR" (in boolean speak) and is in all likelihood what you want if you
are tempted to specify "both" in the issue
argument.
References
Gleditsch, Nils Petter; Peter Wallensteen, Mikael Eriksson, Margareta Sollenberg & Havard Strand (2002) Armed Conflict 1946–2001: A New Dataset. Journal of Peace Research 39(5): 615–637.
Pettersson, Therese; Stina Hogbladh & Magnus Oberg (2019). Organized violence, 1989-2018 and peace agreements. Journal of Peace Research 56(4): 589-603.
Examples
# just call `library(tidyverse)` at the top of the your script
library(magrittr)
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
create_stateyears(system = "gw") %>%
filter(between(year, 1946, 2019)) %>%
add_ucdp_acd()
#> Joining with `by = join_by(gwcode, year)`
#> # A tibble: 10,490 × 7
#> gwcode statename year ucdpongoing ucdponset maxintensity conflict_ids
#> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 2 United States o… 1946 0 0 NA NA
#> 2 2 United States o… 1947 0 0 NA NA
#> 3 2 United States o… 1948 0 0 NA NA
#> 4 2 United States o… 1949 0 0 NA NA
#> 5 2 United States o… 1950 1 1 1 238
#> 6 2 United States o… 1951 0 0 NA NA
#> 7 2 United States o… 1952 0 0 NA NA
#> 8 2 United States o… 1953 0 0 NA NA
#> 9 2 United States o… 1954 0 0 NA NA
#> 10 2 United States o… 1955 0 0 NA NA
#> # ℹ 10,480 more rows
create_stateyears(system = "gw") %>%
filter(between(year, 1946, 2019)) %>%
add_ucdp_acd(type = "intrastate", issue = "government")
#> Joining with `by = join_by(gwcode, year)`
#> # A tibble: 10,490 × 7
#> gwcode statename year ucdpongoing ucdponset maxintensity conflict_ids
#> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <chr>
#> 1 2 United States o… 1946 0 0 NA NA
#> 2 2 United States o… 1947 0 0 NA NA
#> 3 2 United States o… 1948 0 0 NA NA
#> 4 2 United States o… 1949 0 0 NA NA
#> 5 2 United States o… 1950 0 0 NA NA
#> 6 2 United States o… 1951 0 0 NA NA
#> 7 2 United States o… 1952 0 0 NA NA
#> 8 2 United States o… 1953 0 0 NA NA
#> 9 2 United States o… 1954 0 0 NA NA
#> 10 2 United States o… 1955 0 0 NA NA
#> # ℹ 10,480 more rows