Analyze Sentiment of Tweets & Feedback in Google Sheets

Analyze Sentiment of Tweets & Feedback in Google Sheets

With sentiment analysis in Google Sheets, you can automatically organize data by sentiments positive, negative, and neutral. 

Say that you have thousands of rows of customer feedback, product reviews, or tweets, and you want to understand if customers are happy or angry, without having to read each text. You’d use a machine learning model, like this free online sentiment analyzer to go through these texts in a matter of seconds.

To start using this pre-built tool directly in Google Sheets, you’ll just need to get MonkeyLearn’s text analysis add-on and enter your API key.

In this post, we’ll go over how to use MonkeyLearn’s Google Sheets add-on and API service in more detail, so you can analyze text at scale.

Tutorial: Sentiment Analysis in Your Spreadsheets

Adding value to your spreadsheets by performing sentiment analysis is pretty straightforward. No previous coding experience is needed. With MonkeyLearn’s text analysis Google Sheets add-on, you are a couple of clicks away from analyzing sentiment and much more.

Just  follow these 4 simple steps:

1. Install MonkeyLearn’s Add-on for Text Analysis

Go to the Add-ons menu in Google Sheets and click Get Add-ons:

Installing the add-on for sentiment analysis in Google Sheets

Installing the add-on

Then, search for MonkeyLearn in the Google Sheets marketplace and fet the add-on for free:

2. Insert Your API Key

Once you have installed MonkeyLearn’s Google Sheets add-on, you will have to insert your API Key.

Go here to get your API Key. Copy your key to your clipboard and go to the Add-ons menu, MonkeyLearn, and click Set token. A pop up with a textbox will appear for you to type or paste your API Key:

Inserting the API key

3. Upload The Data You Want to Analyze

You are now ready to import or upload the data you want to analyze. Once you have your data in your spreadsheet, organize the texts you want to analyze in one column.

Then, go to Add-ons, MonkeyLearn, _and click _Start: 

Starting the add-on on Google Sheets

A docked box will appear to the right of your screen. The box is divided into two sections: the model selection and the data selection sections:

The docked box on the right of the screen

First, choose the model you would like to use in your analysis. In this case, choose Sentiment Analysis, a pre-trained and ready-to-use model on MonkeyLearn. You can also use a custom model for sentiment analysis by choosing Use another model ID and providing the model ID of your model.

Second, choose the data you would like to analyze. You can do so by selecting the Active Range radio button to analyze the cells you have selected on the spreadsheet. Alternatively, you can click the Column or range radio button and type the range of cells that contains the data you would like to analyze:

Typing the range of cells that contains the data

Remember: The add-on does not allow submitting more than one range of cells (e.g. A2:A3000; A5000:A7000). If you provide more than one range of cells, MonkeyLearn will only analyze the last one in the series.

4. Run Sentiment Analysis

Click Run in MonkeyLearn’s add-on box to run the sentiment analysis on your text. By default, the results will be inserted in one or more columns to the right of the column that contains the texts.

Things you might want to try…

Twitter Sentiment Analysis in Google Sheets

How positive or negative are tweets about your  brand, or products? We have created a Twitter Sentiment Analysis Model to help you understand your customers. Select it from our list of models in the add-on and run the Analysis:

Sentiment analysis on tweets

Sentiment analysis on tweets

As you can see, the model might return a low confidence score with an incorrect sentiment label. This is not bad in itself since sentiment analysis is pretty complex and you are likely to need to filter out the predictions below a confidence threshold of your choice.

Sentiment Analysis of Online Reviews

Are people saying positive or negative things about a product? The screenshot below shows some product reviews, their sentiment, and the confidence of the prediction. In order to classify those, we used MonkeyLearn’s Product Sentiment Classifier:

Sentiment analysis on reviews

Sentiment analysis on reviews

In this case, all predictions were accurate, that is, their sentiment labels were correct and confidence scores were pretty high.

NPS Feedback Sentiment Analysis

NPS (Net Promoter Score) is a customer satisfaction metric related to the question How likely are you to recommend our company to others? Usually, that question is accompanied by an open-ended question like What can you tell us about our company? or Can you tell us why you rated us 9?

We can use the power of sentiment analysis to analyze this open-ended feedback from NPS surveys:

Sentiment analysis on NPS feedback

Sentiment analysis on NPS feedback

Final Words

Once your texts have been analyzed, check your predictions. Bear in mind that a prediction is a combination of two things, namely, a tag (in this case, a sentiment) and its confidence.

Sentiment analysis is a very complicated natural language processing (NLP) task and it has been a “trending research topic” for a while, probably due to its complexity. So, when reviewing sentiment analysis results, take the following into consideration.

Most often, people do not take the confidence of the prediction into account and this is particularly problematic when it comes to sentiment analysis. Depending on the data you submit, there will be a confidence threshold below which you will be more likely to get the sentiment wrong, so you might want to check the predictions that fall below that confidence threshold for mistakes. You will also get some of the predictions right even if their confidence is low, but we recommend that you double-check.

Also, it is important to note that generic sentiment models might not be the best idea when performing sentiment analysis due to its complexity. You are likely to get better results by training a custom classifier with your own data and criteria.

Pre-trained sentiment analysis models are usually trained with a variety of types of texts from different domains. Therefore, if your data contains texts or expressions which do not belong to the domains used to train these models or if your texts look very different from the ones used for training, you are likely to get some inaccurate predictions (see above).

So, once you feel comfortable using this Google Sheets add-on for analyzing data on your spreadsheets and you’re looking to increase the accuracy of the predictions, a good next step would be to train your own custom model for sentiment analysis.

All in all, Google Sheets and the MonkeyLearn add-on make sentiment analysis accessible, straightforward, and easy. The combination of these tools can also help you do a lot more with your data. Why don’t you install the add-on and start doing fun analyses? Feel free to share any interesting insights you may find in the comments section below!

Hernán Correa

July 19th, 2018

Posts you might like...

MonkeyLearn Logo

Text Analysis with Machine Learning

Turn tweets, emails, documents, webpages and more into actionable data. Automate business processes and save hours of manual data processing.

Try MonkeyLearn
Clearbit LogoSegment LogoPubnub LogoProtagonist Logo