R/AddTwitterUserData.R
vosonSML-colon-colon-AddTwitterUserData.Rd
Creates a network from the relations and users dataframes generated by Create. Network is supplemented with additional downloaded twitter user information applied as node attributes.
AddTwitterUserData(collectData, networkData, lookupUsers = TRUE, twitterAuth = NULL, writeToFile = FALSE)
collectData | A dataframe containing the collected tweet data from the |
---|---|
networkData | A named list containing the relations |
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 |
writeToFile | Logical. If |
A named list containing a dataframe with user information $users
and an igraph object of the twitter
actor network with supplemental user node attributes $graph
.
Only supports twitter actor network at this time. Bimodal network support could be achieved by the filtering
of the twitter user ids from nodes of other types in the networkData
. Refer to S3 methods
Authenticate.twitter
, Collect.twitter
and Create.actor.twitter
to first
create twitter actor network and data to pass as input into this function.
# NOT RUN { # add additional twitter user profile information to actor network graph as node attributes # requires twitterAuth from Authenticate, twitterData from Collect and actorNetwork from # Create actor network actorNetWithUserAttr <- AddTwitterUserData(twitterData, actorNetwork, lookupUsers = TRUE, twitterAuth = twitterAuth, writeToFile = TRUE) # igraph object # actorNetWithUserAttr$graph # }