conflictr is an R package designed to acquire, process, and visualize international conflict data. We currently provide support for all Uppsala Conflict Data Program (UCDP) datasets, The Armed Conflict Location & Event Data Project (ACLED) dataset, and the Major Episodes of Political Violence (MEPV) dataset (under development). For more information regarding the available functionality and use see the conflictr reference manual.

Installation

You can install the released version of conflictr from GitLab with:

library(devtools)
devtools::install_gitlab("dante-sttr/conflictr", dependencies=TRUE)

Installation With Windows

To install R packages over Git on a Windows system, you must install Rtools first. The latest version of Rtools is available here. Furthermore, you may experience difficulty installing R packages over Git if you utilize a Windows machine on a network with Active Directory or shared network drives. To enable proper package installation under these circumstances please follow this guide.

Example

conflictr provides functions to acquire data from the UCDP and ACLED data APIs.

library(conflictr)

ucdp.dyadic<-getUCDP(db="dyadic", version="18.1")

Additional datasets and versions may be specified. In some instances conflictr supports data filtering via the API calls.

ucdp.ged<-getUCDP(db="gedevents", version="18.1", location = 645)

conflictr also provides default plotting functions with basemap tile services for spatially explicit point datasets.

plot(ucdp.ged, basemap_zoom=6) +
  ggplot2::labs(title="Conflicts in Iraq from 1989 - 2018",
                subtitle = "For Battles With at Least 25 Cumulative Fatalities")