get_quad_count: Get the count of events based on Quad category

Description Usage Arguments Examples

Description

get_quad_count takes a vector of quad categories (including verbal/material cooperation/conflict), determines the corresponding CAMEO codes, then get the counts for the specified source/target countries and date by calling get_CAMEO_count

Usage

1
2
get_quad_count(conn, quad, date = NULL, source.country = NULL,
  target.country = NULL)

Arguments

conn

A MySQL connection to the ICEWS database. Supply your credentials to conn <- dbConnect(MySQL(), user="username", password="password", dbname="event_data", host="our.host.ip")

quad

A string indicates a quad category, i.e. one of verb.coop, verb.conf, matl.coop, matl.confl)

date

A string in the YYYYMMDD format. If NULL, will count events on any date

source.country

A string specifying the ISOA3Code of the source country. If NULL, will count events from all countries

target.country

A string specifying the ISOA3Code of the target country. If NULL, will count events targeted at all countries

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
quads <- c("verb.coop", "verb.conf", "matl.coop", "matl.conf")
# Get quad counts between all country-dyads in a given date
result1 <- ldply(quads, .fun=getIcewsQuad, date="20021025")
# Get quad counts between one dyad for all dates
result2 <- ldply(quads, .fun=getIcewsQuad,
                source.country="AFG", target.country="ALB")
# Get quad counts for one dyad in one date
result3 <- ldply(quads, .fun=getIcewsQuad, date="20021025", source.country="AFG", target.country="ALB")

## End(Not run)

LaDilettante/icewsr documentation built on May 8, 2019, 7:59 p.m.