eventNetworks: Convert Phoenix event data to daily event-networks.

Description Usage Arguments Value Note Author(s)

View source: R/EventNetworks.R

Description

Take event-level data and convert it into networks of interaction by time period. Output is in the form of a nested list object where each element is an R network object. These networks can then be processed and analyzed.

Usage

1
2
3
4
5
eventNetworks(start_date, end_date, level, dv_key, phoenix_loc = NULL,
  icews_loc = NULL, histphoenix_loc = NULL,
  dv_server = "harvard.dataverse.edu", update = TRUE, actorset = "states",
  codeset = "all", time_window = "day", code_subset = "all",
  tie_type = "binary", sources = "all")

Arguments

start_date

start date of time period as Ymd-format integer (ex: June 1, 2014 as 20140601).

end_date

end date of time period as Ymd-format integer (ex: June 1, 2014 as 20140601).

level

level of event granularity ('eventcode', 'rootcode', 'pentaclass', or 'goldstein'). 'Eventcode' creates a network for each of the 226 sub-codes in CAMEO. 'Rootcode' creates a network for each of the 20 event root codes in CAMEO. 'Pentaclass' creates a network for each of the 0-4 pentaclass codes in CAMEO. 'Goldstein' creates one or two networks denoting mean Goldstein scores, either aggregated (positive - negative) or separated into two separate networks for positive and negative Goldstein scores.

dv_key

Unique user key to access SWORD API and automatically find and download up-to-date ICEWS data.

phoenix_loc

folder containing Phoenix data sets as daily .csv data tables. Automatically checks for new data sets each time the function is run, and downloads new daily data as it becomes available. Currently in 'one-and'done' format where it downloads the first time, and checks thereafter.

icews_loc

folder containing ICEWS data sets as daily .tab data tables. Because I don't know how to work a SWORD API, these will need to be manually downloaded and updated.

histphoenix_loc

folder containing historic Phoenix data from UIUC's Cline Center for Democracy. Leave empty if you don't want to use these data.

dv_server

Dataverse server address from which to download up-to-date ICEWS data. Defaults to Harvard Dataverse at harvard.dataverse.edu.

update

should phoenixNet attempt to download new data? This will attempt to download any Phoenix data files that 'should' be present in the Phoenix data directory (one data file per day, from 2014-06-20 through the present day) and denote whether or not any of these files come up missing in the process.

actorset

set of actors for which to create event-networks. Defaults to the 255 ISO-coded states in the international system. Specifying a specific state or set of states (as 3-character ISO codes) will extract all the 'major' domestic entites within that state/states.

codeset

subset of event codes as specified by 'level'. This is useful if you desire to extract only a portion of interactions recorded by CAMEO, but has to align with the code aggregation specified in the 'level' argument. For example, if you specify 'rootcode', the 'codeset' you specify has to be one or more root codes between 1 and 20. Entering a subset of root code values would return a smaller number of network layers. Defaults to 'all'.

time_window

temporal window to build event-networks. Valid entries are 'day', 'week', 'month', or 'year'.

code_subset

subset of EVENTCODES that can be aggregated up to higher order interactions. For example, you might want to only look at event codes below 100, but then aggregate those event codes to rootcode or pentaclass.

tie_type

type of ties to return. Default is binarized ties where a tie represents the presence of one OR MORE interactions in the time period specified. Valid entries are 'binary', 'count' (count of events), 'meangoldstein' (mean Goldstein score), 'sepgoldstein' (mean positive/negative Goldstein scores separated). NOTE: choosing a Goldstein score as tie type negates the "level" argument.

sources

use only Phoenix or ICEWS data in creating event networks. Valid entries are 'phoenix', 'icews', 'histphoenix' or 'all' (default).

dv_server

location of the ICEWS Dataverse server. Defaults to "harvard.dataverse.edu" and probably won't change anytime soon.

Value

master_networks a LIST object containing temporally referenced event-networks.

Note

This function is still in early development and may contain significant errors. Don't trust it.

Author(s)

Jesse Hammond


jrhammond/phoenixNet documentation built on May 19, 2019, 11:53 p.m.