View source: R/add-users-data.R
add_users_data | R Documentation |
Updates an edgelist created with create_edgelist()
by appending user
data retrieved with rtweet::lookup_users()
. The resulting dataframe
adds many additional columns and appends "_sender" or "_receiver" to the
column names.
add_users_data(edgelist)
edgelist |
An edgelist of senders and receivers, such as that returned
by the function |
This function requires authentication; please see
vignette("setup", package = "tidytags")
A dataframe in the form of an edgelist (i.e., with senders and receivers) as well as numerous, appropriately named columns of details about the senders and receivers.
Read more about rtweet authentication setup at
vignette("auth", package = "rtweet")
example_url <- "18clYlQeJOc6W5QRuSlJ6_v3snqKJImFhU42bRkM_OX8"
tags_content <- read_tags(example_url)
if (rtweet::auth_has_default()) {
tweets_data <- lookup_many_tweets(tags_content)
add_users_data(create_edgelist(tweets_data))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.