NormEventCounts {GDELTtools} | R Documentation |
Scale event counts
Description
Scale event counts based on the unit of analysis.
Usage
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_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. https://www.gdeltproject.org/
Examples
## Not run:
GDELT_subset_data <- GetGDELT("2013-06-01", "2013-06-07",
(ActionGeo_CountryCode=="AF" | ActionGeo_CountryCode=="US") & EventCode>=140 & EventCode<150,
local_folder="~/gdeltdata")
GDELT_normed_data <- NormEventCounts(x = GDELT_subset_data,
unit_analysis="day",
var_name="protest")
## End(Not run)
[Package GDELTtools version 1.7 Index]