Skip to content

Sentiment analysis of Youtube comments, likes, and dislikes to determine the emotional tone they carry, whether they’re positive, negative, or neutral to ascertain the author’s attitude towards a topic.

Notifications You must be signed in to change notification settings

NiveditaSureshK/Youtube-Text-Data-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Youtube-Text-Data-Analysis

The revolution of social media sites has also attracted the users towards video sharing sites, such as YouTube. The online users express their opinions or sentiments on the videos that they watch on such sites.

According to the latest YouTube statistics, the video-sharing platform has 2.6 billion users worldwide as of 2022 (Statista, 2022). It’s ranked as the second-most popular social network, and the only platform that has more active users than YouTube is Facebook.

The objective is to automatically recognize and categorize opinions expressed in the comments to determine overall sentiment of the user.

Sentiment analysis helps data analysts within large enterprises gauge public opinion, conduct nuanced market research, monitor brand and product reputation, and understand customer experiences.

Business Problem Statements

Observations on the following are made:

  1. Sentiment analysis on YouTube comments.
  2. Exploratory data analysis on positive sentences
  3. Exploratory data analysis on negative sentences.

Dataset

  • The dataset includes data gathered from the (up to) 200 listed videos on YouTube that are contained within the trending category each day in the US.
  • The headers in the comments file are:
    • video_id
    • comment_text
    • likes
    • replies

Data Analysis Using Python

  1. Polarity determination using TextBlob
  2. WordCloud representation of sentiments
  3. Removal of StopWords
  4. Emoji’s Analysis

Polarity determination using TextBlob

  • Use TextBlob's sentiment feature to determine polarity for each comment.
  • Polarity values range from -1 to +1.

image

WordCloud representation of sentiments

  • Perform WordCloud of positive and negative sentences.
  • To generate a word cloud, convert all comments into string format using the join function.
  • Polarity 1 indicates a positive sentence, polarity -1 indicates a negative sentence.

image

Removal of STOPWORDS

  • As you can see from the below image, the highlighted words don't add any value to the sentiments.

image

  • Remove stop words using WordCloud's Stopword feature, which already has all the stop words present, to get the precise WordCloud, otherwise inaccurate data will be provided.

Positive WordCloud

image

Negative WordCloud

image

Emoji’s Analysis

  • Extract emojis from comments for analysis.
  • The frequency of each emoji can be calculated using the counter feature in Collections libraries.
  • Counter's most_common function will return the top 10 emojis that are frequently used.
  • Separate emojis and frequency in order to plot a graph using plotly.

image

Tools Used

Jupyter Notebook Python Pandas Matplotlib Plotly NumPy

  • Jupyter Notebook is used as IDE.
  • Among the Python libraries, Pandas and NumPy are used for handling data, preprocessing, and mathematical operations, respectively.
  • Plotly, Seaborn, and Matplotlib are used for visualizing plots.

For more details, please go through the Jupyter Notebook attached above.

About

Sentiment analysis of Youtube comments, likes, and dislikes to determine the emotional tone they carry, whether they’re positive, negative, or neutral to ascertain the author’s attitude towards a topic.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published