I have downloaded a dataset of tweets using the library academictwitteR in R. When I convert it to a csv file, and try to import to my DMI-TCAT machine, it does fine except usernames are empty.
I have posted a detailed question on StackOverflow.
The code used to download and prepare the data is:
library(academictwitteR)
#set_bearer()
require(tibble)
my_query <- build_query(c("Biden", "Trump"))
#Then, use the get_all_tweets to collect data. Make sure to specify data_path and set bind_tweets to FALSE.
tweets=get_all_tweets(
query = my_query,
start_tweets = "2016-01-16T00:00:00Z",
end_tweets = "2016-06-15T00:00:00Z",
n = 1000,
data_path = "data/",
has_mentions = TRUE,
bind_tweets = FALSE
)
ttt=bind_tweets(data_path = "data/", output_format = "tidy")
write.csv(ttt,"data-tweets.csv")
I later run the php import function using the terminal in my multipass machine:
php import-auto-csv.php data-tweets.csv elections2016
where elections2016 is a previously created bin (I noticed if I don't create it in advance the bin does not show on the capture or analysis interfaces).
The dates are also set as 0000-00-00 for all tweets, but many other fields are imported correctly.
Any help is appreciated.
I have downloaded a dataset of tweets using the library academictwitteR in R. When I convert it to a csv file, and try to import to my DMI-TCAT machine, it does fine except usernames are empty.
I have posted a detailed question on StackOverflow.
The code used to download and prepare the data is:
I later run the php import function using the terminal in my multipass machine:
php import-auto-csv.php data-tweets.csv elections2016
where elections2016 is a previously created bin (I noticed if I don't create it in advance the bin does not show on the capture or analysis interfaces).
The dates are also set as 0000-00-00 for all tweets, but many other fields are imported correctly.
Any help is appreciated.