Scale event counts

Description

Scale event counts based on the unit of analysis.

Usage

1
NormEventCounts(x, unit.analysis, var.name = "norming_vars")

Arguments

x

data.frame, a GDELT data.frame.

unit.analysis

character, default is country.day; other options: country.day, country.month, country.year, day, month, year

var.name

character, base name for the new count variables

Details

For unit.analysis, day and country-day put out a data set where date is of class ‘date’. All other options put out a data set where year or month is integer (this needs to be unified in a later version).

Value

data.frame

Author(s)

Oskar N.T. Thoms othoms@princeton.edu
Stephen R. Haptonstahl srh@haptonstahl.org
John Beieler jub270@psu.edu

References

GDELT: Global Data on Events, Location and Tone, 1979-2012. Presented at the 2013 meeting of the International Studies Association in San Francisco, CA. http://www.gdeltproject.org/

Examples

1
2
3
4
5
6
7
8
## Not run: 
GDELT.subset.data <- GetGDELT("2013-06-01", "2013-06-07", allow.wildcards=TRUE,
  filter=list(ActionGeo_CountryCode=c("AF", "US"), EventCode="14*"),
  local.folder="~/gdeltdata")
GDELT.normed.data <- NormEventCounts(x = GDELT.subset.data,
  unit.analysis="day",
  var.name="protest")
## End(Not run)