Sentiment Analysis on ‘The Mandalorian’

Divya Chandana
The AI Guide
Published in
5 min readFeb 6, 2021

--

Analyzing Sentiment through X.com Discussions

Introduction

A long time ago in a galaxy far, far away….

The Mandalorian, Disney’s Star Wars TV show has absolutely satisfied its significant publicity, launching a wide exhibit of online conversations and a considerably more extensive ‘Baby Yoda’ pictures. The show has formally gotten the most in-demand show all over the world, outperforming Game of Thrones, Stranger Things, and other well known shows.

As a Star Wars show, obviously, the show has quite possibly the most mainstream establishments to draw from, yet its utilization of Western and Samurai-film motivation and figures of speech have added a ton of plot intricacy and allow an intriguing investigation of the Star Wars universe.

I believe it became more famous because of baby yoda(Grogu) and Mando’s chemistry. Let’s dig deep into what analytics says.

How twitter data answers the question?

Setting up

Install python3

Apply and create Twitter developer account

Create project and app in the developer account

Find bearer token and key-tokens for the app

Libraries

twitter api keys setup

Encountered Bugs

TextBlob is not defined

Issue Fix

Run the following command in the command prompt, it will fix the verifies the certificate. Then we can install the TextBlob package from pip

Why Tweepy?

In my view Tweepy is really good. Its documentation incorporates instructional exercises for everything from authentication to streaming, and incorporates an API reference for the entirety of its methods.

Beginning from zero insight, you ought to have the option to begin with Tweepy instantly to download timetables, client data or play out a pursuit in the blink of an eye.

List of Tweets that we got are here

But the above tweets have lot of url links, currently we are not using them so we will be removing them with regular expression.

Cleaned tweets

Need to clean more

One of the significant types of pre-processing will be filtering unimportant information. In (NLP), they will be called as stop words. The common stop words are (“the”, “a”, “in”, “a” etc..,)

Frequently discussed words

Firstly, how about we take a look at word frequencies and attempt to realize which words are being utilized the most. To keep the pertinence, instead of using various tweets, which is a huge number of tweets, we will take a look at just the 1000 tweets about the Mandalorian.

Using itertools and collections libraries we got word frequencies. We will have a look at top 15 frequently used words

Lets plot the data to graph to visualize our frequency words result

Observations :

Twitter folks are majorly using the words, “themandalorian” the most, following “starwars”, “grogu”, “babyyoda”, “episode” etc.,. Grogu (Baby Yoda) is the cutest character of all. It appears to be that people are keen on the characters the Mandalorian and Baby Yoda. They are additionally making references to the Star Wars Franchise, discussing about every episode, and more.

Exploratory data analysis

Sentiment analysis is the automated process of identifying and classifying subjective information in text data.The most well-known kind of sentiment analysis is ‘polarity detection’ and includes classifying results as Neutral, Negative or Positive.

If the polarity is greater than Zero then sentiment is positive. If its equal to Zero then sentiment is neutral. Finally, If polarity is lesser-than Zero then sentiment is negative.

Lets plot the result to understand things better

It’s so obvious from the graph, most of the tweets are positive. We still have some negative tweets, it might be because of some negative controversies surrounding replacing some cast from the show.

Conclusion

From the Explanatory Data Analysis we can conclude that the characters Mando and Grogu had a very great chemistry and lot of positivity. However, the popularity of show is not only because of the current actors but also their previous shows for example “Narcos” a huge show in Netflix, Mandalorian acts as Javier Peña. And also the influence of mainstream StarWars background and characters like Luke Skywalker, Storm Troopers etc.,. The limitation of the current analysis is not considering the above mentioned points.

References

--

--