R/AddVideoData.R
vosonSML-colon-colon-AddVideoData.actor.youtube.Rd
Youtube actor network is supplemented with additional downloaded video information. Adds video id, title, description and publish time as edge attributes. Nodes or actor references to video id's in the network are substituted with the actor id (video channel id) retrieved from the video details.
# S3 method for actor.youtube AddVideoData( net, youtubeAuth = NULL, videoIds = NULL, actorSubOnly = FALSE, ... )
net | A named list of dataframes |
---|---|
youtubeAuth | Youtube Authenticate object. |
videoIds | List. Video ID's to download video information. |
actorSubOnly | Logical. Only substitute video ID's for their publishers channel ID. Don't add additional video data to edge list. |
... | Additional parameters passed to function. |
Network as a named list of three dataframes containing $nodes
, $edges
and $videos
nodes and edges include columns for additional video data.
if (FALSE) { # replace video id references with actors and add video id, title, description and plublish time # to an actor network actorNetwork <- collectData %>% Create("actor") %>% AddVideoData(youtubeAuth) # only replace video id references with actors that published videos in network actorNetwork <- collectData %>% Create("actor") %>% AddVideoData(youtubeAuth, actorSubOnly = TRUE) # network # actorNetwork$nodes # actorNetwork$edges # dataframe of downloaded video data # actorNetwork$videos }