Learn R Programming

gdeltr2 (version 0.3.11023026)

get_data_locations_instability_api: Returns instability data for given locations

Description

Returns instability data for given locations

Usage

get_data_locations_instability_api(location_ids = c("US", "IS", "TU"),
  random_locations = NULL, variable_names = c("instability", "conflict",
  "tone", "protest", "artvolnorm"), visualization = "static",
  days_moving_average = NA, time_periods = "daily",
  use_multi_locations = F, return_wide = T, nest_data = F,
  return_message = T)

Arguments

location_ids

Specify the location IDs

random_locations

Number of random location IDs to add

variable_names

Specify variables they can include:

  • instability

  • conflict

  • protest

  • tone

  • artvolnorm: Relative mentions

visualization
  • NULL: no visualization

  • interactive: returns an interactive visualization

  • static: returns a ggplot2 visualization

days_moving_average

Specify day moving average, NA is unsmoothed

time_periods

Specified time period

  • daily

  • 15min

use_multi_locations

if TRUE returns all cities in a select country

return_wide

if TRUE returns a wide data frame

nest_data

if TRUE returns a nested data frame

return_message

if TRUE returns a location

Value

if visualize a ggplot visualization else a data_frame