get_alerts: Getting signals produced by the task 'generate_alerts' of...

Description Usage Arguments Details Value See Also Examples

View source: R/alert.R

Description

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

Usage

1
2
3
4
5
6
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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())
   )
}

epitweetr documentation built on April 9, 2021, 1:06 a.m.