Photo from SoftwareAdvice.com

Twitter Sentiment Analysis

Photo from SoftwareAdvice.com

Twitter Sentiment Analysis

A study on the public opinion about the topic “Bitcoin” by performing a sentiment analysis of 6000 tweets in Twitter having the hashtag “#Bitcoin” from Dec 1, 2017 to Dec 21, 2017.

Work Done:

  • Extracted tweets using the “twitteR” library in R.
  • Cleaned the text by removing graphical characters (e.g. emoji), removing punctuation, transforming the text to lowercase, removed common words (e.g. grammatical words, words common to the topic) and finally removed URLs from the text using regex.
  • Made a corpus of documents out of them using the ‘tm’ library in R.
  • Visualized the most popular terms using wordcloud and barplot.
  • Performed sentiment analysis through lexical method by using the list of AFINN positive and negative words to determine a sentiment score of each tweet.

Conclusion:

  • So in the end, apart from the majority neutral tweets (54.1%) meaning that people are still wary about the fluctuations in bitcoin prices, the number of positive tweets (27.5%) outweighed the negative ones (18.3%) majority are hoping about the growth in the prices due to investor optimism
Avatar
Sandeep Gunda
Aspiring Data Scientist