get_tweet_preprocess: Preprocess get_tweet function list frame

Description Usage Arguments Examples

View source: R/get_tweet_preprocess.R

Description

This function preprocess unstructured tweets list data to data frame

Usage

1
get_tweet_preprocess(list, location_country)

Arguments

list

list of tweets data from get_tweet function

location_country

your country name in lowercase

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
tweets_list <- list()
for(i in seq_len(nrow(dates))){
  tweets_list[[i]] <- get_tweets(
    q = "(#cultura OR #culture) place_country:es",
    n = 500,
    start_time = dates[i,1],
    end_time = dates[i,2],
    token = bearer_token_academic_app)
  Sys.sleep(15)
  print(paste0("Going through row ", i))
}

df_tweets <- get_tweet_preprocess(tweets_list, location_country = "spain")

BeaJJ/ComTxt documentation built on Dec. 17, 2021, 10:46 a.m.