search_loop {epitweetr}R Documentation

Runs the search loop

Description

Infinite loop ensuring the permanent collection of tweets

Usage

search_loop(data_dir = NA)

Arguments

data_dir

optional path to the 'data directory' containing application settings, models and collected tweets. If not provided it will reuse the last set on the current session. If not provided the system will try to reuse the existing one from last session call of setup_config or use the EPI_HOME environment variable, Default: NA

Details

The detect loop is a pure R function designed for downloading tweets from the Twitter search API. It can handle several topics ensuring that all of them will be downloaded fairly using a round-robin philosophy and respecting Twitter API rate-limits.

The progress of this task is reported on the 'topics.json' file which is read or created by this function. This function will try to collect tweets respecting a 'collect_span' window in minutes, which is defined on the Shiny app and defaults to 60 minutes.

To see more details about the collection algorithm please see epitweetr vignette.

In order to work, this task needs Twitter credentials, which can be set on the Shiny app or using set_twitter_app_auth

Value

Nothing

See Also

set_twitter_app_auth

Examples

if(FALSE){
   #Running the search loop
   library(epitweetr)
   message('Please choose the epitweetr data directory')
   search_loop(file.choose())
}

[Package epitweetr version 0.1.28 Index]