get_alerts {epitweetr}R Documentation

Getting signals produced by the task generate_alerts of detect_loop

Description

Returns a dataframe of signals produced by the detect_loop, which are stored on the signal folder.

Usage

get_alerts(
  topic = character(),
  countries = numeric(),
  from = "1900-01-01",
  until = "2100-01-01"
)

Arguments

topic

Character vector. When it is not empty it will limit the returned signals to the provided topics, default: character()

countries

Character vector containing the names of countries or regions or a numeric vector containing the indexes of countries as displayed at the shiny App to filter the signals to return., default: numeric()

from

Date defining the beginning of the period of signals to return, default: '1900-01-01'

until

Date defining the end of the period of signals to return, default: '2100-01-01'

Details

For more details see the package vignette.

Value

a dataframe containing the calculated alerts for the period. If no alerts are found then NULL is returned

See Also

generate_alerts

detect_loop

Examples

if(FALSE){
   library(epitweetr)
   # setting up the data folder
   message('Please choose the epitweetr data directory')
   setup_config(file.choose()) 

   # Getting signals produced for last 30 days for a particular country
   get_alerts(
     countries = c("Chile", "Australia", "France"), 
     from = as.Date(Sys.time())-30, 
     until = as.Date(Sys.time())
   )
}

[Package epitweetr version 0.1.28 Index]