[{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"authenticating-with-the-twitter-api","dir":"Articles","previous_headings":"Twitter","what":"Authenticating with the Twitter API","title":"Introduction to vosonSML","text":"first step authorise access Twitter API. requires completion application approval Twitter Developer access. application approved Twitter Developer Portal become available new “Standalone App” can created. Creation app allows keys generated software vosonSML can access collect data Twitter v1.1 API. vosonSML concerned reading Twitter data, full range typical third-party app user bot functions required. ideal type authentication read-access application based authentication bearer token can generated found Authentication Tokens section developers app project Developer Portal. type token higher tweet collection rate-limits methods less permissions. bearer token Twitter authentication object can set follows: developer access token can also created using developer keys generated app. type access suited automated software bots required undertake range read write Twitter activities. developer access token required vosonSML can used desired, however lower rate-limits bearer token: also user based access method available Twitter user can permit app access API behalf. method third-party Twitter clients use allow users perform Twitter functions posting tweets software. authorizing software account user informed scope permissions granting app. method advantage per-user rather application rate-limits. method currently available used vosonSML user access app API key API secret: cases, Twitter authentication creates authentication object access token can re-used future saving disk: following loads current session previously-created authentication object:","code":"twitterAuth <- Authenticate(\"twitter\", bearerToken = \"xxxxxxxxxxxx\") twitterAuth <- Authenticate(   \"twitter\",   appName = \"My App\",   apiKey = \"xxxxxxxx\",   apiSecret = \"xxxxxxxx\",   accessToken = \"xxxxxxxx\",   accessTokenSecret = \"xxxxxxxx\" ) twitterAuth <- Authenticate(   \"twitter\",   appName = \"An App\",   apiKey = \"xxxxxxxxxxxx\",   apiSecret = \"xxxxxxxxxxxx\" ) saveRDS(twitterAuth, file = \"twitter_auth\") twitterAuth <- readRDS(\"twitter_auth\")"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"collecting-data-from-twitter","dir":"Articles","previous_headings":"Twitter","what":"Collecting Data from Twitter","title":"Introduction to vosonSML","text":"syntax collecting Twitter data follow Twitter’s rules filtering documentation. possible collect tweets including particular terms (e.g. hashtags), boolean searches (see standard search operators) also possible. collection may filtered , example, type Twitter activity (e.g. include retweets ), number collected tweets, language tweet. example, following collects 1000 recent tweets containing ‘#auspol’ hashtag (prominent hashtag Australian politics), retweets collected. Collect() function takes following arguments (used collecting Twitter data): credential (object generated Authenticate() class name “twitter”(pass via pipe), searchTerm (character string specifies Twitter search term), searchType (character string indicating filter returned tweets options ‘recent’, ‘mixed’ ‘popular’; default type ‘recent’), numTweets (numeric vector specifies many tweets collected; default 100), includeRetweets (whether search filter retweets ; default TRUE), retryOnRateLimit (whether automatically pause collection Twitter API rate limit reached, restart; default FALSE.), writeToFile (whether write returned dataframe disk .rds file; default FALSE), verbose (whether output information data collection; default FALSE). Collect() function returns tibble (enhanced dataframe features can make working data easier). can view data just collected (following modified anonymise data):","code":"twitterData <- twitterAuth |>   Collect(     searchTerm = \"#auspol\",     numTweets = 1000,     includeRetweets = FALSE,     writeToFile = TRUE,     verbose = TRUE   ) > twitterData$tweets # A tibble: 999 x 90    user_id status_id created_at          screen_name text  source    <chr>   <chr>     <dttm>              <chr>       <chr> <chr>  1 xxxxxx… xxxxxxxx… 2020-01-09 12:02:13 xxxx        \"htt… Twitt…  2 xxxxxx… xxxxxxxx… 2020-01-09 12:01:32 xxxxxxxxx   \"Fir… Twitt…  3 xxxxxx… xxxxxxxx… 2020-01-09 12:00:44 xxxxxxxxxxx \"Ser… Twitt…  [snip]  … with 989 more rows, and 84 more variables: display_text_width <dbl>, ..."},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"importing-twitter-data","dir":"Articles","previous_headings":"Twitter > Collecting Data from Twitter","what":"Importing Twitter Data","title":"Introduction to vosonSML","text":"reading previously saved writeToFile Twitter dataframe disk, simply need use readRDS function: vosonSML uses rtweet data collection can also import rtweet tweet data dataframe .RDS file using ImportRtweet():","code":"twitterData <- readRDS(\"2020-09-26_095354-TwitterData.rds\") # from dataframe tweets <- rtweet::search_tweets(\"#auspol\", n = 100) twitterData <- tweets |> ImportRtweet()  # or from file twitterData <- ImportRtweet(\"rtweet_search_n100.rds\")"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"creating-twitter-networks","dir":"Articles","previous_headings":"Twitter","what":"Creating Twitter Networks","title":"Introduction to vosonSML","text":"currently possible create four types networks using Twitter data: (1) actor network; (2) activity network; (3) 2-mode network (4) semantic network.","code":""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"actor-network","dir":"Articles","previous_headings":"Twitter > Creating Twitter Networks","what":"Actor Network","title":"Introduction to vosonSML","text":"Twitter actor network, nodes users either tweeted using target search terms (#auspol example) else mentioned replied tweets featuring search terms. Edges represent interactions Twitter users, edge attribute indicates whether interaction mention, reply, retweet, quoted retweet self-loop. Self-loop edges created two situations: (1) user authors tweet mentions replies themself; (2) user authors tweet containing search term, mention reply user tweet. Create(\"actor\") returns named list containing two dataframes named “nodes” “edges” (following modified preserve anonymity): list passed Graph(), returns igraph graph object, example, writeToFile parameter used write graph file GraphML format. following shows summary graph: Twitter actor network contains graph attribute type set “twitter” (attribute required VOSON Dashboard). following node attributes collected Twitter profile data: name (Twitter ID), screen_name (Twitter handle screen name) label (concatenation ID screen name). edge attributes : edge_type (whether edge mention, reply, retweet, quoted retweet self-loop), timestamp (tweet led creation edge authored) status_id (Twitter ID tweet). example actor network contains 1158 nodes 1725 edges. following code uses igraph functions : (1) remove edges reply edges; (2) construct subnetwork consisting giant component (largest set connected nodes); (3) plot network. often useful tweet text content network. can achieved using status_id edge attribute pull tweet text content dataframe returned Collect(), store edge attribute. vosonSML makes easy AddText() function, following example creating graph edge attribute vosonTxt_tweet stores tweet text content. Now tweet text content stored edge attribute, can use text analysis creating new node attributes. example, following creates new node attribute tweetedBushfires value “yes” Twitter user authored least one tweet containing word “bushfire” “” otherwise. following creates plots giant component reply network, red nodes indicating users tweeted using term “bushfire”. igraph graph object can saved disk GraphML file using igraph function write.graph, later imported network analysis software igraph, VOSON Dashboard Gephi: Finally, AddUserData() function can used create additional node attributes Twitter profile, example, number followers number tweets authored user. Note default, vosonSML collect Twitter profile data users authored tweets collected. , example, profile data collected (default) user mentioned tweet contained #auspol, author tweet. lookupUsers argument can used make additional Twitter API calls collect profile data mentioned users whose profile data absent, additional profile attributes can also added:","code":"actorNetwork <- twitterData |>   Create(\"actor\", writeToFile = TRUE, verbose = TRUE)  actorGraph <- actorNetwork |> Graph(writeToFile = TRUE, verbose = TRUE) > actorNetwork $edges # A tibble: 1,725 x 5    from             to              edge_type timestamp         status_id    <fct>            <fct>           <fct>     <fct>             <fct>  1 xxxxxxxx         xxxxxxxx        quote     2020-01-09 12:00… xxxxxxxxxxxx…  2 xxxxxxxx         xxxxxxxxx       quote     2020-01-09 09:37… xxxxxxxxxxxx… [snip] # … with 1,715 more rows  $nodes # A tibble: 1,158 x 2    user_id             screen_name    <fct>               <fct>  1 xxxxxxxx            xxxx  2 xxxxxxxx            xxxxxxxxx [snip] # … with 1,148 more rows  attr(,\"class\") [1] \"list\"    \"network\" \"actor\"   \"twitter\" > actorGraph IGRAPH bc177a6 DN-- 1158 1725 -- + attr: type (g/c), name (v/c), screen_name (v/c), label (v/c), | edge_type (e/c), timestamp (e/c), status_id (e/c) + edges from bc177a6 (vertex names):  [1] xxxxxxxx           ->xxxxxxxx  [2] xxxxxxxx           ->xxxxxxxxx [snip] + ... omitted several edges library(igraph)  # remove edges that are not reply edges g2 <- delete.edges(actorGraph, which(E(actorGraph)$edge_type != \"reply\"))  # get the giant component cc <- clusters(g2) g2 <- induced_subgraph(g2, which(cc$membership == which.max(cc$csize)))  # open and write plot to a png file png(\"twitter_actor_reply_gc.png\", width = 600, height = 600) plot(g2, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off() actorGraphWithText <- twitterData |>   Create(\"actor\") |> AddText(twitterData) |> Graph() # get the index of nodes or users who tweeted the word \"bushfire\" ind <- tail_of(   actorGraphWithText,   grep(\"bushfire\", tolower(E(actorGraphWithText)$vosonTxt_tweet)) )  # set node attribute V(actorGraphWithText)$tweetedBushfires <- \"no\" V(actorGraphWithText)$tweetedBushfires[ind] <- \"yes\" # remove edges that are not reply edges g3 <- delete.edges(   actorGraphWithText, which(E(actorGraphWithText)$edge_type != \"reply\") )  # get the giant component cc <- clusters(g3) g3 <- induced_subgraph(g3, which(cc$membership == which.max(cc$csize)))  # set node colour based on tweeted bushfires attribute value V(g3)$color <- ifelse(V(g3)$tweetedBushfires == \"yes\", \"red\", \"grey\")  # open and write plot to a png file png(\"twitter_actor_reply_gc_bushfires.png\", width = 600, height = 600) plot(g3, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off() # save the graph as a graphml file write.graph(g3, \"twitter_reply_gc_bushfires.graphml\", format = \"graphml\") # create an actor network with user metadata actorGraphWithUserAttr <- actorNetwork |>   AddUserData(twitterData, lookupUsers = TRUE, twitterAuth = twitterAuth) |>   Graph(writeToFile = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"activity-network","dir":"Articles","previous_headings":"Twitter > Creating Twitter Networks","what":"Activity Network","title":"Introduction to vosonSML","text":"Twitter activity network, nodes represent tweets edge types : replies, retweets quoted retweets. Create(\"activity\") returns named list containing two dataframes named “nodes” “edges” (following modified preserve anonymity): Note , AddText() used add comment text data network dataframe, stored node attribute. list passed Graph(), returns igraph graph object (following anonymised): Twitter activity network contains graph attribute type (set “twitter”). node attributes : name (Twitter ID tweet), user_id (Twitter ID user authored tweet), screen_name (Twitter handle screen name user authored tweet), created_at (timestamp tweet authored), vosonTxt_tweet (text content tweet) label (concatenation name user_id). edge attribute edge_type can value ‘reply’, ‘retweet’ ‘quote’. example Twitter activity network contains 1408 nodes 662 edges. following visualization network, nodes tweets tweets mentioning bushfires indicated red. noted limitation Twitter API retweet chains provided. means user tweeted original tweet, user j retweeted tweet, user k retweeted j’s retweet, activity network show edges connecting two retweets original tweet.","code":"# create an activity network with tweet text activityNetwork <- twitterData |> Create(\"activity\") |> AddText(twitterData) activityGraph <- activityNetwork |> Graph(writeToFile = TRUE) > activityNetwork $nodes # A tibble: 1,408 x 5    status_id    user_id    screen_name created_at   vosonTxt_tweet    <chr>        <chr>      <chr>       <chr>        <chr>  1 xxxxxxxxxxx… xxxxxxxx   xxxx        2020-01-09 … \"xxxxxxxxxxxxxxxxxxxxx…  2 xxxxxxxxxxx… xxxxxxxx   xxxxxxxxx   2020-01-09 … \"xxxxxxxxxxxxxxxxxxxxx…  [snip]  # … with 1,398 more rows  $edges # A tibble: 662 x 3    from                to                  edge_type    <chr>               <chr>               <chr>  1 xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx quote  2 xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxx quote [snip] # … with 652 more rows  attr(,\"class\") [1] \"list\"       \"network\"    \"activity\"   \"twitter\"    \"voson_text\" > activityGraph IGRAPH e60c486 DN-- 1408 662 -- + attr: type (g/c), name (v/c), user_id (v/c), screen_name (v/c), | created_at (v/c), vosonTxt_tweet (v/c), label (v/c), edge_type (e/c) + edges from e60c486 (vertex names):  [1] xxxx->xxxx  [2] xxxx->xxxx [snip] + ... omitted several edges # create a subgraph containing nodes of components that have more than 5 nodes cc <- clusters(activityGraph) g4 <- induced_subgraph(   activityGraph,   which(cc$membership %in% which(cc$csize > 5)) )  # set node colour based on if tweet contains the word \"bushfire\" ind <- grep(\"bushfire\", tolower(V(g4)$vosonTxt_tweet)) V(g4)$color <- \"grey\" V(g4)$color[ind] <- \"red\"  # open and write plot to a png file png(\"twitter_activity.png\", width = 600, height = 600) plot(g4, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off()"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"mode-network","dir":"Articles","previous_headings":"Twitter > Creating Twitter Networks","what":"2-mode Network","title":"Introduction to vosonSML","text":"Twitter 2-mode network, two types nodes actors (Twitter users) hashtags. edge user hashtag j user authored tweet containing hashtag j. Create(\"twomode\") returns named list containing two dataframes named “nodes” “edges” (following modified preserve anonymity). Note example, removeTermsOrHashtags argument used exclude ‘#auspol’, since construction tweets contained hashtag. list passed Graph(), returns igraph graph object (anonymised): Twitter 2-model network graph attribute type (set “twitter”). node attributes : name (hashtag Twitter user ID), display_name (hashtag Twitter handle screen name), label (users, concatenation name display_name, hashtags name). edge attributes : edge_type (‘hashtag’), timestamp (timestamp tweet led edge), status_id (Twitter ID tweet led edge).","code":"# create a 2-mode network with the hashtag \"#auspol\" removed twomodeNetwork <- twitterData |>   Create(\"twomode\", removeTermsOrHashtags = c(\"#auspol\")) twomodeGraph <- twomodeNetwork |> Graph() > twomodeNetwork $nodes # A tibble: 1,146 x 2    entity_id                    display_name    <chr>                        <chr>  1 xxxxxxxx                     xxxx  2 xxxxxxxx                     xxxxxxxxx  3 #auspol2020                  #auspol2020  4 #australianbushfiredisaster  #australianbushfiredisaster [snip] # … with 1,136 more rows  $edges # A tibble: 1,675 x 5    from      to                      edge_type timestamp        status_id    <fct>     <fct>                   <fct>     <fct>            <fct>  1 xxxxxxxx  #auspol2020             hashtag   2020-01-09 12:0… xxxxxxxxxxxx…  2 xxxxxxxx  #australianbushfiredis… hashtag   2020-01-09 12:0… xxxxxxxxxxxx… [snip] # … with 1,665 more rows  attr(,\"class\") [1] \"list\"    \"network\" \"twomode\" \"twitter\" > twomodeGraph IGRAPH 68bd240 DN-- 1146 1675 -- + attr: type (g/c), name (v/c), display_name (v/c), label (v/c), | edge_type (e/c), timestamp (e/c), status_id (e/c) + edges from 68bd240 (vertex names):  [1] xxxx -> #auspol2020  [2] xxxx -> #australianbushfiredisaster [snip] + ... omitted several edges # get index of nodes that are in the top 5 by highest in-degree # this is the top 5 used hashtags, as all users have 0 in-degree # in this network ind <- order(degree(twomodeGraph, mode = \"in\"), decreasing = TRUE)[1:5]  # get index of nodes with an edge directed to the top 5 hashtags # this is users who have tweeted with these hashtags ind2 <- unlist(   lapply(ind, function(x) neighbors(twomodeGraph, x, mode = \"in\")) )  # create a subgraph containing only the top 5 used hashtags and related users g5 <- induced_subgraph(twomodeGraph, c(ind, as.numeric(ind2)))  # set node colour and label based on in-degree # only hashtag nodes are set to blue and with label attribute set V(g5)$color <- \"grey\" V(g5)$color[which(degree(g5, mode = \"in\") > 0)] <- \"blue\" V(g5)$label2 <- ifelse(degree(g5, mode = \"in\") > 0, V(g5)$label, \"\")  # open and write plot to a png file png(\"twitter_twomode.png\", width = 600, height = 600) plot(g5, vertex.label = V(g5)$label2, vertex.size = 4, edge.arrow.size = 0.5,      vertex.label.cex = 1.8, vertex.label.color = \"red\") dev.off()"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"semantic-network","dir":"Articles","previous_headings":"Twitter > Creating Twitter Networks","what":"Semantic Network","title":"Introduction to vosonSML","text":"Twitter semantic network, nodes represent entities extracted tweet text: common words, hashtags usernames. Edges reflect co-occurrence .e. edge entities j occurred tweet. Create(\"semantic\") returns named list containing two dataframes named “nodes” “edges”: removeTermsOrHashtags argument used exclude terms can expect occur frequently (e.g. parameters used data collection). termFreq parameter used limit network top 5 percent frequently occurring entities. list passed Graph(), returns igraph graph object: Twitter semantic network node contains graph attribute type (set “twitter”). node attributes : name (entity .e. hashtag word), label (name). edge attribute weight (many tweets two entities co-occurred ). example Twitter semantic network 799 nodes 10990 edges. following produces visualisation subnetwork terms contain string “bushfire”:","code":"# additional required packages for tokenization install.packages(\"stopwords\")  # create a semantic network with some common terms removed # include only the top 5% occurring terms in the network semanticNetwork <- twitterData |> Create(    \"semantic\",    removeTermsOrHashtags = c(\"#auspol\", \"auspol\", \"australia\"),    termFreq = 5 )  # create an undirected graph semanticGraph <- semanticNetwork |> Graph(directed = FALSE) > semanticNetwork $nodes # A tibble: 799 x 1    value    <fct>  1 just  2 one  3 fire  4 going  5 still  6 hard  7 trying  8 since  9 try 10 sick # … with 789 more rows  $edges # A tibble: 10,990 x 3    from        to                           weight    <fct>       <fct>                         <int>  1 #auspol2020 #australianbushfiredisaster       2  2 #auspol2020 government                        2  3 #auspol2020 fire                              4  4 #auspol2020 australian                        2  5 #auspol2020 bushfire                          2  6 #auspol2020 fires                             4  7 #auspol2020 #australiafires                   1  8 #auspol2020 #australianbushfiresdisaster      1  9 #auspol2020 #australia                        4 10 #auspol2020 bushfires                         2 # … with 10,980 more rows  attr(,\"class\") [1] \"list\"     \"network\"  \"semantic\" \"twitter\" > semanticGraph IGRAPH cb8c381 UNW- 799 10990 -- + attr: type (g/c), name (v/c), label (v/c), weight (e/n) + edges from cb8c381 (vertex names):  [1] #australianbushfiredisaster --#auspol2020  [2] government                  --#auspol2020  [3] fire                        --#auspol2020  [4] australian                  --#auspol2020  [5] bushfire                    --#auspol2020  [6] fires                       --#auspol2020  [7] #australiafires             --#auspol2020  [8] #australianbushfiresdisaster--#auspol2020 + ... omitted several edges # get index of the nodes whose term contains \"bushfire\" ind <- grep(\"bushfire\", tolower(V(semanticGraph)$name))  # create a subgraph containing only bushfire terms g6 <- induced_subgraph(semanticGraph, ind)  # open and write plot to a png file # plotted with large-graph-layout algorithm and edge weights png(\"twitter_semantic.png\", width = 600, height = 600) plot(g6, layout = layout_with_lgl(g6), vertex.shape = \"none\", vertex.size = 4,      edge.width = 1 + log(E(g2)$weight)) dev.off()"},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"authenticating-with-the-youtube-api","dir":"Articles","previous_headings":"YouTube","what":"Authenticating with the YouTube API","title":"Introduction to vosonSML","text":"collect YouTube data, necessary first create Google app access YouTube Data API via Google APIs console generate associated API key. following shows creation YouTube access token passing Google developer API key Autnenticate() function: Twitter example , YouTube access token can optionally saved disk use later session.","code":"# create auth object with api key youtubeAuth <- Authenticate(\"youtube\", apiKey = \"xxxxxxxx\")"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"collecting-data-from-youtube","dir":"Articles","previous_headings":"YouTube","what":"Collecting Data from YouTube","title":"Introduction to vosonSML","text":"YouTube video IDs (part “=” YouTube URL) required order collect YouTube comment data. IDs can either manually provided automatically extracted URLs: character vector containing YouTube video IDs URLs passed parameter Collect() function (following code also shows YouTube access token piped Collect()). following example, collecting comments YouTube video titled “Australia bushfires - national catastrophe | DW News”, uploaded German Deutsche Welle news service 5th January 2020. comment data collected 10th January 2020: total number comments time 1100, using maxComments parameter collect maximum 500 top-level comments (reply comments top-level comments). Collect() function takes following arguments (used collecting YouTube data): credential (object generated Authenticate() class name “youtube” (pass via pipe), videoIDs (character vector specifying one youtube video IDs), maxComments (numeric integer specifying many top-level comments collect video), writeToFile (whether write returned dataframe disk .rds file; default FALSE), verbose (whether output information data collection; default FALSE). Collect() returns R dataframe following structure (data modified preserve anonymity):","code":"videoIDs <- c(   \"xxxxxx\",   \"https://www.youtube.com/watch?v=xxxxxxxx\",   \"https://youtu.be/xxxxxxxx\") ) videoID <- \"https://www.youtube.com/watch?v=pJ_NyEYRkLQ\" youtubeData <- youtubeAuth |>   Collect(videoID, maxComments = 500, writeToFile = TRUE) > str(youtubeData) Classes ‘dataource’, ‘youtube’ and 'data.frame':    603 obs. of  12 variables:  $ Comment              : chr  \"xxxxx\"  $ AuthorDisplayName    : chr  \"xx\" \"xx\" \"xx\" \"xx\"  $ AuthorProfileImageUrl: chr  \"https://xx\" \"https://xx\" \"https://xx\"  $ AuthorChannelUrl     : chr  \"http://xx\" \"http://xx\" \"http://xx\" \"http://xx\"  $ AuthorChannelID      : chr  \"xx\" \"xx\" \"xx\" \"xx\"  $ ReplyCount           : chr  \"0\" \"0\" \"0\" \"0\"  $ LikeCount            : chr  \"0\" \"0\" \"0\" \"0\"  $ PublishedAt          : chr  \"2020-01-10T02:23:43\" \"2020-01-09T20:56:23\"                                \"2020-01-09T20:44:00\" \"2020-01-09T19:31:32\"   $ UpdatedAt            : chr  \"2020-01-10T02:23:43\" \"2020-01-09T20:56:23\"                                \"2020-01-09T20:44:00\" \"2020-01-09T19:31:32\"  $ CommentID            : chr  \"xx\" \"xx\" \"xx\" \"xx\"  $ ParentID             : chr  NA NA NA NA  $ VideoID              : chr  \"pJ_NyLQ\" \"pJ_NyLQ\" \"pJ_NyLQ\" \"pJ_NyLQ\""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"importing-saved-collection-data-from-file","dir":"Articles","previous_headings":"YouTube > Collecting Data from YouTube","what":"Importing saved collection data from file","title":"Introduction to vosonSML","text":"reading previously saved writeToFile YouTube dataframe disk, simply need use readRDS function:","code":"# read dataframe from file youtubeData <- readRDS(\"2020-09-26_095354-YoutubeData.rds\")"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"creating-youtube-networks","dir":"Articles","previous_headings":"YouTube","what":"Creating YouTube Networks","title":"Introduction to vosonSML","text":"currently possible create two types networks using YouTube data: (1) actor network (2) activity network.","code":""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"actor-network-1","dir":"Articles","previous_headings":"YouTube > Creating YouTube Networks","what":"Actor Network","title":"Introduction to vosonSML","text":"YouTube actor network nodes users commented videos (videos included network special nodes) edges interactions users comments. can distinguish top-level comment, comment directed video reply comment, comment directed top-level comment. YouTube user interface allow user direct reply another reply. However, users can achieve “reply reply” functionality starting comment username person replying (often prepend username “@”). edge user user j replied top-level comment authored j else prepended comment j’s username. Create(\"actor\") returns named list containing two dataframes named “nodes” “edges” (following modified preserve anonymity): Note , AddText() used add comment text data network dataframe, stored edge attribute. Also, note optional parameter replies_from_text can passed AddText() used YouTube network creation, extract “reply reply” comments. list passed Graph(), returns igraph graph object. Remember possible achieve using single line code: following annonymised summary igraph graph object. YouTube actor network node contains graph attribute type (set “youtube”). node attributes : name (Channel ID, YouTube’s unique user ID), screen_name (users displayed name), node_type (‘actor’ ‘video’) label (concatenation ID screen name). edge attributes : video_id (ID video data collected), comment_id (ID comment), edge_type (whether edge ‘comment’ .e. top-level comment, ‘reply-comment’ .e. reply top-level comment reply reply ‘self-loop’, special edge connecting video , means including text posted video). example, earlier use AddText(), also edge attribute vosonTxt_comment text associated comment, reply video. example YouTube actor network contains 522 nodes 604 edges. following indicates 500 top-level comments (constrained collection number), 103 replies top-level comments (note: use AddText() collect replies embedded within text), single self-loop video . can visualize network, using red identify video nodes. following creates sub-network containing replies top-level comments. removing edges (top-level comments self-loop) create number isolate nodes (nodes connections) also remove. also used red indicate people written comments containing particular terms present online commentary bushfires. Finally, AddVideoData() function supplements network data additional video information. AddVideoData() returns named list containing three dataframes named “nodes” (identical dataframe contained list actorNetwork example able), “edges” (three additional columns: “video_title”, “video_description”, “video_published_at”) new dataframe “videos” (following modified preserve anonymity): also noted AddVideoData() can optionally substitute references video ID “nodes” “edges” dataframes video publishers channel ID (done setting parameter actorSubOnly TRUE.","code":"actorNetwork <- youtubeData |> Create(\"actor\") |> AddText(youtubeData) actorGraph <- actorNetwork |> Graph(writeToFile = TRUE) > actorNetwork $nodes # A tibble: 522 x 3    id                       screen_name                         node_type    <chr>                    <chr>                               <chr>  1 xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx                      actor  2 xxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx                       actor [snip] # … with 512 more rows  $edges # A tibble: 604 x 6    from      to       video_id comment_id   edge_type vosonTxt_comment    <chr>     <chr>    <chr>    <chr>        <chr>     <chr>  1 xxxxxxxx… VIDEOID… pJ_NyEY… xxxxxxxxxxx… comment   \"xxxxx\"  2 xxxxxxxx… VIDEOID… pJ_NyEY… xxxxxxxxxxx… comment   \"xxxxx\" [snip] # … with 594 more rows  attr(,\"class\") [1] \"list\"       \"network\"    \"actor\"      \"youtube\"    \"voson_text\" actorGraph <- youtubeData |> Create(\"actor\") |> AddText(youtubeData) |> Graph() > actorGraph IGRAPH 79e5456 DN-- 522 604 -- + attr: type (g/c), name (v/c), screen_name (v/c), node_type (v/c), | label (v/c), video_id (e/c), comment_id (e/c), edge_type (e/c), | vosonTxt_comment (e/c) + edges from 79e5456 (vertex names): [1] xxxx->VIDEOID:pJ_NyEYRkLQ [2] xxxx->VIDEOID:pJ_NyEYRkLQ [snip] + ... omitted several edges > table(E(actorGraph)$edge_type)    comment reply-comment     self-loop        500           103             1 # change color of nodes with type video to red and others grey V(actorGraph)$color <- ifelse(   V(actorGraph)$node_type == \"video\", \"red\", \"grey\" )  # open and write plot to a png file png(\"youtube_actor.png\", width = 600, height = 600) plot(actorGraph, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off() # removed edges that are not of type reply-comment g2 <- delete.edges(   actorGraph, which(E(actorGraph)$edge_type != \"reply-comment\") )  # check number of isolates > length(which(degree(g2) == 0)) [1] 417  # remove isolates g2 <- delete.vertices(g2, which(degree(g2) == 0))  # get node indexes for the tails of edges that have comments containing # words of interest change the indexed node colors to red and others grey V(g2)$color <- \"grey\" ind <- tail_of(   actorGraph,   grep(\"arson|backburn|climate change\", tolower(E(g2)$vosonTxt_comment)) ) V(g2)$color[ind] <- \"red\"  # open and write plot to a png file png(\"youtube_actor_reply.png\", width = 600, height = 600) plot(g2, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off() actorNetwork_withVideoInfo <- actorNetwork |> AddVideoData(youtubeAuth) > actorNetwork_withVideoInfo $nodes # A tibble: 522 x 3    id                       screen_name                         node_type    <chr>                    <chr>                               <chr>  1 xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx                       actor  2 xxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxx                       actor [snip] # … with 512 more rows  $edges # A tibble: 604 x 9    from  to    video_id comment_id edge_type vosonTxt_comment video_title    <chr> <chr> <chr>    <chr>      <chr>     <chr>            <chr>  1 xxxx… xxxx… pJ_NyEY… xxxxxxxxx… comment   xxxxxxxxxxxx … Australia …  2 xxxx… xxxx… pJ_NyEY… xxxxxxxxx… comment   \"xxxx\"         Australia … [snip] # … with 594 more rows, and 2 more variables: video_description <chr>, #   video_published_at <chr>  $videos # A tibble: 1 x 6  VideoID  VideoTitle  VideoDescription VideoPublishedAt ChannelID ChannelTitle  <chr>    <chr>       <chr>            <chr>            <chr>     <chr> 1 pJ_NyEY… Australia … \"As Australia ba… 2020-01-05T12:3… UCknLrEd… DW News  attr(,\"class\") [1] \"list\"             \"network\"          \"actor\"            \"youtube\" [5] \"voson_text\"       \"voson_video_data\""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"activity-network-1","dir":"Articles","previous_headings":"YouTube > Creating YouTube Networks","what":"Activity Network","title":"Introduction to vosonSML","text":"YouTube activity network, nodes either comments videos (videos represent starting comment). Create(\"activity\") returns named list containing two dataframes named “nodes” “edges” (following modified preserve anonymity). Note , AddText() used add comment text data network dataframe, stored node attribute. list passed Graph(), returns igraph graph object (anonymised). YouTube activity network contains graph attribute type (set “youtube”). node attributes : name (character string ID number comment video), video_id (character string ID video comments collected - example, “pJ_NyEYRkLQ”), published_at (timestamp comment published, NA video ), updated_at (timestamp comment updated), author_id (user’s Channel ID), screen_name (user’s display name), node_type (whether node ‘comment’ .e. top-level comment, ‘reply-comment’ .e. reply top-level comment reply reply ‘video’), vosonText_comment (comment text, NA video), label (concatenation name screen_name). edge attributes edge_type ‘comment’ edges connecting top-level comment video, ‘reply-comment’ edges. example YouTube activity network contains 604 nodes 603 edges. following igraph visualization network, video indicated red node, blue indicates comments include one following terms: “arson”, “bakcburn”, “climate change”.","code":"activityNetwork <- youtubeData |> Create(\"activity\") |> AddText(youtubeData) activityGraph <- activityNetwork |> Graph() > activityNetwork $edges # A tibble: 603 x 3    from                       to                  edge_type    <chr>                      <chr>               <chr>  1 xxxxxxxxxxxxxxxxxxxxxxxxxx VIDEOID:pJ_NyEYRkLQ comment  2 xxxxxxxxxxxxxxxxxxxxxxxxxx VIDEOID:pJ_NyEYRkLQ comment [snip] # … with 593 more rows  $nodes # A tibble: 604 x 8    id    video_id published_at updated_at author_id screen_name node_type    <chr> <chr>    <chr>        <chr>      <chr>     <chr>       <chr>  1 xxxx… pJ_NyEY… 2020-01-10T… 2020-01-1… xxxxxxxx… xxxxxxxxxx… comment  2 xxxx… pJ_NyEY… 2020-01-09T… 2020-01-0… xxxxxxxx… xxxxxxxxxx… comment [snip] # … with 594 more rows, and 1 more variable: vosonTxt_comment <chr>  attr(,\"class\") [1] \"list\"       \"network\"    \"activity\"   \"youtube\"    \"voson_text\" IGRAPH 02664d1 DN-- 604 603 -- + attr: type (g/c), name (v/c), video_id (v/c), published_at (v/c), | updated_at (v/c), author_id (v/c), screen_name (v/c), node_type | (v/c), vosonTxt_comment (v/c), label (v/c), edge_type (e/c) + edges from 02664d1 (vertex names): [1] xxxx->VIDEOID:pJ_NyEYRkLQ [2] xxxx->VIDEOID:pJ_NyEYRkLQ [3] xxxx->VIDEOID:pJ_NyEYRkLQ [4] xxxx->VIDEOID:pJ_NyEYRkLQ [5] xxxx->VIDEOID:pJ_NyEYRkLQ [6] xxxx->VIDEOID:pJ_NyEYRkLQ + ... omitted several edges # set all video node colors to red and others to grey V(activityGraph)$color <- \"grey\" V(activityGraph)$color[which(V(activityGraph)$node_type == \"video\")] <- \"red\"  # get node indexes of comments that contain terms of interest # set their node colors to blue ind <- grep(   \"arson|backburn|climate change\", tolower(V(activityGraph)$vosonTxt_comment) ) V(activityGraph)$color[ind] <- \"blue\"  # open and write plot to a png file png(\"youtube_activity.png\", width = 600, height = 600) plot(activityGraph, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off()"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"reddit","dir":"Articles","previous_headings":"","what":"Reddit","title":"Introduction to vosonSML","text":"Reddit collection vosonSML based approach used RedditExtractoR package.","code":""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"authenticating-with-the-reddit-api","dir":"Articles","previous_headings":"Reddit","what":"Authenticating with the Reddit API","title":"Introduction to vosonSML","text":"vosonSML require Reddit API credentials provided. However, keep workflow consistent data sources, still need create “dummy” access token, using Authenticate() function (see ).","code":""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"collecting-data-from-reddit","dir":"Articles","previous_headings":"Reddit","what":"Collecting Data from Reddit","title":"Introduction to vosonSML","text":"collect Reddit comment data, first construct character vector containing post URL(s). character vector passed argument Collect() function. example , post relating politics around Australian bushfires used: https://www.reddit.com/r/worldnews/comments/elcb9b/australias_leaders_deny_link_between_climate/. post created 7th January 2020 time data collection (10th January), attracted 4000 comments. maximum number comments available retrieval 500 per thread post. Reddit implemented feature latest site re-design branch new threads, thread reaches breadth (diameter) 10 comments. appear ‘Continue thread’ links thread discussions reddit site, new listing markers within collected thread data. vosonSML follows links additional thread requests collects comments well, capturing complete data set, limit 500 comments applies ‘new’ thread. Collect() function takes following arguments (used collecting Reddit data): credential (object generated Authenticate() class name “reddit” (pass via pipe), threadUrls (character vector Reddit thread urls), waitTime (numeric vector giving time range seconds select random wait url collection requests; default c(3, 10) .e. random wait 3 10 seconds), ua (User-Agent string; default option(\"HTTPUserAgent\") set vosonSML, writeToFile (whether write returned dataframe file .rds file; default FALSE), verbose (whether output information data collection; default TRUE). Collect() function returns tibble dataframe (output anonymised):","code":"myThreadUrls <- c(   \"https://www.reddit.com/r/xxxxxx/comments/xxxxxx/x_xxxx_xxxxxxxxx/\",   \"https://www.reddit.com/r/xxxxxx/comments/xxxxxx/x_xxxx_xxxxxxxxx/\" ) myThreadUrls <- \"https://www.reddit.com/r/worldnews/comments/elcb9b/australias_leaders_deny_link_between_climate/\" redditData <- Authenticate(\"reddit\") |>               Collect(threadUrls = myThreadUrls, writeToFile = TRUE) > str(redditData) Classes ‘tbl_df’, ‘tbl’, ‘datasource’, ‘reddit’ and 'data.frame':      767 obs. of  22 variables:  $ id              : int  1 2 3 4 5 6 7 8 9 10 ...  $ structure       : chr  \"1\" \"4_1_1_1_1_1_1_1_1_1\" \"4_1_1_4_2_1_1_1_1_1\" ...  $ post_date       : chr  \"2020-01-07 14:34:58\" \"2020-01-07 14:34:58\" ...  $ post_date_unix  : num  1.58e+09 1.58e+09 1.58e+09 1.58e+09 1.58e+09 ...  $ comm_id         : chr  \"xxxx\" \"xxxx\" \"xxxx\" \"xxxx\" ...  $ comm_date       : chr  \"2020-01-07 19:11:10\" \"2020-01-07 21:04:05\" ...  $ comm_date_unix  : num  1.58e+09 1.58e+09 1.58e+09 1.58e+09 1.58e+09 ...  $ num_comments    : int  4435 4435 4435 4435 4435 4435 4435 4435 4435 4435 ...  $ subreddit       : chr  \"worldnews\" \"worldnews\" \"worldnews\" \"worldnews\" ...  $ upvote_prop     : num  0.91 0.91 0.91 0.91 0.91 0.91 0.91 0.91 0.91 0.91 ...  $ post_score      : int  45714 45714 45714 45712 45714 45710 45720 45712 ..  $ author          : chr  \"xxxx\" \"xxxx\" \"xxxx\" \"xxxx\" ...  $ user            : chr  \"xxxx\" \"xxxx\" \"xxxx\" \"xxxx\" ...  $ comment_score   : int  1904 136 17 13 9 9 125 4 6 12 ...  $ controversiality: int  0 0 0 0 0 0 0 0 0 0 ...  $ comment         : chr  \"xxxx...  $ title           : chr  \"Australia’s leaders deny link between climate change and the country’s devastating bushfires\" \"Australia’s leaders deny link between climate change and the country’s devastating bushfires\" \"Australia’s leaders deny link between climate change and the country’s devastating bushfires\" \"Australia’s leaders deny link between climate change and the country’s devastating bushfires\" ...  $ post_text       : chr  \"\" \"\" \"\" \"\" ...  $ link            : chr  \"https://www.theglobeandmail.com/world/article-australias-leaders-unmoved-on-climate-action-after-devastating-2/\" \"https://www.theglobeandmail.com/world/article-australias-leaders-unmoved-on-climate-action-after-devastating-2/\" \"https://www.theglobeandmail.com/world/article-australias-leaders-unmoved-on-climate-action-after-devastating-2/\" \"https://www.theglobeandmail.com/world/article-australias-leaders-unmoved-on-climate-action-after-devastating-2/\" ...  $ domain          : chr  \"theglobeandmail.com\" \"theglobeandmail.com\" \"theglobeandmail.com\" \"theglobeandmail.com\" ...  $ url             : chr  \"https://www.reddit.com/r/worldnews/comments/elcb9b/australias_leaders_deny_link_between_climate/\" \"https://www.reddit.com/r/worldnews/comments/elcb9b/australias_leaders_deny_link_between_climate/\" \"https://www.reddit.com/r/worldnews/comments/elcb9b/australias_leaders_deny_link_between_climate/\" \"https://www.reddit.com/r/worldnews/comments/elcb9b/australias_leaders_deny_link_between_climate/\" ...  $ thread_id       : chr  \"elcb9b\" \"elcb9b\" \"elcb9b\" \"elcb9b\" ..."},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"importing-saved-collection-data-from-file-1","dir":"Articles","previous_headings":"Reddit > Collecting Data from Reddit","what":"Importing saved collection data from file","title":"Introduction to vosonSML","text":"reading previously saved writeToFile Reddit dataframe disk, simply need use readRDS function.","code":"redditData <- readRDS(\"2020-09-26_095354-RedditData.rds\")"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"creating-reddit-networks","dir":"Articles","previous_headings":"Reddit","what":"Creating Reddit Networks","title":"Introduction to vosonSML","text":"currently possible create two types networks using Reddit data: (1) actor network (2) activity network.","code":""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"actor-network-2","dir":"Articles","previous_headings":"Reddit > Creating Reddit Networks","what":"Actor Network","title":"Introduction to vosonSML","text":"Reddit actor network, nodes represent users posted original posts comments edges interactions users comments .e. edge user user j writes comment replies user j’s comment (original post). following creates Reddit actor network comment text edge attribute (, can achieved single line code, split two lines better explain objects created). Create(\"actor\") returns named list containing two dataframes named “nodes” “edges” (following modified preserve anonymity): Note , AddText() used add comment text data network dataframe, stored edge attribute. list passed Graph(), returns igraph graph object. Reddit actor network contains graph attribute type (set “reddit”). node attributes : name (sequential ID number actor, generated vosonSML), user (Reddit handle screen name)) label (concatenation ID screen name). edge attributes : subreddit (subreddit post collected), thread_id (6 character ID thread post), comment_id (sequential ID number comment, generated vosonSML). also edge attribute title, set NA comments except comment representing original post. note original post represented self-loop edge user authored post (post text can accessed, edge attribute), however Reddit actor network, edge_type attribute. Finally, used AddText() example, also edge attribute vosonTxt_comment text associated comment, original post. example Reddit actor network contains 439 nodes 768 edges. following visualization actor network, author post indicated red node, blue nodes indicate people mentioned “arson” “starting fires” least one comments.","code":"actorNetwork <- redditData |> Create(\"actor\") |> AddText(redditData) actorGraph <- actorNetwork |> Graph(writeToFile = TRUE) > actorNetwork $nodes # A tibble: 439 x 2       id user    <int> <chr>  1     1 xxxxxxxxxx  2     2 xxxxxxxxxxxxxx [snip] # … with 429 more rows  $edges # A tibble: 768 x 8     from    to subreddit thread_id comment_id comm_id vosonTxt_comment   title    <int> <int> <chr>     <chr>        <dbl> <chr>   <chr>                <chr>  1     1   439 worldnews elcb9b           1 xxxxxxx \"xxxxxxxxxxxxxxxxxxx NA  2     2    73 worldnews elcb9b           2 xxxxxxx \"xxxxxxxxxxxxxxxxxxx NA [snip] … with 758 more rows  attr(,\"class\") [1] \"list\"       \"network\"    \"actor\"      \"reddit\"     \"voson_text\" > actorGraph IGRAPH 5a5d5b9 DN-- 439 768 -- + attr: type (g/c), name (v/c), user (v/c), label (v/c), subreddit | (e/c), thread_id (e/c), comment_id (e/n), comm_id (e/c), | vosonTxt_comment (e/c), title (e/c) + edges from 5a5d5b9 (vertex names):  [1] 1 ->439 2 ->73  3 ->113 4 ->120 5 ->120 6 ->17  7 ->194 8 ->20  9 ->20 [10] 10->165 11->165 12->1   13->2   14->3   15->4   16->5   17->6   18->7 [19] 19->8   20->9   21->10  22->11  23->12  2 ->13  24->3   7 ->18  25->23 [28] 26->2   3 ->24  27->18  28->1   29->2   18->27  1 ->28  30->2   31->7 [37] 25->1   32->2   33->31  34->1   2 ->32  35->7   25->34  36->2   7 ->35 [46] 37->1   38->2   39->7   40->1   41->2   42->7   43->1   2 ->41  44->7 + ... omitted several edges # set node color of original post to red based on presence of title edge # attribute set other node colors to grey V(actorGraph)$color <- \"grey\" V(actorGraph)$color[tail_of(   actorGraph, which(!is.na(E(actorGraph)$title)) )] <- \"red\"  # get node indexes for the tails of edges that have comments containing # words of interest set their node colors to blue ind <- tail_of(   actorGraph,   grep(\"arson|starting fires\",        tolower(E(actorGraph)$vosonTxt_comment)) ) V(actorGraph)$color[ind] <- \"blue\"  # open and write plot to a png file png(\"reddit_actor.png\", width = 600, height = 600) plot(actorGraph, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off()"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"activity-network-2","dir":"Articles","previous_headings":"Reddit > Creating Reddit Networks","what":"Activity Network","title":"Introduction to vosonSML","text":"Reddit activity network, nodes either comments /initial thread posts edges represent replies original post, replies comments. Create(\"activity\") returns named list containing two dataframes named “nodes” “edges” (following modified preserve anonymity): Note , AddText() used add comment text data network dataframe, stored node attribute. list passed Graph(), returns igraph graph object. Reddit activity network contains graph attribute type (set “reddit”). node attributes : name (string showing position comment thread), date (date comment authored, DD-MM-YY format), subreddit (subreddit post collected), user (Reddit handle screen name user authored comment post), node_type (‘comment’ ‘thread’), title (NA nodes except representing original post), label (concatenation name user). used AddText() example, also node attribute vosonTxt_comment text comment, original post. edge attributes edge_type ‘comment’ edges. example Reddit activity network contains 768 nodes 767 edges. following visualisation network, post indicated red node, blue indicates comments include words “arson” “starting fires”.","code":"activityNetwork <- redditData |> Create(\"activity\") |> AddText(redditData) activityGraph <- activityNetwork |> Graph(writeToFile = TRUE) > activityNetwork $nodes # A tibble: 768 x 10    id    thread_id comm_id datetime     ts subreddit user  node_type    <chr> <chr>     <chr>   <chr>     <dbl> <chr>     <chr> <chr>  1 elcb… elcb9b    xxxxxxx 2020-01… 1.58e9 worldnews xxxx… comment  2 elcb… elcb9b    xxxxxxx 2020-01… 1.58e9 worldnews xxxx… comment [snip] # … with 758 more rows, and 2 more variables: vosonTxt_comment <chr>, #   title <chr>  $edges # A tibble: 767 x 3    from                       to                       edge_type    <chr>                      <chr>                    <chr>  1 elcb9b.1                   elcb9b.0                 comment  2 elcb9b.4_1_1_1_1_1_1_1_1_1 elcb9b.4_1_1_1_1_1_1_1_1 comment [snip] # … with 757 more rows  attr(,\"class\") [1] \"list\"       \"network\"    \"activity\"   \"reddit\"     \"voson_text\" > activityGraph IGRAPH 09e30ea DN-- 768 767 -- + attr: type (g/c), name (v/c), thread_id (v/c), comm_id (v/c), | datetime (v/c), ts (v/n), subreddit (v/c), user (v/c), node_type | (v/c), vosonTxt_comment (v/c), title (v/c), label (v/c), edge_type | (e/c) + edges from 09e30ea (vertex names): [1] elcb9b.1                  ->elcb9b.0 [2] elcb9b.4_1_1_1_1_1_1_1_1_1->elcb9b.4_1_1_1_1_1_1_1_1 [3] elcb9b.4_1_1_4_2_1_1_1_1_1->elcb9b.4_1_1_4_2_1_1_1_1 [4] elcb9b.4_1_1_4_3_1_1_1_3_1->elcb9b.4_1_1_4_3_1_1_1_3 [5] elcb9b.4_1_1_4_3_1_1_1_3_2->elcb9b.4_1_1_4_3_1_1_1_3 + ... omitted several edges # set original post node colors to red based on a node type of thread # set other node colors to grey V(activityGraph)$color <- \"grey\" V(activityGraph)$color[which(V(activityGraph)$node_type == \"thread\")] <- \"red\"  # get node indexes for nodes that have comment attributes containing words of interest # set their node colors to blue ind <- grep(\"arson|starting fires\", tolower(V(activityGraph)$vosonTxt_comment)) V(activityGraph)$color[ind] <- \"blue\"  # open and write plot to a png file png(\"reddit_activity.png\", width = 600, height = 600) plot(activityGraph, vertex.label = \"\", vertex.size = 4, edge.arrow.size = 0.5) dev.off()"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"merging-collected-data","dir":"Articles","previous_headings":"","what":"Merging Collected Data","title":"Introduction to vosonSML","text":"Data collected different times, used different collect parameters saved multiple files can merged using functions operate dataframes. data Collect output tibble (dataframe) format provided collected data set social media type can combined using rbind function. examples cases involve large datasets, can sometimes efficient timely substitute optimized functions dplyr::bind_rows rbind data.table::rbindlist instead .call(\"rbind\", list).","code":""},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"merging-from-multiple-collect-operations","dir":"Articles","previous_headings":"Merging Collected Data","what":"Merging from multiple Collect operations","title":"Introduction to vosonSML","text":"Data collected session can merged using Merge function. following twitter example combines tweet data collected using different search parameters. result combined recent tweets using #auspol hashtag popular tweets using #bushfire hashtag.","code":"# collect twitter data for the #auspol hashtag auspolTwitterData <- twitterAuth |>   Collect(searchTerm = \"#auspol\", searchType = \"recent\", numTweets = 100)  # collect twitter data for the #bushfire hashtag bushfireTwitterData <- twitterAuth |>   Collect(searchTerm = \"#bushfire\", searchType = \"popular\", numTweets = 50)  # combine the collected data for the different hashtags twitterData <- Merge(auspolTwitterData, bushfireTwitterData, writeToFile = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"merging-files-in-a-directory","dir":"Articles","previous_headings":"Merging Collected Data","what":"Merging files in a directory","title":"Introduction to vosonSML","text":"many data collections merged file vosonSML MergeFiles function. example list twitter collection files 2019TwitterBushfireData directory end “TwitterData.rds” merged together.","code":"twitterData <- MergeFiles(   \"2019TwitterBushfireData\", pattern = \"*TwitterData.rds\" )"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"creating-a-network-and-graph-from-merged-data","dir":"Articles","previous_headings":"Merging Collected Data","what":"Creating a network and graph from merged data","title":"Introduction to vosonSML","text":"data merged can simply passed Create function create network per usual vosonSML work flow.","code":"# create an igraph of twitter actor network actorGraph <- twitterData |> Create(\"actor\") |> Graph(writeToFile = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"voson-dashboard","dir":"Articles","previous_headings":"","what":"VOSON Dashboard","title":"Introduction to vosonSML","text":"possible import network created using vosonSML, saved “.graphml” file, VOSON Dashboard. However, created categorical node attribute network wish plot networks VOSON Dashboard node colour reflecting node attribute, node attribute name pre-pended “vosonCA_”. let’s VOSON Dashboard know attribute treated categorical. , created Twitter subnetwork: giant component reply network, red nodes indicating users tweeted using word “bushfire”. created node attribute “tweetedBushfires”. VOSON Dashboard recognise node attribute, named “vosonCA_tweetedBushfires”. following code creates new node attribute name, sames network graphml file: following shows screenshot VOSON Dashboard network loaded “tweetedBushfires” attribute seleced reflected node colour.","code":"V(g3)$vosonCA_tweetedBushfires <- V(g3)$tweetedBushfires write.graph(g3, \"g3.graphml\", format = \"graphml\")"},{"path":"https://vosonlab.github.io/vosonSML/articles/Intro-to-vosonSML.html","id":"acknowledgements","dir":"Articles","previous_headings":"","what":"Acknowledgements","title":"Introduction to vosonSML","text":"vosonSML VOSON Dashboard developed maintained Virtual Observatory Study Online Networks (VOSON) Lab Australian National University. vosonSML originally released CRAN November 2015 package SocialMediaLab (Timothy Graham lead developer), significantly revised renamed vosonSML released CRAN July 2018 (Bryan Gertzel lead developer). acknowledge contributions Chung-hong Chan implemented revised UI (involving magrittr pipes) original SocialMediaLab package Xiaolan Cai contributed documentation.","code":""},{"path":"https://vosonlab.github.io/vosonSML/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"VOSON Lab. Author, maintainer. Robert Ackland. Author. Timothy Graham. Author. Francisca Borquez. Contributor.","code":""},{"path":"https://vosonlab.github.io/vosonSML/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Gertzel B, Borquez F, Graham T, Ackland R (2024). vosonSML: Collecting Social Media Data Generating Networks Analysis. VOSON Lab, Virtual Observatory Study Online Networks. R package version 0.35.0, https://github.com/vosonlab/vosonSML.","code":"@Manual{,   title = {vosonSML: Collecting Social Media Data and Generating Networks for Analysis},   author = {Bryan Gertzel and Francisca Borquez and Timothy Graham and Robert Ackland},   organization = {VOSON Lab, Virtual Observatory for the Study of Online Networks},   year = {2024},   note = {R package version 0.35.0},   url = {https://github.com/vosonlab/vosonSML}, }"},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement VOSON Lab. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://vosonlab.github.io/vosonSML/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.0, available https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines inspired Mozilla’s code conduct enforcement ladder. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"vosonsml---social-media-lab","dir":"","previous_headings":"","what":"vosonSML - Social Media Lab","title":"vosonSML - Social Media Lab","text":"vosonSML R package suite easy use functions collecting generating different types networks social media data. package supports collection data mastodon, reddit, youtube platforms hyperlinks web sites. Networks form node edge lists can generated collected data, supplemented additional metadata, used create graphs Social Network Analysis.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"installation-options","dir":"","previous_headings":"","what":"Installation Options","title":"vosonSML - Social Media Lab","text":"Installing github version recommended time CRAN releases may occur less frequently. Install latest github version: Install CRAN release version:","code":"# library(remotes) remotes::install_github(\"vosonlab/vosonSML\") install.packages(\"vosonSML\")"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"getting-started","dir":"","previous_headings":"","what":"Getting started","title":"vosonSML - Social Media Lab","text":"following usage examples provide quick start using vosonSML functions. Additionally Introduction vosonSML vignette practical explanatory guide collecting data creating networks.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"general-usage","dir":"","previous_headings":"Getting started","what":"General Usage","title":"vosonSML - Social Media Lab","text":"process authentication, data collection creating networks vosonSML expressed three functions: Authenticate, Collect Create. following examples usage supported social media: Mastodon | Reddit | YouTube | Hyperlink | Supplemental Functions","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"general-options","dir":"","previous_headings":"Getting started","what":"General Options","title":"vosonSML - Social Media Lab","text":"verbose: vosonSML functions accept verbosity parameter now set TRUE default. FALSE functions run silently unless warning error. set TRUE progress summary information function printed console. writeToFile: vosonSML functions accept write file parameter. set TRUE collected data saved file either working directory directory set voson.data option. file saved RDS file datetime generated name following format: YYYY-MM-DD_HHMMSS-XXXXXX rds graphml file. following environment options can also used: voson.data: set existing directory path writeToFile output files written directory instead working directory. Can set using options(voson.data = \"~/vsml-data\") example, cleared assigning value NULL. Directory paths can relative working directory e.g. ./data full paths. voson.cat: set TRUE verbose output functions printed using base cat() function instead message() function. Set entering options(voson.cat = TRUE), clear assigning value NULL.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"authentication","dir":"","previous_headings":"Getting started","what":"Authentication","title":"vosonSML - Social Media Lab","text":"Authentication objects generally need created unless credentials change. recommended save mastodon youtube authentication objects file creation load future sessions. Please note examples provided “~” notation paths short-hand system use users home directory, “.” start file names signifies hidden file OS. can name save objects however wish.","code":"# youtube data api key youtube_auth <- Authenticate(\"youtube\", apiKey = \"xxxxxxxxxx\")  # save the object after Authenticate saveRDS(youtube_auth, file = \"~/.auth_yt\")  # load a previously saved authentication object for use in Collect youtube_auth <- readRDS(\"~/.auth_yt\")"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"mastodon-usage","dir":"","previous_headings":"Getting started","what":"Mastodon Usage","title":"vosonSML - Social Media Lab","text":"implementation mastodon collection uses rtoot package suited collecting public posts.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"collect-threads-or-search-for-posts-from-server-timelines","dir":"","previous_headings":"Getting started > Mastodon Usage","what":"Collect threads or search for posts from server timelines","title":"vosonSML - Social Media Lab","text":"Collect can used collect threads setting parameter endpoint = thread providing URL’s starting post thread collected. mastodon server need specified, function collect thread posts server referenced URL. following example collects combines posts 3 threads provided. result named list two dataframes, one containing posts one metadata referenced users collection.","code":"library(vosonSML) options(voson.data = \"./mast-data\")  mast_auth <- Authenticate(\"mastodon\")  # collect thread posts belonging to the supplied mastodon # threads, the url of the first post in each thread should # be used mast_data <- mast_auth |>   Collect(     endpoint = \"thread\",     threadUrls = c(       \"https://mastodon.social/@arstechnica/111257471648143532\",       \"https://mastodon.social/@arstechnica/111257425856847171\",       \"https://mastodon.social/@arstechnica/111257193332540480\"     ),     writeToFile = TRUE   )  # Collecting post threads for mastodon urls... # # id                 | created # -------------------------------------------- # 111257471648143532 | 2023-10-18 18:38:11.509 # 111257731042879692 | 2023-10-18 19:44:08 # Collected 36 posts. # RDS file written: ./mast-data/2023-10-18_201254-MastodonData.rds # Done."},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"collect-posts-or-search-and-collect-posts-from-server-timelines","dir":"","previous_headings":"Getting started > Mastodon Usage","what":"Collect posts or search and collect posts from server timelines","title":"vosonSML - Social Media Lab","text":"Collect parameter endpoint = search can used collect number recent posts, recent posts containing hashtag server timelines. function requires server specified using instance parameter. following example collect recent 100 posts made mastodon.social server local timeline. local = TRUE parameter restricts posts made server users. next example collects recent 100 posts mastodon.social server global timeline containing hashtag #rstats. global timeline includes posts made users mastodon.social well posts made users affiliated servers. global timeline specified setting local = FALSE.","code":"mast_data <- mast_auth |>   Collect(     endpoint = \"search\",     instance = \"mastodon.social\",     local = TRUE,     numPosts = 100   )  # Collecting timeline posts... # Requested 100 posts # # id                 | created # -------------------------------------------- # 111257854695457456 | 2023-10-18 20:15:36.349 # 111257844442617952 | 2023-10-18 20:12:59.92 # Collected 120 posts. # Done. mast_data <- mast_auth |>   Collect(     endpoint = \"search\",     instance = \"mastodon.social\",     local = FALSE,     hashtag = \"rstats\",     numPosts = 100,     writeToFile = TRUE   )  # Collecting timeline posts... # Hashtag: rstats # Requested 100 posts #  # id                 | created             # ---------------------------------------- # 111851761879684588 | 2024-01-31 17:33:57 # 111839343172130565 | 2024-01-29 12:55:38 # Collected 120 posts. # RDS file written: 2024-01-31_190125-MastodonData.rds # Done."},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"create-mastodon-activity-and-actor-network-graphs","dir":"","previous_headings":"Getting started > Mastodon Usage","what":"Create mastodon activity and actor network graphs","title":"vosonSML - Social Media Lab","text":"mastodon Create function accepts data Collect type parameter activity actor specifies type network create collected data. Create produces two dataframes, one network nodes one node relations edges. can passed Graph function produce igraph object.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"activity-network","dir":"","previous_headings":"Getting started > Mastodon Usage > Create mastodon activity and actor network graphs","what":"Activity network","title":"vosonSML - Social Media Lab","text":"Nodes posts edges relationship posts. relationship type supported time reply edge.","code":"net_activity <- mast_data |>   Create(\"activity\") |>   AddText(mast_data) |>   Graph()  # Generating mastodon activity network... # Done.  # IGRAPH 7cc21ba DN-- 128 12 --  # + attr: type (g/c), name (v/c), post.created_at (v/n), # | post.visibility (v/c), account.id (v/c), account.username # | (v/c), account.acct (v/c), account.displayname (v/c), # | user.avatar (v/c), post.tags (v/x), post.tags.urls (v/x), # | post.reblogs_count (v/n), post.favourites_count (v/n), # | post.replies_count (v/n), post.url (v/c), node_type (v/c), # | absent (v/l), vosonTxt_post (v/c), created_at (e/n), edge_type # | (e/c) # + edges from 7cc21ba (vertex names): # [1] 111851737032132167->111846251799585000 # + ... omitted several edges"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"tag-network","dir":"","previous_headings":"Getting started > Mastodon Usage > Create mastodon activity and actor network graphs","what":"Tag network","title":"vosonSML - Social Media Lab","text":"variation mastodon activity network subtype tag. tag network netork tags (hashtags) found posts, coocurrence tags within posts used create relations.","code":"net_tag <- mast_data |>    Create(\"activity\", subtype = \"tag\") |>    Graph()     # Generating mastodon activity network... # Done.  # IGRAPH 23e6e20 DN-- 94 624 --  # + attr: type (g/c), name (v/c), post.id (e/c), edge_type (e/c) # + edges from 23e6e20 (vertex names): #  [1] peerreviewed   ->apackageaday    peerreviewed   ->oss             #  [3] peerreviewed   ->rstats          apackageaday   ->peerreviewed    #  [5] apackageaday   ->oss             apackageaday   ->rstats          #  [7] oss            ->peerreviewed    oss            ->apackageaday    #  [9] oss            ->rstats          rstats         ->peerreviewed    # [11] rstats         ->apackageaday    rstats         ->oss             # [13] rstats         ->reproducibility reproducibility->rstats          # [15] rshiny         ->rstats          rstats         ->rshiny          # + ... omitted several edges"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"actor-network","dir":"","previous_headings":"Getting started > Mastodon Usage > Create mastodon activity and actor network graphs","what":"Actor network","title":"vosonSML - Social Media Lab","text":"Nodes authors collected posts edges relationship authors. relationship types supported time reply mention edges.","code":"net_actor <- mast_data |>   Create(\"actor\", inclMentions = TRUE) |>   AddText(mast_data) |>   Graph()  # Generating mastodon actor network... # Done.  # IGRAPH c46e984 DN-B 82 12 --  # + attr: type (g/c), name (v/c), user.acct (v/c), user.username # | (v/c), user.displayname (v/c), user.url (v/c), user.avatar # | (v/c), type (v/c), absent (v/l), post.id (e/c), # | post.created_at (e/n), edge_type (e/c), vosonTxt_post (e/c) # + edges from c46e984 (vertex names): # [1] 109610301164555149->109610301164555149 # + ... omitted several edges"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"server-network","dir":"","previous_headings":"Getting started > Mastodon Usage > Create mastodon activity and actor network graphs","what":"Server network","title":"vosonSML - Social Media Lab","text":"variation mastodon actor network subtype server. server network simply groups users single actors represented servers, similarly combines relations server level.","code":"net_server <- mast_data |>    Create(\"actor\", subtype = \"server\") |>    Graph()  # Generating mastodon actor network... # Done.  # IGRAPH 845c991 DN-- 23 10 --  # + attr: type (g/c), name (v/c), n (v/n), edge_type (e/c) # + edges from 845c991 (vertex names): #  [1] fosstodon.org  ->fosstodon.org   fosstodon.org  ->fosstodon.org   #  [3] aus.social     ->aus.social      fosstodon.org  ->fosstodon.org   #  [5] mastodon.social->mastodon.social fosstodon.org  ->fosstodon.org   #  [7] fosstodon.org  ->fosstodon.org   fosstodon.org  ->fosstodon.org   #  [9] mastodon.social->hachyderm.io    mstdn.social   ->mstdn.social"},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"authenticate-and-collect-comments-from-youtube-videos","dir":"","previous_headings":"Getting started > YouTube Usage","what":"Authenticate and Collect comments from youtube videos","title":"vosonSML - Social Media Lab","text":"YouTube uses API key rather OAuth token simply set calling Authenticate key parameter. key set Collect can used collect comments specified youtube videos. following example collects maximum 100 top-level comments replies 2 specified video ID’s. produces dataframe combined comment data.","code":"# youtube authentication sets the api key auth_yt <- Authenticate(\"youtube\", apiKey = \"xxxxxxxxxxxxxx\") video_url <- c(\"https://www.youtube.com/watch?v=AQzZNIyjyWM\",                \"https://www.youtube.com/watch?v=lY0YLDZhT88&t=3152s\")  collect_yt <- auth_yt |>   Collect(videoIDs = video_url,           maxComments = 100)            ## Collecting comment threads for YouTube videos... ## Video 1 of 2 ## --------------------------------------------------------------- ## ** Creating dataframe from threads of AQzZNIyjyWM. ## ** Collecting replies for 1 threads with replies. Please be patient. ## Comment replies 1  ## ** Collected replies: 1 ## ** Total video comments: 11 ## (Video API unit cost: 5) ## --------------------------------------------------------------- ## Video 2 of 2 ## --------------------------------------------------------------- ## ** Creating dataframe from threads of lY0YLDZhT88. ## ** Collecting replies for 1 threads with replies. Please be patient. ## Comment replies 6  ## ** Collected replies: 6 ## ** Total video comments: 14 ## (Video API unit cost: 5) ## --------------------------------------------------------------- ## ** Total comments collected for all videos 25. ## (Estimated API unit cost: 10) ## Done."},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"create-youtube-activity-and-actor-network-graphs","dir":"","previous_headings":"Getting started > YouTube Usage","what":"Create youtube activity and actor network graphs","title":"vosonSML - Social Media Lab","text":"youtube Create function accepts data Collect network type parameter activity actor.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"activity-network-1","dir":"","previous_headings":"Getting started > YouTube Usage > Create youtube activity and actor network graphs","what":"Activity network","title":"vosonSML - Social Media Lab","text":"Nodes video comments edges represent whether directed video top-level comment another comment reply comment.","code":"net_activity <- collect_yt |> Create(\"activity\")  ## Generating youtube activity network... ## ------------------------- ## collected YouTube comments | 25 ## top-level comments         | 18 ## reply comments             | 7 ## videos                     | 2 ## nodes                      | 27 ## edges                      | 25 ## ------------------------- ## Done. g_activity <- net_activity |> Graph()  g_activity  ## IGRAPH 5a9fb56 DN-- 27 25 --  ## + attr: type (g/c), name (v/c), video_id (v/c), published_at (v/c), ## | updated_at (v/c), author_id (v/c), screen_name (v/c), node_type ## | (v/c), edge_type (e/c) ## + edges from 5a9fb56 (vertex names): ## [1] Ugw13lb0nCf4o4IKFb54AaABAg->VIDEOID:AQzZNIyjyWM ## [2] UgyJBlqZ64YnltQTOTt4AaABAg->VIDEOID:AQzZNIyjyWM ## [3] Ugysomx_apk24Pqrs1h4AaABAg->VIDEOID:AQzZNIyjyWM ## + ... omitted several edges"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"actor-network-1","dir":"","previous_headings":"Getting started > YouTube Usage > Create youtube activity and actor network graphs","what":"Actor network","title":"vosonSML - Social Media Lab","text":"Nodes users posted comments video publishers, edges represent comments directed users.","code":"net_actor <- collect_yt |> Create(\"actor\")  ## Generating YouTube actor network... ## Done. g_actor <- net_actor |> Graph()  g_actor  ## IGRAPH 5aad4c4 DN-- 24 27 --  ## + attr: type (g/c), name (v/c), screen_name (v/c), node_type (v/c), ## | video_id (e/c), comment_id (e/c), edge_type (e/c) ## + edges from 5aad4c4 (vertex names): ##  [1] UCb9ElH9tzEkG9OxDIiSYgdg->VIDEOID:AQzZNIyjyWM ##  [2] UC0DwaB_wHNzUh-LA9sWXKYQ->VIDEOID:AQzZNIyjyWM ##  [3] UCNHA8SkizJKauefYt1FHmjQ->VIDEOID:AQzZNIyjyWM ## + ... omitted several edges"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"reddit-usage","dir":"","previous_headings":"Getting started","what":"Reddit Usage","title":"vosonSML - Social Media Lab","text":"reddit API end-point used vosonSML require authentication Authenticate object still used set collection creation operations part reddit workflow.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"collect-a-thread-listing-from-subreddit","dir":"","previous_headings":"Getting started > Reddit Usage","what":"Collect a thread listing from subreddit","title":"vosonSML - Social Media Lab","text":"using endpoint = \"listing\" parameter vector subreddit names, list comment threads metadata can collected. number list results returned per subreddit can coarsely specified within 25 items, using max parameter.","code":"# specify subreddit names subreddits <- c(\"datascience\")  # collect a listing of the 25 top threads by upvote of all time collect_rd_listing <- Authenticate(\"reddit\") |>   Collect(endpoint = \"listing\", subreddits = subreddits,           sort = \"top\", period = \"all\", max = 25,           writeToFile = TRUE, verbose = TRUE)  ## Collecting thread listing for subreddits... ## Waiting between 3 and 5 seconds per request. ## Request subreddit listing: datascience (max items: 25). ## subreddit_id | subreddit   | count ## ---------------------------------- ## t5_2sptq     | datascience | 25    ## Collected metadata for 25 threads in listings. ## RDS file written: ./vsml-data/2023-04-02_073117-RedditListing.rds ## Done."},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"collect-reddit-threads","dir":"","previous_headings":"Getting started > Reddit Usage","what":"Collect reddit threads","title":"vosonSML - Social Media Lab","text":"reddit Collect function can used collect comments reddit threads specified URL’s. Please note API end-point used Collect limited first 500 comments per thread (plus 500 continue thread encountered). therefore suited collecting smaller threads entirety.","code":"# specify reddit threads to collect by url thread_urls <- c(   \"https://www.reddit.com/r/datascience/comments/wcd8x5/\",   \"https://www.reddit.com/r/datascience/comments/wcni2g/\" )  # or use permalinks from a previously collected listing thread_urls <- collect_rd_listing$permalink |> head(n = 3)  # collect comment threads with their comments sorted by best comments first collect_rd <- Authenticate(\"reddit\") |>   Collect(threadUrls = thread_urls,           sort = \"best\", writeToFile = TRUE, verbose = TRUE)  ## Collecting comment threads for reddit urls... ## Waiting between 3 and 5 seconds per thread request. ## Request thread: r/datascience (k8nyf8) - sort: best ## Request thread: r/datascience (oeg6nl) - sort: best ## Request thread: r/datascience (hohvgq) - sort: best ## HTML decoding comments. ## thread_id | title                                         | subreddit   | count ## ------------------------------------------------------------------------------- ## hohvgq    | Shout Out to All the Mediocre Data Scienti... | datascience | 272   ## k8nyf8    | data siens                                    | datascience | 77    ## oeg6nl    | The pain and excitement                       | datascience | 179 ## Collected 528 total comments. ## RDS file written: ./vsml-data/2023-04-02_073130-RedditData.rds ## Done."},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"activity-network-2","dir":"","previous_headings":"Getting started > Reddit Usage > Create reddit activity and actor networks","what":"Activity network","title":"vosonSML - Social Media Lab","text":"Nodes original thread posts comments, edges replies directed original post comments made others.","code":"# create an activity network net_activity <- collect_rd |> Create(\"activity\", verbose = TRUE)  ## Generating reddit activity network... ## ------------------------- ## collected reddit comments | 528 ## subreddits                | 1  ## threads                   | 3  ## comments                  | 528 ## nodes                     | 531 ## edges                     | 528 ## ------------------------- ## Done. g_activity <- net_activity |> Graph()  g_activity  ## IGRAPH 62e8305 DN-- 531 528 --  ## + attr: type (g/c), name (v/c), thread_id (v/c), comm_id (v/c), ## | datetime (v/c), ts (v/n), subreddit (v/c), user (v/c), node_type ## | (v/c), edge_type (e/c) ## + edges from 62e8305 (vertex names): ##  [1] k8nyf8.1      ->k8nyf8.0     k8nyf8.1_1    ->k8nyf8.1     ##  [3] k8nyf8.1_2    ->k8nyf8.1     k8nyf8.1_2_1  ->k8nyf8.1_2   ## + ... omitted several edges"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"actor-network-2","dir":"","previous_headings":"Getting started > Reddit Usage > Create reddit activity and actor networks","what":"Actor network","title":"vosonSML - Social Media Lab","text":"Nodes reddit users commented threads edges represent replies users.","code":"# create an actor network net_actor <- collect_rd |> Create(\"actor\", verbose = TRUE)  ## Generating reddit actor network... ## ------------------------- ## collected reddit comments | 528 ## subreddits                | 1  ## threads                   | 3  ## comments                  | 273 ## nodes                     | 321 ## edges                     | 531 ## ------------------------- ## Done. g_actor <- net_actor |> Graph()  g_actor  ## IGRAPH 62fa45c DN-- 321 531 --  ## + attr: type (g/c), name (v/c), user (v/c), subreddit (e/c), thread_id ## | (e/c), comment_id (e/n), comm_id (e/c) ## + edges from 62fa45c (vertex names): ##  [1] 1 ->1  2 ->1  3 ->1  1 ->3  3 ->1  4 ->1  5 ->1  6 ->3  7 ->1  8 ->7  ## [11] 9 ->1  1 ->9  10->1  11->1  1 ->11 1 ->1  1 ->1  1 ->1  1 ->1  1 ->1  ## + ... omitted several edges"},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"authenticate-and-collect-from-web-sites","dir":"","previous_headings":"Getting started > Hyperlink Usage","what":"Authenticate and Collect from web sites","title":"vosonSML - Social Media Lab","text":"vosonSML hyperlink collection functionality require authentication using web API’s, however Authenticate object still used set collection creation operations part vosonSML workflow. hyperlink Collect function accepts dataframe seed web pages, well corresponding type max_depth parameters page. Please note implementalion hyperlink collection networks still experimental stage.","code":"# specify seed web pages and parameters for hyperlink collection seed_pages <-    tibble::tribble(      ~page, ~type, ~max_depth,      \"http://vosonlab.net\", \"ext\", 2,      \"https://www.oii.ox.ac.uk\", \"ext\", 2,      \"https://sonic.northwestern.edu\", \"ext\", 2    )  #  A tibble: 3 × 3 #   page                           type  max_depth #   <chr>                          <chr>     <dbl> # 1 http://vosonlab.net            ext           2 # 2 https://www.oii.ox.ac.uk       ext           2 # 3 https://sonic.northwestern.edu ext           2  collect_web <- Authenticate(\"web\") |>   Collect(pages = seed_pages, verbose = TRUE)  # Collecting web page hyperlinks... # *** initial call to get urls - http://vosonlab.net # * new domain: http://vosonlab.net # + http://vosonlab.net (10 secs) # *** end initial call # *** set depth: 2 # *** loop call to get urls - nrow: 6 depth: 2 max_depth: 2 # * new domain: http://rsss.anu.edu.au # + http://rsss.anu.edu.au (0.96 secs) # ..."},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"create-activity-and-actor-networks","dir":"","previous_headings":"Getting started > Hyperlink Usage","what":"Create activity and actor networks","title":"vosonSML - Social Media Lab","text":"","code":"# generate a hyperlink activity network net_activity <- collect_web |> Create(\"activity\")  # generate a hyperlink actor network net_actor <- collect_web |> Create(\"actor\")"},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"merge-collected-data-together","dir":"","previous_headings":"Getting started > Supplemental Functions","what":"Merge collected data together","title":"vosonSML - Social Media Lab","text":"Merge MergeFiles functions allow two Collect objects merged together provided datasource type e.g mastodon.","code":"get_hashtag_data <- function(tag) {   Authenticate(\"mastodon\") |>     Collect(       endpoint = \"search\",       instance = \"mastodon.social\",       local = FALSE,       hashtag = tag,       numPosts = 100,       writeToFile = TRUE     ) }  library(vosonSML) options(voson.data = \"./mast-data\")  # collect data mast_rstats <- get_hashtag_data(\"rstats\") mast_python <- get_hashtag_data(\"python\")  # merge collect objects data <- Merge(mast_rstats, mast_python, writeToFile = TRUE)  # Merging collect data... # RDS file written: ./mast-data/2024-07-21_150353-MastodonDataMerge.rds # Done.  # merge files from a data directory data <- MergeFiles(   \"./mast-data\", pattern = \"*MastodonData.rds\", writeToFile = TRUE )  # Merging collect files... # Matching files: # - ./mast-data/2024-07-21_035919-MastodonData.rds # - ./mast-data/2024-07-21_035925-MastodonData.rds # Merging collect data... # RDS file written: ./mast-data/2024-07-21_150544-DataMergeFile.rds # Done."},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"addtext-adds-collected-text-data-to-networks-as-node-or-edge-attributes","dir":"","previous_headings":"Getting started > Supplemental Functions","what":"AddText adds collected text data to networks as node or edge attributes","title":"vosonSML - Social Media Lab","text":"AddText function can used following creation networks mastodon, youtube reddit. add attribute starting vosonTxt_ nodes activity networks edges actor networks. requires collected datasource extract text data. AddText also redirect edges youtube actor network finding user references beginning reply comments text using repliesFromText parameter. following example edge redirected UserC UserB text reference opposed UserA made top-level comment users replying . Redirect edge user nodes C -> C -> B.","code":"# create activity network net_activity <- data |> Create(\"activity\")  # activity network with text data added as node attribute net_activity <- net_activity |> AddText(data)    ## Adding text data to network...Done. names(net_activity) #  [1] \"post.id\"               \"post.created_at\"       # ..              # [17] \"vosonTxt_post\" # video comments # UserA: Great tutorial. # |- UserB: I agree, but it could have had more examples. # |- UserC: @UserB I thought it probably had too many. # create activity network net_actor <- collect_yt |> Create(\"actor\")  # detects replies to users in text net_actor <- net_actor |>   AddText(collect_yt, repliesFromText = TRUE)  ## Adding text data to network...Done."},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"addvideodata-requests-and-adds-video-data-to-networks","dir":"","previous_headings":"Getting started > Supplemental Functions","what":"AddVideoData requests and adds video data to networks","title":"vosonSML - Social Media Lab","text":"AddVideoData adds video information node attributes youtube actor networks replaces video ID nodes user (channel owner publisher). actorSubOnly parameter can used perform ID substitution. AddVideoData function also add new dataframe actor_network network list containing retrieved video information called videos.","code":"# replaces VIDEOID:xxxxxx references in actor network with their publishers # user id (channel ID) and adds additional collected youtube video info to actor # network graph as node attributes net_actor <- collect_yt |>   Create(\"actor\") |>    AddVideoData(auth_yt, actorSubOnly = FALSE)  names(net_actor) ## [1] \"nodes\"  \"edges\"  \"videos\" nrow(net_actor$videos) ## [1] 2 g_actor <- net_actor |> Graph()  ## IGRAPH 644cb17 DN-- 23 27 --  ## + attr: type (g/c), name (v/c), screen_name (v/c), node_type (v/c), ## | video_id (e/c), comment_id (e/c), edge_type (e/c), video_title (e/c), ## | video_description (e/c), video_published_at (e/c) ## + edges from 644cb17 (vertex names): ## [1] UCb9ElH9tzEkG9OxDIiSYgdg->UCeiiqmVK07qhY-wvg3IZiZQ ## [2] UC0DwaB_wHNzUh-LA9sWXKYQ->UCeiiqmVK07qhY-wvg3IZiZQ ## + ... omitted several edges"},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"where-to-next","dir":"","previous_headings":"","what":"Where to next?","title":"vosonSML - Social Media Lab","text":"Continue working network graphs using igraph package check examples plots Introduction vosonSML vignette. graphml files produced vosonSML also easily imported software Gephi visualization exploration networks. alternative vosonSML using R command-line interface also developed R Shiny app called VOSON Dash. provides user friendly GUI collection data using vosonSML additional network visualization analysis features. detailed information functions parameters, please refer Reference page.","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"special-thanks","dir":"","previous_headings":"","what":"Special thanks","title":"vosonSML - Social Media Lab","text":"package possible without number excellent packages created others R community, especially like thank authors dplyr, httr2, igraph, RedditExtractoR, rtoot","code":""},{"path":"https://vosonlab.github.io/vosonSML/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"vosonSML - Social Media Lab","text":"Please note VOSON Lab projects released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.mastodon.html","id":null,"dir":"Reference","previous_headings":"","what":"Add columns containing text data to mastodon activity network dataframes — AddText.activity.mastodon","title":"Add columns containing text data to mastodon activity network dataframes — AddText.activity.mastodon","text":"Add columns containing text data mastodon activity network dataframes","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.mastodon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add columns containing text data to mastodon activity network dataframes — AddText.activity.mastodon","text":"","code":"# S3 method for class 'activity.mastodon' AddText(net, data, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.mastodon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add columns containing text data to mastodon activity network dataframes — AddText.activity.mastodon","text":"net named list dataframes nodes edges generated Create. data dataframe generated Collect. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.mastodon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add columns containing text data to mastodon activity network dataframes — AddText.activity.mastodon","text":"Network named list two dataframes containing $nodes $edges including columns containing text data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.mastodon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add columns containing text data to mastodon activity network dataframes — AddText.activity.mastodon","text":"","code":"if (FALSE) { # \\dontrun{ # add text to an activity network net_activity <- collect_mdn |>   Create(\"activity\") |>   AddText(collect_mdn)  # network net_activity$nodes net_activity$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.reddit.html","id":null,"dir":"Reference","previous_headings":"","what":"Add columns containing text data to reddit activity network dataframes — AddText.activity.reddit","title":"Add columns containing text data to reddit activity network dataframes — AddText.activity.reddit","text":"Add columns containing text data reddit activity network dataframes","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.reddit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add columns containing text data to reddit activity network dataframes — AddText.activity.reddit","text":"","code":"# S3 method for class 'activity.reddit' AddText(net, data, cleanText = FALSE, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.reddit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add columns containing text data to reddit activity network dataframes — AddText.activity.reddit","text":"net named list dataframes nodes edges generated Create. data dataframe generated Collect. cleanText Logical. Simple removal problematic characters XML 1.0 standard. Implemented prevent reddit specific XML control character errors generating graphml files. Default FALSE. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.reddit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add columns containing text data to reddit activity network dataframes — AddText.activity.reddit","text":"Network named list two dataframes containing $nodes $edges including columns containing text data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.activity.reddit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add columns containing text data to reddit activity network dataframes — AddText.activity.reddit","text":"","code":"if (FALSE) { # \\dontrun{ # add text to an activity network net_activity <- collect_rd |>   Create(\"activity\") |>   AddText(collect_rd)  # network net_activity$nodes net_activity$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.mastodon.html","id":null,"dir":"Reference","previous_headings":"","what":"Add columns containing text data to mastodon actor network dataframes — AddText.actor.mastodon","title":"Add columns containing text data to mastodon actor network dataframes — AddText.actor.mastodon","text":"Add columns containing text data mastodon actor network dataframes","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.mastodon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add columns containing text data to mastodon actor network dataframes — AddText.actor.mastodon","text":"","code":"# S3 method for class 'actor.mastodon' AddText(net, data, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.mastodon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add columns containing text data to mastodon actor network dataframes — AddText.actor.mastodon","text":"net named list dataframes nodes edges generated Create. data dataframe generated Collect. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.mastodon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add columns containing text data to mastodon actor network dataframes — AddText.actor.mastodon","text":"Network named list two dataframes containing $nodes $edges including columns containing text data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.mastodon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add columns containing text data to mastodon actor network dataframes — AddText.actor.mastodon","text":"","code":"if (FALSE) { # \\dontrun{ # add text to an actor network ignoring references to actors at the beginning of # comment text net_actor <- collect_mdn |>   Create(\"actor\") |>   AddText(collect_mdn)  # network net_actor$nodes net_actor$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.reddit.html","id":null,"dir":"Reference","previous_headings":"","what":"Add columns containing text data to reddit actor network dataframes — AddText.actor.reddit","title":"Add columns containing text data to reddit actor network dataframes — AddText.actor.reddit","text":"Add columns containing text data reddit actor network dataframes","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.reddit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add columns containing text data to reddit actor network dataframes — AddText.actor.reddit","text":"","code":"# S3 method for class 'actor.reddit' AddText(net, data, cleanText = FALSE, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.reddit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add columns containing text data to reddit actor network dataframes — AddText.actor.reddit","text":"net named list dataframes nodes edges generated Create. data dataframe generated Collect. cleanText Logical. Simple removal problematic characters XML 1.0 standard. Implemented prevent reddit specific XML control character errors generating graphml files. Default FALSE. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.reddit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add columns containing text data to reddit actor network dataframes — AddText.actor.reddit","text":"Network named list two dataframes containing $nodes $edges including columns containing text data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.reddit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add columns containing text data to reddit actor network dataframes — AddText.actor.reddit","text":"","code":"if (FALSE) { # \\dontrun{ # add text to an actor network ignoring references to actors at the beginning of # comment text net_actor <- collect_rd |>   Create(\"actor\") |>   AddText(collect_rd)  # network net_actor$nodes net_actor$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.youtube.html","id":null,"dir":"Reference","previous_headings":"","what":"Add columns containing text data to YouTube activity network dataframes — AddText.actor.youtube","title":"Add columns containing text data to YouTube activity network dataframes — AddText.actor.youtube","text":"Text comments added network node attributes. Text comments added network edge attributes. References actors detected beginning comments edges redirected actor instead differ top-level comment author.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.youtube.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add columns containing text data to YouTube activity network dataframes — AddText.actor.youtube","text":"","code":"# S3 method for class 'activity.youtube' AddText(net, data, ..., writeToFile = FALSE, verbose = TRUE)  # S3 method for class 'actor.youtube' AddText(   net,   data,   repliesFromText = FALSE,   atRepliesOnly = TRUE,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.youtube.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add columns containing text data to YouTube activity network dataframes — AddText.actor.youtube","text":"net named list dataframes nodes edges generated Create. data dataframe generated Collect. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE. repliesFromText Logical. comment text edge begins screen_name change edge directed screen_name - different top level comment author reply comment posted . Default FALSE. atRepliesOnly Logical. Comment screen_names must begin '@' symbol redirected. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.youtube.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add columns containing text data to YouTube activity network dataframes — AddText.actor.youtube","text":"Network named list two dataframes containing $nodes $edges including columns containing text data. Network named list two dataframes containing $nodes $edges including columns containing text data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.actor.youtube.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add columns containing text data to YouTube activity network dataframes — AddText.actor.youtube","text":"","code":"if (FALSE) { # \\dontrun{ # add text to an activity network net_activity <- collect_yt |>   Create(\"activity\") |> AddText(collect_yt)  # network net_activity$nodes net_activity$edges } # }  if (FALSE) { # \\dontrun{ # add text to an actor network ignoring references to actors at # the beginning of comment text net_actor <- collect_yt |>   Create(\"actor\") |>   AddText(collect_yt, repliesFromText = FALSE)  # network net_actor$nodes net_actor$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.html","id":null,"dir":"Reference","previous_headings":"","what":"Add columns containing text data to network dataframes — AddText","title":"Add columns containing text data to network dataframes — AddText","text":"Network supplemented additional social media text data applied node edge attributes.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add columns containing text data to network dataframes — AddText","text":"","code":"AddText(net, data, ..., writeToFile = FALSE, verbose = TRUE)  add_text(net, data, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add columns containing text data to network dataframes — AddText","text":"net named list dataframes nodes edges generated Create. data dataframe generated Collect. ... Additional parameters passed function. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add columns containing text data to network dataframes — AddText","text":"Network named list two dataframes containing $nodes $edges including columns containing text data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Add columns containing text data to network dataframes — AddText","text":"Supports social media activity actor networks. Refer AddText.activity.reddit AddText.actor.reddit additional reddit parameters. Refer AddText.actor.youtube additional YouTube actor network parameters.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddText.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add columns containing text data to network dataframes — AddText","text":"","code":"if (FALSE) { # \\dontrun{ # add text to an activity network net_activity <- collect_data |>   Create(\"activity\") |> AddText(collect_data)  # network net_activity$nodes net_activity$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.actor.youtube.html","id":null,"dir":"Reference","previous_headings":"","what":"Add video information to youtube actor network dataframes — AddVideoData.actor.youtube","title":"Add video information to youtube actor network dataframes — AddVideoData.actor.youtube","text":"YouTube actor network supplemented additional downloaded video information. Adds video id, title, description publish time edge attributes. Nodes actor references video id's network substituted actor id (video channel id) retrieved video details.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.actor.youtube.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add video information to youtube actor network dataframes — AddVideoData.actor.youtube","text":"","code":"# S3 method for class 'actor.youtube' AddVideoData(   net,   youtubeAuth = NULL,   videoIds = NULL,   actorSubOnly = FALSE,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.actor.youtube.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add video information to youtube actor network dataframes — AddVideoData.actor.youtube","text":"net named list dataframes nodes edges generated Create. youtubeAuth YouTube Authenticate object. videoIds List. Video id's download video information. actorSubOnly Logical. substitute video id's publishers channel id. add additional video data edge list. ... Additional parameters passed function. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.actor.youtube.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add video information to youtube actor network dataframes — AddVideoData.actor.youtube","text":"Network named list three dataframes containing $nodes, $edges $videos nodes edges include columns additional video data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.actor.youtube.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add video information to youtube actor network dataframes — AddVideoData.actor.youtube","text":"","code":"if (FALSE) { # \\dontrun{ # 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 } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.html","id":null,"dir":"Reference","previous_headings":"","what":"Add columns of video information to network dataframes — AddVideoData","title":"Add columns of video information to network dataframes — AddVideoData","text":"Network supplemented additional downloaded video information.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add columns of video information to network dataframes — AddVideoData","text":"","code":"AddVideoData(net, youtubeAuth = NULL, ..., writeToFile = FALSE, verbose = TRUE)  add_videos(net, youtubeAuth = NULL, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add columns of video information to network dataframes — AddVideoData","text":"net named list dataframes nodes edges generated Create. youtubeAuth YouTube Authenticate object. ... Additional parameters passed function. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add columns of video information to network dataframes — AddVideoData","text":"Network named list three dataframes containing $nodes, $edges $videos nodes edges include columns additional video data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/AddVideoData.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Add columns of video information to network dataframes — AddVideoData","text":"supports YouTube actor networks. Refer AddVideoData.actor.youtube.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a credential object to access social media APIs — Authenticate","title":"Create a credential object to access social media APIs — Authenticate","text":"Authenticate creates credential object enables R make authenticated calls social media APIs. credential object S3 object containing authentication related information access token key, class name identifying social media grants authentication. Authenticate first step Authenticate, Collect Create workflow. Refer Authenticate.mastodon, Authenticate.youtube, Authenticate.reddit Authenticate.web parameters usage.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a credential object to access social media APIs — Authenticate","text":"","code":"Authenticate(socialmedia, ..., verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a credential object to access social media APIs — Authenticate","text":"socialmedia Character string. Identifier social media API authenticate . Supported social media \"mastodon\", \"youtube\", \"reddit\" \"web\". ... Optional parameters pass functions providied supporting R packages used social media API access. verbose Logical. Print messages console. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.mastodon.html","id":null,"dir":"Reference","previous_headings":"","what":"Mastodon API authentication — Authenticate.mastodon","title":"Mastodon API authentication — Authenticate.mastodon","text":"Mastodon OAuth authentication.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.mastodon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Mastodon API authentication — Authenticate.mastodon","text":"","code":"# S3 method for class 'mastodon' Authenticate(   socialmedia,   instance = NULL,   type = \"public\",   ...,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.mastodon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Mastodon API authentication — Authenticate.mastodon","text":"socialmedia Character string. Identifier social media API authenticate, set \"mastodon\". instance Character string. Server authenticate create token. type Character string. Type access, can \"public\" \"user\". Default \"public\". ... Additional parameters passed function. used method. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.mastodon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Mastodon API authentication — Authenticate.mastodon","text":"credential object containing access token $auth social media type descriptor $socialmedia set \"mastodon\". Object class names \"credential\" \"mastodon\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.mastodon.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Mastodon API authentication — Authenticate.mastodon","text":"vosonSML uses rtoot package Mastodon data collection API access tokens.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.mastodon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Mastodon API authentication — Authenticate.mastodon","text":"","code":"if (FALSE) { # \\dontrun{ # mastodon API public access bearer token mastodon_auth <- Authenticate(   \"mastodon\",   instance = \"mastodon.social\" )  # mastodon API user access bearer token mastodon_auth_user <- Authenticate(   \"mastodon\",   instance = \"mastodon.social\",   type = \"user\" )  # if thread collection API token not required mastodon_auth <- Authenticate(\"mastodon\") } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.reddit.html","id":null,"dir":"Reference","previous_headings":"","what":"Reddit API authentication — Authenticate.reddit","title":"Reddit API authentication — Authenticate.reddit","text":"Reddit require authentication version vosonSML.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.reddit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reddit API authentication — Authenticate.reddit","text":"","code":"# S3 method for class 'reddit' Authenticate(socialmedia, ..., verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.reddit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reddit API authentication — Authenticate.reddit","text":"socialmedia Character string. Identifier social media API authenticate, set \"reddit\". ... Additional parameters passed function. used method. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.reddit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reddit API authentication — Authenticate.reddit","text":"credential object containing $auth = NULL value social media type descriptor $socialmedia set \"reddit\". Object class names \"credential\" \"reddit\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.reddit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Reddit API authentication — Authenticate.reddit","text":"Even though reddit require authentication version vosonSML Authenticate function must still called set socialmedia identifier. used route appropriate social media Collect function.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.reddit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reddit API authentication — Authenticate.reddit","text":"","code":"if (FALSE) { # \\dontrun{ # reddit authentication redditAuth <- Authenticate(\"reddit\") } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.web.html","id":null,"dir":"Reference","previous_headings":"","what":"Web crawler authentication — Authenticate.web","title":"Web crawler authentication — Authenticate.web","text":"Web crawler require authentication version vosonSML.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.web.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Web crawler authentication — Authenticate.web","text":"","code":"# S3 method for class 'web' Authenticate(socialmedia, ..., verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.web.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Web crawler authentication — Authenticate.web","text":"socialmedia Character string. Identifier social media API authenticate, set \"web\". ... Additional parameters passed function. used method. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.web.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Web crawler authentication — Authenticate.web","text":"credential object containing $auth = NULL value social media type descriptor $socialmedia set \"web\". Object class names \"credential\" \"web\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.web.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Web crawler authentication — Authenticate.web","text":"Even though web crawler require authentication version vosonSML Authenticate function must still called set socialmedia identifier. used route appropriate social media Collect function.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.web.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Web crawler authentication — Authenticate.web","text":"","code":"if (FALSE) { # \\dontrun{ # web authentication webAuth <- Authenticate(\"web\") } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.youtube.html","id":null,"dir":"Reference","previous_headings":"","what":"YouTube API authentication — Authenticate.youtube","title":"YouTube API authentication — Authenticate.youtube","text":"YouTube authentication uses OAuth2 requires Google Developer API key described : https://developers.google.com/youtube/v3/docs/.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.youtube.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"YouTube API authentication — Authenticate.youtube","text":"","code":"# S3 method for class 'youtube' Authenticate(socialmedia, apiKey, ..., verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.youtube.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"YouTube API authentication — Authenticate.youtube","text":"socialmedia Character string. Identifier social media API authenticate, set \"youtube\". apiKey Character string. Google developer API key authenticate. ... Additional parameters passed function. used method. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.youtube.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"YouTube API authentication — Authenticate.youtube","text":"credential object containing api key $auth social media type descriptor $socialmedia set \"youtube\". Object class names \"credential\" \"youtube\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Authenticate.youtube.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"YouTube API authentication — Authenticate.youtube","text":"","code":"if (FALSE) { # \\dontrun{ # youtube authentication with google developer api key myAPIKey <- \"xxxxxxxxxxxx\"  youtubeAuth <- Authenticate(\"youtube\", apiKey = myAPIKey) } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.html","id":null,"dir":"Reference","previous_headings":"","what":"Collect data from social media for generating networks — Collect","title":"Collect data from social media for generating networks — Collect","text":"function collects data social media structures dataframe can used creating networks analysis. Collect second step Authenticate, Collect, Create workflow.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collect data from social media for generating networks — Collect","text":"","code":"Collect(credential, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collect data from social media for generating networks — Collect","text":"credential credential object generated Authenticate. ... Optional parameters pass functions providied supporting R packages used social media API collection. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.listing.reddit.html","id":null,"dir":"Reference","previous_headings":"","what":"Collect reddit thread listings from subreddits — Collect.listing.reddit","title":"Collect reddit thread listings from subreddits — Collect.listing.reddit","text":"Collects thread listings one specified subreddits structures data dataframe.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.listing.reddit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collect reddit thread listings from subreddits — Collect.listing.reddit","text":"","code":"# S3 method for class 'listing.reddit' Collect(   credential,   endpoint,   subreddits,   sort = \"hot\",   period = \"all\",   max = 25,   waitTime = c(6, 8),   ua = getOption(\"HTTPUserAgent\"),   ...,   writeToFile = FALSE,   verbose = TRUE )  collect_reddit_listings(   subreddits,   sort = \"new\",   period = NULL,   max = 25,   waitTime = c(6, 8),   ua = vsml_ua(),   writeToFile = FALSE,   verbose = TRUE,   ... )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.listing.reddit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collect reddit thread listings from subreddits — Collect.listing.reddit","text":"credential credential object generated Authenticate class name \"reddit\". endpoint API endpoint. subreddits Character vector. Subreddit names collect thread listings . sort Character vector. Listing thread sort order. Options \"hot\", \"top\", \"new\", \"rising\". Default \"hot\". period Character vector. Listing top threads time period. applicable sort order \"top\". Options \"hour\", \"day\", \"week\", \"month\", \"year\" \"\". Default \"\". max Numeric vector. Maximum number threads listing return. Default 25. waitTime Numeric vector. Time range seconds select random wait -url collection requests. Minimum 3 seconds. Default c(6, 8) wait time chosen 6 8 seconds. ua Character string. Override User-Agent string use Reddit thread requests. Default option(\"HTTPUserAgent\") value set vosonSML. ... Additional parameters passed function. used method. writeToFile Logical. Write collected data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.listing.reddit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collect reddit thread listings from subreddits — Collect.listing.reddit","text":"tibble object class names \"listing\" \"reddit\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.listing.reddit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Collect reddit thread listings from subreddits — Collect.listing.reddit","text":"reddit endpoint used collection maximum limit 25 per listing.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.listing.reddit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collect reddit thread listings from subreddits — Collect.listing.reddit","text":"","code":"if (FALSE) { # \\dontrun{ # subreddit url to collect threads from subreddits  <- c(\"datascience\")  redditListing <- redditAuth |>   Collect(endpoint = \"listing\", subreddits = subreddits, sort = \"new\", writeToFile = TRUE) } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.search.mastodon.html","id":null,"dir":"Reference","previous_headings":"","what":"Collect post data from mastodon search — Collect.search.mastodon","title":"Collect post data from mastodon search — Collect.search.mastodon","text":"function collects posts based search terms structures data dataframe class names \"datasource\" \"mastodon\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.search.mastodon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collect post data from mastodon search — Collect.search.mastodon","text":"","code":"# S3 method for class 'search.mastodon' Collect(   credential,   endpoint,   hashtag = NULL,   instance = NULL,   local = FALSE,   numPosts = 100,   anonymous = TRUE,   retryOnRateLimit = TRUE,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.search.mastodon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collect post data from mastodon search — Collect.search.mastodon","text":"credential credential object generated Authenticate class name \"mastodon\". endpoint API endpoint. hashtag Character string. Specifies mastodon query search e.g #hashtag. Set NULL unfiltered public posts. Default NULL. instance Character string. Server collect posts . Default NULL. local Logical. Search local server global timeline. FALSE. numPosts Numeric. Specifies many tweets collected. Default 100. anonymous Logical. Collect public posts without authenticating. Default TRUE. retryOnRateLimit Logical. API rate-limit reached collection wait resume resets. Default TRUE. ... Arguments passed rtoot::get_timeline_hashtag only_media logical, Show statuses media attached? min_id character, Return results immediately newer id writeToFile Logical. Write collected data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.search.mastodon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collect post data from mastodon search — Collect.search.mastodon","text":"tibble object class names \"datasource\" \"mastodon\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.mastodon.html","id":null,"dir":"Reference","previous_headings":"","what":"Collect posts data from mastodon threads — Collect.thread.mastodon","title":"Collect posts data from mastodon threads — Collect.thread.mastodon","text":"Collects public posts one specified mastodon conversation threads structures data dataframe class names \"datasource\" \"mastodon\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.mastodon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collect posts data from mastodon threads — Collect.thread.mastodon","text":"","code":"# S3 method for class 'thread.mastodon' Collect(   credential,   endpoint,   threadUrls,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.mastodon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collect posts data from mastodon threads — Collect.thread.mastodon","text":"credential credential object generated Authenticate class name \"mastodon\". endpoint API endpoint. threadUrls Character vector. Mastodon thread post urls collect data . ... Additional parameters passed function. used method. writeToFile Logical. Write collected data file. Default FALSE. verbose Logical. Output additional information data collection. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.mastodon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collect posts data from mastodon threads — Collect.thread.mastodon","text":"tibble object class names \"datasource\" \"mastodon\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.mastodon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collect posts data from mastodon threads — Collect.thread.mastodon","text":"","code":"if (FALSE) { # \\dontrun{ # post urls to collect threads from threadUrls <- c(\"https://mastodon.social/@xxxxxx/xxxxxxxxx\")  mastodonData <- Authenticate(\"mastodon\") |>   Collect(threadUrls = threadUrls, writeToFile = TRUE) } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.reddit.html","id":null,"dir":"Reference","previous_headings":"","what":"Collect comments data from reddit threads — Collect.thread.reddit","title":"Collect comments data from reddit threads — Collect.thread.reddit","text":"Collects comments made users one specified subreddit conversation threads structures data dataframe class names \"datasource\" \"reddit\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.reddit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collect comments data from reddit threads — Collect.thread.reddit","text":"","code":"# S3 method for class 'thread.reddit' Collect(   credential,   endpoint,   threadUrls,   sort = NA,   waitTime = c(6, 8),   ua = getOption(\"HTTPUserAgent\"),   ...,   writeToFile = FALSE,   verbose = TRUE )  collect_reddit_threads(   threadUrls,   sort = \"best\",   waitTime = c(6, 8),   ua = vsml_ua(),   writeToFile = FALSE,   verbose = TRUE,   ... )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.reddit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collect comments data from reddit threads — Collect.thread.reddit","text":"credential credential object generated Authenticate class name \"reddit\". endpoint API endpoint. threadUrls Character vector. Reddit thread urls collect data . sort Character vector. Reddit comment sort order. Options \"best\", \"top\", \"new\", \"controversial\", \"old\", \"qa\". Default NA. waitTime Numeric vector. Time range seconds select random wait -url collection requests. Minimum 3 seconds. Default c(6, 8) wait time chosen 6 8 seconds. ua Character string. Override User-Agent string use Reddit thread requests. Default option(\"HTTPUserAgent\") value set vosonSML. ... Additional parameters passed function. used method. writeToFile Logical. Write collected data file. Default FALSE. verbose Logical. Output additional information data collection. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.reddit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collect comments data from reddit threads — Collect.thread.reddit","text":"tibble object class names \"datasource\" \"reddit\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.reddit.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Collect comments data from reddit threads — Collect.thread.reddit","text":"reddit web endpoint used collection maximum limit 500 comments per thread url.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.thread.reddit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collect comments data from reddit threads — Collect.thread.reddit","text":"","code":"if (FALSE) { # \\dontrun{ # subreddit url to collect threads from threadUrls <- c(\"https://www.reddit.com/r/xxxxxx/comments/xxxxxx/x_xxxx_xxxxxxxxx/\")  redditData <- redditAuth |>   Collect(threadUrls = threadUrls, writeToFile = TRUE) } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.web.html","id":null,"dir":"Reference","previous_headings":"","what":"Collect hyperlinks from web pages — Collect.web","title":"Collect hyperlinks from web pages — Collect.web","text":"Collects hyperlinks web pages structures data dataframe class names \"datasource\" \"web\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.web.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collect hyperlinks from web pages — Collect.web","text":"","code":"# S3 method for class 'web' Collect(credential, pages = NULL, ..., writeToFile = FALSE, verbose = TRUE)  collect_web_hyperlinks(pages = NULL, writeToFile = FALSE, verbose = TRUE, ...)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.web.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collect hyperlinks from web pages — Collect.web","text":"credential credential object generated Authenticate class name \"web\". pages Dataframe. Dataframe web pages crawl. dataframe must columns page (character), type (character) max_depth (integer). row seed web page crawl, page value page URL. type value type crawl either \"int\", \"ext\" \"\", directing crawler follow internal links, follow external links (different domain seed page) follow links. max_depth value determines many levels hyperlinks follow seed site. ... Additional parameters passed function. used method. writeToFile Logical. Write collected data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.web.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collect hyperlinks from web pages — Collect.web","text":"tibble object class names \"datasource\" \"web\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.web.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collect hyperlinks from web pages — Collect.web","text":"","code":"if (FALSE) { # \\dontrun{ pages <- tibble::tibble(page = c(\"http://vosonlab.net\",                                  \"https://rsss.cass.anu.edu.au\"),                         type = c(\"int\", \"all\"),                         max_depth = c(2, 2))  webData <- webAuth |>   Collect(pages, writeToFile = TRUE) } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.youtube.html","id":null,"dir":"Reference","previous_headings":"","what":"Collect comments data for YouTube videos — Collect.youtube","title":"Collect comments data for YouTube videos — Collect.youtube","text":"function collects public comments data one YouTube videos using YouTube Data API v3 structures data dataframe class names \"datasource\" \"youtube\". YouTube quota unit system rate limit developers either 10,000 1,000,000 units per day. Many read operations cost base 1 unit retrieving individual comments, plus 1 2 units text snippets. Retrieving threads top-level comments text costs 3 units per request (maximum 100 comments per request). Using function video 250 top-level comments 10 reply comments 100 , cost (9 + 20) 29 quota units return 260 1260 total comments. currently limit 100 reply comments collected per top-level comment. information YouTube Data API v3 can found : https://developers.google.com/youtube/v3/getting-started","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.youtube.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collect comments data for YouTube videos — Collect.youtube","text":"","code":"# S3 method for class 'youtube' Collect(   credential,   videoIDs = c(),   maxComments = 1e+10,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.youtube.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Collect comments data for YouTube videos — Collect.youtube","text":"credential credential object generated Authenticate class name \"youtube\". videoIDs Character vector. Specifies YouTube video URLs IDs. example, video URL https://www.youtube.com/watch?v=xxxxxxxxxxx use URL ID videoIDs = c(\"xxxxxxxxxxx\"). maxComments Numeric integer. Specifies many top-level comments collect video. value consider replies top-level comments. total number comments returned video usually greater maxComments depending number reply comments present. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.youtube.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Collect comments data for YouTube videos — Collect.youtube","text":"tibble object class names \"datasource\" \"youtube\".","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.youtube.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Collect comments data for YouTube videos — Collect.youtube","text":"Due specifications YouTube Data API currently efficient specify exact number comments return API using maxComments parameter. maxComments parameter applied top-level comments replies comments. number comments collected usually greater expected. example, maxComments set 10 one videos 10 top-level comments 5 reply comments total number comments collected 15 video. Comments data multiple YouTube videos can requested single operation, maxComments applied individual video combined total comments.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Collect.youtube.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Collect comments data for YouTube videos — Collect.youtube","text":"","code":"if (FALSE) { # \\dontrun{ # list of YouTube video urls or ids to collect video_ids <- c(\"https://www.youtube.com/watch?v=xxxxxxxx\",                \"https://youtu.be/xxxxxxxx\",                \"xxxxxxx\")  # collect approximately 200 comments for each YouTube video youtubeData <- youtubeAuth |>   Collect(videoIDs = video_ids, maxComments = 200) } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.mastodon.html","id":null,"dir":"Reference","previous_headings":"","what":"Create mastodon activity network — Create.activity.mastodon","title":"Create mastodon activity network — Create.activity.mastodon","text":"Creates mastodon activity network collected posts. Nodes posts directed edges represent relationship posts one another.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.mastodon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create mastodon activity network — Create.activity.mastodon","text":"","code":"# S3 method for class 'activity.mastodon' Create(   datasource,   type,   subtype = NULL,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.mastodon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create mastodon activity network — Create.activity.mastodon","text":"datasource Collected social media data \"datasource\" \"mastodon\" class names. type Character string. Type network created, set \"activity\". subtype Character string. Subtype activity network created. Can set \"tag\". Default NULL. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.mastodon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create mastodon activity network — Create.activity.mastodon","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.mastodon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create mastodon activity network — Create.activity.mastodon","text":"","code":"if (FALSE) { # \\dontrun{ # create a mastodon activity network activity_net <- mastodon_data |> Create(\"activity\")  # create a mastodon tag relations network activity_net <- mastodon_data |> Create(\"activity\", \"tag\") } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.reddit.html","id":null,"dir":"Reference","previous_headings":"","what":"Create reddit activity network — Create.activity.reddit","title":"Create reddit activity network — Create.activity.reddit","text":"Creates reddit activity network subreddit thread comments. Nodes comments initial thread posts, edges form discussion structure signify comment post comment made .","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.reddit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create reddit activity network — Create.activity.reddit","text":"","code":"# S3 method for class 'activity.reddit' Create(datasource, type, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.reddit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create reddit activity network — Create.activity.reddit","text":"datasource Collected social media data \"datasource\" \"reddit\" class names. type Character string. Type network created, set \"activity\". ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.reddit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create reddit activity network — Create.activity.reddit","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.reddit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create reddit activity network — Create.activity.reddit","text":"","code":"if (FALSE) { # \\dontrun{ # create a reddit activity network graph activityNetwork <- redditData |> Create(\"activity\")  # network # activityNetwork$nodes # activityNetwork$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.web.html","id":null,"dir":"Reference","previous_headings":"","what":"Create web activity network — Create.activity.web","title":"Create web activity network — Create.activity.web","text":"Creates web page activity network pages. Nodes web pages.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.web.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create web activity network — Create.activity.web","text":"","code":"# S3 method for class 'activity.web' Create(   datasource,   type,   lcase = TRUE,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.web.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create web activity network — Create.activity.web","text":"datasource Collected social media data \"datasource\" \"web\" class names. type Character string. Type network created, set \"activity\". lcase Logical. Convert urls page names lowercase. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.web.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create web activity network — Create.activity.web","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.web.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create web activity network — Create.activity.web","text":"","code":"if (FALSE) { # \\dontrun{ # create a web activity network graph net_activity <- data_collect |> Create(\"activity\")  # network # net_activity$nodes # net_activity$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.youtube.html","id":null,"dir":"Reference","previous_headings":"","what":"Create YouTube activity network — Create.activity.youtube","title":"Create YouTube activity network — Create.activity.youtube","text":"Creates activity network collected YouTube video comment threads. Nodes top-level comments, reply comments videos. Edges directed nodes represent commenting activity.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.youtube.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create YouTube activity network — Create.activity.youtube","text":"","code":"# S3 method for class 'activity.youtube' Create(datasource, type, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.youtube.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create YouTube activity network — Create.activity.youtube","text":"datasource Collected social media data \"datasource\" \"youtube\" class names. type Character string. Type network created, set \"activity\". ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.youtube.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create YouTube activity network — Create.activity.youtube","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.activity.youtube.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create YouTube activity network — Create.activity.youtube","text":"","code":"if (FALSE) { # \\dontrun{ # create a YouTube activity network graph activityNetwork <- youtubeData |> Create(\"activity\")  # network # activityNetwork$nodes # activityNetwork$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.mastodon.html","id":null,"dir":"Reference","previous_headings":"","what":"Create mastodon actor network — Create.actor.mastodon","title":"Create mastodon actor network — Create.actor.mastodon","text":"Creates mastodon actor network posts. Mastodon users posted actor nodes. created network directed edges representing replies.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.mastodon.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create mastodon actor network — Create.actor.mastodon","text":"","code":"# S3 method for class 'actor.mastodon' Create(   datasource,   type,   subtype = NULL,   inclMentions = TRUE,   ...,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.mastodon.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create mastodon actor network — Create.actor.mastodon","text":"datasource Collected social media data \"datasource\" \"mastodon\" class names. type Character string. Type network created, set \"actor\". subtype Character string. Subtype actor network created. Can set \"server\". Default NULL. inclMentions Logical. Create edges users mentioned tagged posts. Default TRUE. ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.mastodon.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create mastodon actor network — Create.actor.mastodon","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.mastodon.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create mastodon actor network — Create.actor.mastodon","text":"","code":"if (FALSE) { # \\dontrun{ # create a mastodon actor network actor_net <- mastodon_data |> Create(\"actor\")  # create a mastodon server relations network actor_net <- mastodon_data |> Create(\"actor\", \"server\") } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.reddit.html","id":null,"dir":"Reference","previous_headings":"","what":"Create reddit actor network — Create.actor.reddit","title":"Create reddit actor network — Create.actor.reddit","text":"Creates reddit actor network thread comments subreddits. Users commented thread actor nodes comment replies represented directed edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.reddit.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create reddit actor network — Create.actor.reddit","text":"","code":"# S3 method for class 'actor.reddit' Create(datasource, type, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.reddit.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create reddit actor network — Create.actor.reddit","text":"datasource Collected social media data \"datasource\" \"reddit\" class names. type Character string. Type network created, set \"actor\". ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.reddit.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create reddit actor network — Create.actor.reddit","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.reddit.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create reddit actor network — Create.actor.reddit","text":"","code":"if (FALSE) { # \\dontrun{ # create a reddit actor network graph with comment text as edge attributes actorNetwork <- redditData |> Create(\"actor\")  # network # actorNetwork$nodes # actorNetwork$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.web.html","id":null,"dir":"Reference","previous_headings":"","what":"Create web actor network — Create.actor.web","title":"Create web actor network — Create.actor.web","text":"Creates web page domain network pages. Nodes site domains.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.web.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create web actor network — Create.actor.web","text":"","code":"# S3 method for class 'actor.web' Create(datasource, type, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.web.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create web actor network — Create.actor.web","text":"datasource Collected social media data \"datasource\" \"web\" class names. type Character string. Type network created, set \"activity\". ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.web.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create web actor network — Create.actor.web","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.web.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create web actor network — Create.actor.web","text":"","code":"if (FALSE) { # \\dontrun{ # create a web actor network graph net_activity <- data_collect |> Create(\"actor\")  # network # net_activity$nodes # net_activity$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.youtube.html","id":null,"dir":"Reference","previous_headings":"","what":"Create YouTube actor network — Create.actor.youtube","title":"Create YouTube actor network — Create.actor.youtube","text":"Creates YouTube actor network comment threads YouTube videos. Users made comments video (top-level comments) users replied comments actor nodes. comments represented directed edges actors. video id also included actor node, representative videos publisher top-level comments directed edges towards .","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.youtube.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create YouTube actor network — Create.actor.youtube","text":"","code":"# S3 method for class 'actor.youtube' Create(datasource, type, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.youtube.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create YouTube actor network — Create.actor.youtube","text":"datasource Collected social media data \"datasource\" \"youtube\" class names. type Character string. Type network created, set \"actor\". ... Additional parameters passed function. used method. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.youtube.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create YouTube actor network — Create.actor.youtube","text":"Network named list two dataframes containing $nodes $edges.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.actor.youtube.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create YouTube actor network — Create.actor.youtube","text":"","code":"if (FALSE) { # \\dontrun{ # create a YouTube actor network graph actorNetwork <- youtubeData |> Create(\"actor\")  # network # actorNetwork$nodes # actorNetwork$edges } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.html","id":null,"dir":"Reference","previous_headings":"","what":"Create networks from social media data — Create","title":"Create networks from social media data — Create","text":"function creates networks social media data produced Collect. Create final step Authenticate, Collect Create workflow.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create networks from social media data — Create","text":"","code":"Create(datasource, type, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Create.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create networks from social media data — Create","text":"datasource Collected social media data class \"datasource\" socialmedia. type Character string. Type network created, can \"activity\", \"actor\", \"twomode\" \"semantic\". ... Optional parameters pass functions providied supporting R packages used social media network creation. writeToFile Logical. Write data file. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Graph.html","id":null,"dir":"Reference","previous_headings":"","what":"Create an igraph graph from network — Graph","title":"Create an igraph graph from network — Graph","text":"Create igraph graph network","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Graph.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create an igraph graph from network — Graph","text":"","code":"Graph(net, directed = TRUE, ..., writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Graph.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create an igraph graph from network — Graph","text":"net named list dataframes nodes edges generated Create. directed Logical. Create directed graph. Default TRUE. ... Additional parameters passed function. used method. writeToFile Logical. Save graph file current working directory. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Graph.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create an igraph graph from network — Graph","text":"igraph object.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/ImportRtoot.html","id":null,"dir":"Reference","previous_headings":"","what":"Import rtoot collected data — ImportRtoot","title":"Import rtoot collected data — ImportRtoot","text":"Imports rtoot collected data rda rds saved object file rtoot dataframe. Ensures datasource specified socialmedia type set data usable Create functions. required collected data collected vosonSML saved rds file, use readRDS instead.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/ImportRtoot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Import rtoot collected data — ImportRtoot","text":"","code":"ImportRtoot(data)  import_rtoot(data)"},{"path":"https://vosonlab.github.io/vosonSML/reference/ImportRtoot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Import rtoot collected data — ImportRtoot","text":"data Character string dataframe. File path tibble collected data rtoot.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/ImportRtoot.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Import rtoot collected data — ImportRtoot","text":"dataframe suitable input mastodon network Create functions.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/ImportRtoot.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Import rtoot collected data — ImportRtoot","text":"supports rtoot data collected using get_timeline_hashtag, get_timeline_public, get_status, get_context functions.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/ImportRtoot.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Import rtoot collected data — ImportRtoot","text":"","code":"if (FALSE) { # \\dontrun{ # import rtoot collected data from dataframe collect_mast <- ImportRtoot(rtoot_data)  # import rtoot collected data from file collect_mast <- ImportRtoot(\"./rtoot_search_n100.rds\") } # }"},{"path":"https://vosonlab.github.io/vosonSML/reference/Merge.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge collected data — Merge","title":"Merge collected data — Merge","text":"Merge collected data","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Merge.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge collected data — Merge","text":"","code":"Merge(..., unique = TRUE, rev = TRUE, writeToFile = FALSE, verbose = TRUE)  merge_data(..., unique = TRUE, rev = TRUE, writeToFile = FALSE, verbose = TRUE)"},{"path":"https://vosonlab.github.io/vosonSML/reference/Merge.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge collected data — Merge","text":"... Collect data merge. unique Logical. Remove duplicates based observation id. Default TRUE. rev Logical. Reverses order observations removing duplicates. collect data provided chronologically ensure recent copy duplicate kept. Default TRUE. writeToFile Logical. Save data file current working directory. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/Merge.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge collected data — Merge","text":"merged Collect object.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/MergeFiles.html","id":null,"dir":"Reference","previous_headings":"","what":"Merge collected data files — MergeFiles","title":"Merge collected data files — MergeFiles","text":"Merge collected data files","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/MergeFiles.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Merge collected data files — MergeFiles","text":"","code":"MergeFiles(   path = \".\",   pattern = \"(?-i).+?\\\\.rds$\",   unique = TRUE,   rev = TRUE,   writeToFile = FALSE,   verbose = TRUE )  merge_files(   path = \".\",   pattern = \"(?-i).+?\\\\.rds$\",   unique = TRUE,   rev = TRUE,   writeToFile = FALSE,   verbose = TRUE )"},{"path":"https://vosonlab.github.io/vosonSML/reference/MergeFiles.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Merge collected data files — MergeFiles","text":"path Directory path Collect data merge. Default working directory. pattern Regular expression (regex) matching file names merge. unique Logical. Remove duplicates based observation id. Default TRUE. rev Logical. Reverses order observations removing duplicates. collect data provided chronologically ensure recent copy duplicate kept. Default TRUE. writeToFile Logical. Save data file current working directory. Default FALSE. verbose Logical. Output additional information. Default TRUE.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/MergeFiles.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Merge collected data files — MergeFiles","text":"merged Collect object.","code":""},{"path":"https://vosonlab.github.io/vosonSML/reference/vosonSML-package.html","id":null,"dir":"Reference","previous_headings":"","what":"vosonSML: Collecting Social Media Data and Generating Networks for Analysis — vosonSML-package","title":"vosonSML: Collecting Social Media Data and Generating Networks for Analysis — vosonSML-package","text":"suite easy use functions collecting social media data generating networks analysis. Supports Mastodon, YouTube, Reddit Web 1.0 data sources.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/reference/vosonSML-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"vosonSML: Collecting Social Media Data and Generating Networks for Analysis — vosonSML-package","text":"Maintainer: Bryan Gertzel bryan.gertzel@anu.edu.au Authors: Robert Ackland robert.ackland@anu.edu.au (ORCID) Timothy Graham (ORCID) contributors: Francisca Borquez [contributor]","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-35-0","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.35.0","text":"Changed reddit https collection method platform issues httr packages Windows. Removed failing S3 dispatch methods Graph function. Replaced httr request methods httr2 versions.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-35-0","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.35.0","text":"Removed twitter functions package.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-35-0","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.35.0","text":"Added writeToFile methods. Added Merge support mastodon. Changed voson.msg option voson.cat cat message output. Changed verbose message technique verbose = TRUE now default functions.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-34-3","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.34.3","text":"Disabled metadata logging occurs writeToFile parameter Collect used. due new package issue R version 4.4.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-34-2","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.34.2","text":"Fixed reddit data collection issue threads specified using shorter URL’s without title part contain continue thread links. links resolving main thread resulting duplication comments thread structures.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-34-1","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.34.1","text":"Added parameter Mastodon network Create() function named subtype creating variations activity actor networks. activity network subtype = tag parameter can used create tag network post tags colocated. actor network subtype = server parameter can used create server network, actor network reduced server associations.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-34-0","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.34.0","text":"Added Mastodon authentication, collection network creation. two options Mastodon collection, hashtag search global local server timeline posts optionally authenticated: Collect.search.mastodon(), public thread collection function using input URL’s similar Reddit thread collection requires authentication: Collect.thread.mastodon(). access methods via Collect endpoint = \"search\" endpoint = \"thread\" parameter passed functions. Mastodon authentication collection uses rtoot package function created importing rtoot data vosonSML called ImportRtoot. Imported data can passed input Create network functions.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-34-0","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.34.0","text":"Changed default Reddit request wait time range 3 5 seconds, 6 8 seconds avoid proposed platform rate limit 10 requests per minute. value can still manually set using waitTime = c(min, max) wait time range parameter.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-33-2","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.33.2","text":"Fixed bug regex Reddit URL parsing thread ID’s limited 6 characters. Fixed verbose output 2mode networks use option specified method. Fixed issue adding text Twitter networks caused missing columns data. Added twitter tokenization functions recently removed tidytext tokenizers packages due change ICU library unicode standard stringi package (tokenizers issue #82). affects generation semantic 2mode twitter networks fix maintains functionality alternative tweet tokenization method implemented. Unfortunately two twitter network types supported systems using ICU library versions >= 72.0 time. Fixed intermitant column mismatch error Twitter caused unexpected type data merging. Fixed number tweet observations match number users error reported rtweet v1.1. Fixed number tweets requested count verbose message Twitter timeline collection. Fixed bug Reddit thread collection URL’s missing trailing slashes trigger loop protection errors. Changed default sort parameter value Reddit threaad collection NA. Default sort order Reddit fixed value.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-33-2","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.33.2","text":"Added sort parameter Reddit collection. collection method limited, may useful request comments sort order using Reddit sort options top, new, controversial, old, qa best. Added Collect.listing function subreddits Reddit. search, however allows complete metadata specified number subreddit threads collected sorted order. sort options hot, top, new rising. time parameter period can set hour, day, week, month, year sort = top, meaning example, results sorted top threads last week.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-33-2","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.33.2","text":"Added simple log file output Collect Merge functions writeToFile = TRUE. log file written location data file .txt extension appended. Changed data output path option option(voson.data = \"-data\") now attempt create directory exist.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-32-8","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.32.8","text":"Fixed two issues arose introduction tibbles verbose messaging Collect.reddit(). Fixed error caused unescaped regex parameters hyperlinks processed Collect.web() (#49).","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"vosonsml-0327","dir":"Changelog","previous_headings":"","what":"vosonSML 0.32.7","title":"vosonSML 0.32.7","text":"CRAN release: 2022-08-16","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-32-7","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.32.7","text":"Re-wrote modified vosonSML Twitter functions support major changes made rtweet release version 1.0.2. Added endpoint parameter Twitter Collect function. set search default, usual collect behaviour, can also now set timeline collect user timelines instead. See Collect.timeline.twitter() parameters. Changed output message system. vosonSML functions now silent default. Using verbose parameter print function output. Changed output messages use message() function instead cat() function default. Setting global option option(voson.msg = FALSE) redirect output cat(). option can removed assigning value NULL. Added voson.data option allowing directory path set writeToFile output files. Files output current working directory default, however new directory can now set option(voson.data = \"-data\") example. directory path can relative full path, must created beforehand already exist. path invalid exist continue default behaviour. option can removed assigning value NULL. effect file write operations performed user. Twitter AddText() AddUserData() functions now work Twitter network types. AddText() now adds columns embedded tweet text hashtags parameter add list tweet hashtags network attribute. AddUserData() now adds additional dataframe missing_users. lists ids screen names users metadata embedded collected data. Using lookupUsers parameter retrieve metadata using twitter API. Additonally passing refresh = TRUE parameter now retrieve update metadata users network. Twitter data collection now returns named list two dataframes containing tweets users. Removed ImportData function replaced ImportRtweet() rtweet version 1.0 format data. Added Merge() MergeFiles() functions support merging collected data separate operations. functions support input multiple Collect objects .RDS files, automatically detect datasource type support writeToFile parameter file output merged data.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-32-7","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.32.7","text":"Re-wrote YouTube id extraction url function robust added support YouTube shorts urls. Removed stand-alone GetYoutubeVideoIDs function. YouTube collect function parameter videoIDs now accept video ids video urls. Added wrappers aliases functions. Twitter auth objects can now created simplified auth_twitter_app(), auth_twitter_dev() auth_twitter_user() functions token type. collect_reddit_threads() collect_web_hyperlinks() functions skip unecessary Authenticate step Reddit web data collection.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-31-1","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.31.1","text":"Incorrectly ordered tweets status ID summarise collected tweet range. Min ID Max ID necessarily earliest latest tweet tweets collected therefore ideal delimiting subsequent collections. Instead two Earliest Obs two Latest Obs tweets returned Twitter API now reported.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-31-1","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.31.1","text":"Added enpoint parameter Collect, allowing search timeline specified twitter data collection. specified default twitter search. timeline collection accepts users vector user names ID’s mixture , return 3,200 users recent tweets. Minimum required version R changed 3.6 4.1.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-31-1","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.31.1","text":"Updated standard package documentation, added citation, code conduct README.Rmd. Replaced magrittr pipes native pipe operators.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-30-6","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.30.6","text":"Updated standard package documentation, added citation README.Rmd.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-30-5","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.30.5","text":"Re-implemented Create.actor.twitter Create.activity.twitter use dplyr data.table techniques consistent package network creation functions. functions significantly faster large collection dataframes.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-30-5","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.30.5","text":"Create.actor.twitter includes two new parameters mentions, inclMentions process include mentions edges network inclRtMentions process include mentions found retweets. inclMentions parameter set TRUE default inclRtMentions set FALSE. inclRtMentions parameter subset mentions, therefore set TRUE, inclMentions must also TRUE. Re-implemented simplified Create.activity.twitter network creation. Added author_id author_screen_name nodes assist labels re-creating tweet URLs data. Added rmEdgeTypes parameter Create.activity.twitter Create.actor.twitter. accept list edge types can filtered network network creation. Removed label attributes igraph graphs generated Graph function. Tidied renamed many utils functions. Removed unused functions. Added last observation tweet minimum maximum status ID values reported twitter collections. Usually last observation Min ID , sometimes Min ID outside expected collection range. last observation reliable tweet use starting point subsequent search collections. Cleaned package imports, suggests added interactive package checks reduce number required imports.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-30-0","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.30.0","text":"Added web crawler Collect method hyperlink network creation. Create function activity type parameter creates network nodes web pages edges hyperlinks linking (extracted href HTML tags). actor network page site domains nodes hyperlinks linking pages domains.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-14","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.14","text":"Prepending instead appeneding S3 class names Collect dataframes avoid dplyr issues. Removed retryOnRateLimit set FALSE rate limit determined. ImportData now accept file path dataframe.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-29-14","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.29.14","text":"S3 class names added Collect dataframes writeToFile. longer required manually add class names use ImportData load RDS files use previously saved data Create functions.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"vosonsml-02913","dir":"Changelog","previous_headings":"","what":"vosonSML 0.29.13","title":"vosonSML 0.29.13","text":"CRAN release: 2020-07-18","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-13","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.13","text":"Specified tidyr, tidytext stopwords package requirements descriptions examples Updated references twomode networks 2-mode possible","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-29-12","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.29.12","text":"Fixed issue custom classes assigned dataframes causing vctrs error using dplyr functions. classes longer needed post-method routing simply removed. Replaced instance deprecated dplyr::funs function generating warning.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-12","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.12","text":"Minor documentation updates.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-29-11","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.29.11","text":"Fixed reddit collect bind_rows error joining dataframes different types structure column. Column type set integer instead character cases every thread comment replies depth (except OP).","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"vosonsml-02910","dir":"Changelog","previous_headings":"","what":"vosonSML 0.29.10","title":"vosonSML 0.29.10","text":"CRAN release: 2020-04-25","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-10","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.10","text":"Reimplemented Create.semantic.twitter Create.twomode.twitter functions using tidytext package. now better support tokenization tweet text allows range stopword lists sources used stopwords package. semantic network function requires tidytext tidyr packages installed use. Numbers urls can removed included term list using removeNumbers removeUrls, default value TRUE. assoc parameter added choose node associations ties include network. default value \"limited\" includes ties frequently occurring hashtags terms tweets. value full also include ties frequently occurring hashtags hashtags, terms terms creating densely connected network. Parameters specify stopwords language e.g stopwordsLang = \"en\" source e.g stopwordsSrc = \"smart\" added. correspond language source parameters tidytext::get_stopwords function. stopwords default value TRUE. network produced Create.twomode.twitter function weighted default can disabled setting new weighted parameter FALSE. Renamed replies_from_text parameter repliesFromText at_replies_only atRepliesOnly AddText.actor.youtube function consistency. Improved usage examples README file. Removed tm package dependency.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-9","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.9","text":"Updated Introduction vosonSML vignette Merging Collected Data examples. Added new hex sticker package documentation.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-29-9","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.29.9","text":"Fixed logic problem Collect.youtube causing video comments collected reply comments videos first maxComments number top level comments. example, maxComments set 100 first 100 comments made video replies results returned.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-29-8","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.29.8","text":"recent intermittent problem Twitter API caused issue rtweet::rate_limit function resulted error using rtweet retryonratelimit search parameter. rate_limit function called vosonSML check twitter rate limit regardless whether search parameter set , failing Collect error. fix made vosonSML checks rtweet::rate_limit succeeds, automatically sets retryonratelimit FALSE twitter Collect can still performed without error problem occur .","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-8","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.8","text":"Added links pkgdown site navbar.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-7","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.7","text":"Added guidance merging collected data Introduction vosonSML vignette.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-6","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.6","text":"Added Introduction vosonSML vignette package. Minor changes input checks added ImportData. Added unit testing Authenticate ImportData.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-5","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.5","text":"Reddit JSON now retrieved using jsonlite::fromJSON. Reddit ‘Continue’ threads now followed additional thread requests. Many comments now collected threads large diameters breadth. Continue threads also Reddit limit 500 comments per thread request. Reddit comment ID’s timestamps now extracted. Removed tictoc package dependency imports suggested packages. Added checks whether rtweet package installed. Removed RedditExtractoR package imports. HTML decoded tweet text network creation replace ‘&’, ‘<’, ‘>’ HTML codes. Added node type attribute twomode networks.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"vosonsml-0294","dir":"Changelog","previous_headings":"","what":"vosonSML 0.29.4","title":"vosonSML 0.29.4","text":"CRAN release: 2019-11-23","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-4","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.4","text":"Renamed bimodal networks twomode.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-3","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.3","text":"Added output messages supplemental functions AddText() Graph(). Also improved consistency output messages Collect Create functions.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-29-3","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.29.3","text":"Added fix reddit gsub locale error https://github.com/vosonlab/vosonSML/issues/21. Changed bimodal network hashtags lowercase filter terms entered converted lowercase. Fixed errors thrown removing terms bimodal semantic networks. Removed duplicate GetVideoData() function call AddVideoData. Fixed data type errors AddText functions related strict typing dplyr::if_else function.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-2","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.2","text":"feature added youtube actor AddText function redirect edges towards actors based presence screen name @screen name may found beginning reply comment. Typically reply comments directed towards top-level comment, instead captures reply comments directed commenters thread.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-1","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.1","text":"Changed youtube actor network identifiers unique Channel ID instead screen names. Created AddVideoData function add collected video data youtube actor network. main purpose function replace video identifiers Channel ID video publisher (actor) instead. get Channel ID video publishers additional API lookup videos network required. Additional columns video Title, Description Published time also added network $edges dataframe well returned dataframe called $videos.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-29-0","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.29.0","text":"Created AddText function add collected text data networks. feature applies activity actor networks typically add node attribute activity networks edge attribute actor networks. example, function add column vosonTxt_tweets containing tweet text $nodes passed activity network, $edges passed actor network. Generation igraph graph objects subsequent writing file removed Create function placed new function Graph. change abstracts graph creation makes optional, also allows supplemental network steps AddText performed prior creating final igraph object.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-29-0","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.29.0","text":"Removed writeToFile parameter Create functions added Graph. Removed weightEdges, textData cleanText parameters Create.actor.reddit. cleanText now parameter AddText.activity.reddit AddText.actor.reddit. Replaced AddTwitterUserData AddUserData function works similarly AddText. function currently applies twitter actor networks add, download add missing, user profile information actors node attributes.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-28-1","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.28.1","text":"Added activity network type reddit. reddit activity network nodes thread posts comments, edges represent comments directed threads. Added github dev version badge README.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-28-0","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.28.0","text":"Added new activity network type twitter youtube Create function. network nodes items collected tweets returned twitter search comments posted youtube videos. Edges represent platform relationship tweets comments.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-27-3","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.27.3","text":"Added new twitter actor network edge type self-loop. aims facilitate later addition tweet text network graph user tweets ties users.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"vosonsml-0272","dir":"Changelog","previous_headings":"","what":"vosonSML 0.27.2","title":"vosonSML 0.27.2","text":"CRAN release: 2019-07-18","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-27-2","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.27.2","text":"Added twitter interactive web authorization app provided rtweet::create_token. Method used twitter app name consumer keys passed Authenticate.twitter parameters. e.g Authenticate(\"twitter\", appName = \"App\", apiKey = \"xxxxxxxxxxxx\",   apiSecret = \"xxxxxxxxxxxx\"). browser tab open asking user authorize app twitter account complete authentication. using twitters Application-user authentication: OAuth 1a (access token user context) method. suspected Reddit rate-limiting generic R UA strings. User-Agent string now set underlaying R Collect functions (e.g file) via HTTPUserAgent option. temporarily set package name current version number Collect e.g vosonSML v.0.27.2 (R Package). Removed hex sticker (favicons pkgdown site).","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-27-1","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.27.1","text":"Fixed bug Create.semantic.twitter sum operation calculating edge weights set NA values edges due NA values present hashtag fields. occurs tweets hashtags twitter collection now checked. UTF encoding issues Create.semantic.twitter also fixed.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-27-1","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.27.1","text":"Added ‘#’ hashtags ‘@’ mentions twitter semantic network differentiate hashtags, mentions common terms.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-27-0","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.27.0","text":"Fixed bug Collect.twitter additional twitter API parameters e.g lang passed properly rtweet::search_tweets. resulted additional parameters ignored.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-27-0","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.27.0","text":"Removed SaveCredential LoadCredential functions, well useCachedToken parameter Authenticate.twitter. simply calling saveRDS readRDS functions performing additional processing. Using saveRDS readRDS directly save load Authenticate credential object file simpler. Changed way cleanText parameter works Create.actor.reddit permissive. Addresses encoding issues apostrophes pound symbols removes unicode characters permitted XML 1.0 standard used graphml files. best effort resolve reddit text encoding issues.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-27-0","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.27.0","text":"Added Collect.twitter summary information includes earliest (min) latest (max) tweet status_id collected timestamp. status_id values can used frame subsequent collections since_id max_id parameter values. date parameter used timestamp can also used quick confirmation. Added elapsed time output Collect method.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"vosonsml-0263","dir":"Changelog","previous_headings":"","what":"vosonSML 0.26.3","title":"vosonSML 0.26.3","text":"CRAN release: 2019-02-22","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-26-3","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.26.3","text":"Fixed bugs Create.actor.reddit incorrectly creating edges top-level commentors thread authors different threads. bugs observable collecting multiple reddit threads.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-26-3","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.26.3","text":"Improved output reddit collection. Removed progress bar added table results summarising number comments collected thread. Added twitter collection output users twitter API reset time.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"bug-fixes-0-26-2","dir":"Changelog","previous_headings":"","what":"Bug Fixes","title":"vosonSML 0.26.2","text":"Fixed bug Create.actor.twitter Create.bimodal.twitter vertices dataframe provided graph_from_data_frame function contained duplicate names raising error.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-26-2","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.26.2","text":"Revised updated roxygen documentation examples package functions. Updated Authenticate, Collect Create S3 methods implement function routing based object class names.","code":""},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"minor-changes-0-26-2","dir":"Changelog","previous_headings":"","what":"Minor Changes","title":"vosonSML 0.26.2","text":"Created pkgdown web site github hosted package documentation. Created new hex sticker logo.","code":""},{"path":[]},{"path":"https://vosonlab.github.io/vosonSML/news/index.html","id":"major-changes-0-25-0","dir":"Changelog","previous_headings":"","what":"Major Changes","title":"vosonSML 0.25.0","text":"Replaced twitteR twitter collection implementation rtweet package. users twitter authentication token can now cached .twitter_oauth_token file used subsequent twitter API requests without re-authentication. new authentication token can cached deleting file using re-using parameter useCachedToken = TRUE.","code":""}]
