Collect YouTube comments and create networks for analysis with VOSONDash
This guide provides a practical demonstration for collecting comments from YouTube videos and constructing networks, using the VOSON Lab’s interactive R/Shiny app VOSONDash.
The GitHub page provides instructions to install and run VOSONDash. More information on features can be accessed in the VOSONDash Userguide(Borquez et al. 2020).
As for Twitter, YouTube collection requires API keys, which are provided via the Google API console. Similarly, we enter the key in the API Keys
window, YouTube
tab in VOSONDash and the token can be saved to disk for future use.
In this example, we are collecting comments from a YouTube video titled Update on reinfection caused by Omicron variant, which was uploaded by the World Health Organization (WHO) on 5th December 2021 and had attracted 182 comments at the time of data collection (17 December 2021).
VOSONDash (via vosonSML
) provides two types of YouTube networks:
Activity networks – nodes are either comments or videos (videos represent a starting comment), and edges are interactions between comments. In this example, there are 119 nodes and 118 edges. The most central node is the initial post, which receives 100 comments.
Actor networks – nodes are users who have commented on videos and the videos themselves are included in the network as special nodes. Edges are the interactions between users in the comments. We can distinguish two types of edges “top-level comment,” which is a reply to the initial post (video), and “reply to a reply,” when users mention the username of the person they are replying to. In this example, there are 81 nodes and 119 edges. The most central node is the initial post, which receives 110 comments.
The Blog post Analysing online networks with VOSONDash provides more detail into features for network analysis, network visualisation and text analysis.
Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".
For attribution, please cite this work as
Borquez (2021, Dec. 6). VOSON Lab Code Blog: Collecting YouTube comments with VOSONDash. Retrieved from https://vosonlab.github.io/posts/2021-12-06-collecting-youtube-comments-with-vosondash/
BibTeX citation
@misc{borquez2021collecting, author = {Borquez, Francisca}, title = {VOSON Lab Code Blog: Collecting YouTube comments with VOSONDash}, url = {https://vosonlab.github.io/posts/2021-12-06-collecting-youtube-comments-with-vosondash/}, year = {2021} }