add_ucdp_acd: Add UCDP Armed Conflict Data to state-year data frame

View source: R/add_ucdp_acd.R

add_ucdp_acdR Documentation

Add UCDP Armed Conflict Data to state-year data frame


add_ucdp_acd() allows you to add UCDP Armed Conflict data to a state-year data frame


add_ucdp_acd(data, type, issue, only_wars = FALSE)



state-year data frame


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().


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".


subsets the conflict data to just those with intensity levels of "war" (i.e. >1,000 deaths). Defaults to FALSE.


Right now, only state-year data are supported. Function is in true pilot mode.


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.


Steven V. Miller


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.


# just call `library(tidyverse)` at the top of the your script

create_stateyears(system = "gw") %>%
filter(between(year, 1946, 2019)) %>%

create_stateyears(system = "gw") %>%
filter(between(year, 1946, 2019)) %>%
add_ucdp_acd(type = "intrastate", issue = "government")

peacesciencer documentation built on March 24, 2022, 5:06 p.m.