The goal of conflictoR is to provide a user-friendly R interface for accessing and analyzing conflict data from the Uppsala Conflict Data Program (UCDP) API. With conflictoR, you can dynamically fetch, filter, and analyze conflict datasets directly from the source, streamlining research and data analysis workflows related to global conflicts.
You can install the development version of conflictoR from GitHub with:
# install.packages("devtools")
devtools::install_github("datapumpernickel/conflictoR")This is a basic example which shows you how to solve a common problem:
library(conflictoR)
# Fetch UCDP GED events with specific filters
response_ged <- cl_get_data(
resource = "gedevents",
version = "24.1",
country = c(90, 91, 92), # Guatemala, Honduras, El Salvador
start_date = "2000-01-01",
end_date = "2007-10-12",
type_of_violence = c(1, 3)
)
# Print the response
print(response_ged)