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". See Details note in this documentation for what "both" means.- 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. 25.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, and Havard Strand. 2002. "Armed Conflict 1946–2001: A New Dataset." Journal of Peace Research 39(5): 615–637.
Davies, Shawn, Therése PEttersson, Margareta Sollenberg, and Magnus Öberg. 2025. "Organized violence 1989–2024, and the challenges of identifying civilian victims." Journal of Peace Research 62(4): 1223–1240.
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", subset_years = c(1946:2024)) %>%
add_ucdp_acd()
#> Joining with `by = join_by(gwcode, year)`
#> # A tibble: 12,507 × 8
#> gwcode gw_name microstate year ucdpongoing ucdponset maxintensity
#> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 2 United States of … 0 1946 0 0 NA
#> 2 2 United States of … 0 1947 0 0 NA
#> 3 2 United States of … 0 1948 0 0 NA
#> 4 2 United States of … 0 1949 0 0 NA
#> 5 2 United States of … 0 1950 1 1 1
#> 6 2 United States of … 0 1951 0 0 NA
#> 7 2 United States of … 0 1952 0 0 NA
#> 8 2 United States of … 0 1953 0 0 NA
#> 9 2 United States of … 0 1954 0 0 NA
#> 10 2 United States of … 0 1955 0 0 NA
#> # ℹ 12,497 more rows
#> # ℹ 1 more variable: conflict_ids <chr>
create_stateyears(system = "gw", subset_years = c(1946:2024)) %>%
add_ucdp_acd(type = 'intrastate', issue = 'government')
#> Joining with `by = join_by(gwcode, year)`
#> # A tibble: 12,507 × 8
#> gwcode gw_name microstate year ucdpongoing ucdponset maxintensity
#> <dbl> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 2 United States of … 0 1946 0 0 NA
#> 2 2 United States of … 0 1947 0 0 NA
#> 3 2 United States of … 0 1948 0 0 NA
#> 4 2 United States of … 0 1949 0 0 NA
#> 5 2 United States of … 0 1950 0 0 NA
#> 6 2 United States of … 0 1951 0 0 NA
#> 7 2 United States of … 0 1952 0 0 NA
#> 8 2 United States of … 0 1953 0 0 NA
#> 9 2 United States of … 0 1954 0 0 NA
#> 10 2 United States of … 0 1955 0 0 NA
#> # ℹ 12,497 more rows
#> # ℹ 1 more variable: conflict_ids <chr>