Penn State Event Data

From visone user support

Jump to: navigation, search

The Penn State Event Data Project (formerly Kansas Event Data System) is a long term project aimed at collecting events among political actors. The events are extracted from regular news reports in a semi-automatic fashion. Specifically, we use data encoding events in or around the Persian Gulf region in the time from 1979 to 1999 available at under the link Gulf data coded from full stories. This data set consists of more than 304 thousand events; the first lines in the file look like this.

 790415	USA	SAU	042	ENDORSE     
 790415	EEC	UNK	031	MEET        
 790415	BEL	ZAR	032	VISIT       

The file encodes a tab-separated table whose rows have the following components (from left to right).

A slightly modified version of the file (in which we added a column for the event type and one for the event weight) is made available in Analysis of the resulting event file is illustrated in the tutorial on event networks. The remainder of this page explains how the preprocessing steps have been done.

We edit the file by adding a header (i.e., column labels separated by tab characters) in the first line. Useful column labels are, for instance, Time, Source, Target, WEIS.code, and Description.

The WEIS event types have been mapped to a numerical cooperation/conflict scale (called Goldstein weights) where a positive event weight indicates a cooperative or friendly event and a negative weight indicates a conflictive or hostile event. The mapping from WEIS codes to Goldstein weights is available in the file

To make use of these event weights we have to merge them into the event table. This can be done with any software that supports to join tables; for instance with the R software for statistical computing (also see the tutorial on using the visone-R connection). The following code examples are for R. To load the event list into a table change first the R working directory with the setwd command to the folder where the event file is located. To load the events into a data frame and see some summary statistics type. <- read.table("", header = TRUE, sep = "\t")

Note that the WEIS.code is treated as numeric (although character strings seems to be more appropriate); this doesn't matter since we only need the code to merge the event file with the goldstein weights. To load the mapping from WEIS codes to goldstein weights (available in the file type.

 goldstein.weights <- read.table("goldstein_weights", header = TRUE, sep = "\t")

To merge the Goldstein weights into the events and see summary statistics use the following commands <- merge(, subset(goldstein.weights, select=c(WEIS.code,Goldstein.weight)), 
                    by.x="WEIS.code", by.y="WEIS.code")

Note that this reorders the events.

We further code explicitly whether the event is conflictive or cooperative.$Type <- "cooperation"$Type[$Goldstein.weight < 0.0] <- "conflict"$Type <- as.factor($Type)

And export to a file.

 write.table(, file="gulf_events_preprocessed.csv", sep=";", row.names=FALSE)

For convenience, the resulting file is made available in

Personal tools