R/AddUserData.R
vosonSML-colon-colon-AddUserData.actor.twitter.Rd
Network is supplemented with additional downloaded user information applied as actor node attributes.
# S3 method for actor.twitter AddUserData( net, data, lookupUsers = FALSE, twitterAuth = NULL, verbose = TRUE, ... )
net | A named list of dataframes |
---|---|
data | A dataframe generated by |
lookupUsers | Logical. Lookup user profile information using the twitter API for any users data missing from
the collect data set. For example fetches profile information for users that became nodes during network creation
because they were mentioned in a tweet but did not author any tweets themselves. Default is |
twitterAuth | A twitter authentication object from |
verbose | Logical. Output additional information about the network creation. Default is |
... | Additional parameters passed to function. Not used in this method. |
Network as a named list of two dataframes containing $nodes
, $edges
and
$users
. Nodes include columns for additional user data.
Using the standard twitter API this function is limited to collecting profiles of 90000 users per 15 mins before hitting the rate limit. It does not wait and retry upon hitting rate limit.
if (FALSE) { # add user info to a twitter actor network actor_net <- twitter_data %>% Create("actor") %>% AddUserData(twitter_data, lookupUsers = TRUE, twitterAuth = twitter_auth) # network names(actor_net) # "nodes", "edges" names(actor_net$nodes) # "name", "screen_name", "display_name", "location" # "description", "url", "protected", "followers_count" # "friends_count", "listed_count", "statuses_count", "favourites_count" # "account_created_at", "verified", "profile_url", "profile_expanded_url" # "account_lang", "profile_banner_url", "profile_background_url", "profile_image_url" }