Skip to contents

This function allows users to change from numeric interaction codes (i.e. 1, 2, 3, etc) to string interaction codes (i.e. State Forces, Rebel Group, etc.)

Usage

acled_transform_interaction(df, only_inters = F)

Arguments

df

dataframe. ACLED data including at least inter1, inter2 columns. If only_inters is TRUE, it also requires interaction column.

only_inters

boolean. Option whether to include the interaction column in the transformation (if TRUE) or to only use inter1 and inter2 (if FALSE).

Value

Returns a tibble of of ACLED events with modified inter1, inter2 and potentially interaction columns .

See also

Other Data Manipulation: acled_transform_longer(), acled_transform_wider()

Examples

if (FALSE) { # \dontrun{

# Load data frame
argen_acled <- acled_api(
  email = "your_email", key = "your_key",
  country = "Argentina", start_date = "2022-01-01", end_date = "2022-02-01",
  acled_access = FALSE
)

# Transform the interactions
argen_acled_transformed <- acled_transformation_interaction(argen_acled, only_inters = F)
} # }