search_loop | R Documentation |
Infinite loop ensuring the permanent collection of tweets
search_loop(data_dir = NA)
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 |
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
Nothing
set_twitter_app_auth
if(FALSE){
#Running the search loop
library(epitweetr)
message('Please choose the epitweetr data directory')
search_loop(file.choose())
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.