With Google Sheets, you can store and organize data, as well as do some traditional number-crunching and data manipulation.
But, what happens when you want to analyze the data in your spreadsheets?
Say that you have thousands of rows of customer feedback, product reviews or tweets. How can you process all this information and gain insights? How can you understand if customers are happy or angry without having to read each text?
Enter sentiment analysis, a machine learning technique that allows you to sort texts in your Google Sheets spreadsheet automatically.
In this post, we’ll go over how you can use MonkeyLearn’s Google Sheets add-on to analyze your data at scale.
Tutorial: Sentiment Analysis Right in Your Spreadsheet
Adding value to your spreadsheets by performing sentiment analysis is pretty straightforward. No previous coding experience is needed. With MonkeyLearn’s Google Sheets add-on, you are a couple of clicks away from analyzing sentiment. You just need to follow 5 simple steps:
1. Log in to Your Google Account
Log in to your Google account and open Google Sheets.
2. Install MonkeyLearn’s Google Sheets Add-on for Sentiment Analysis
Go to the Add-ons menu in Google Sheets and click Get Add-ons:
Then, search for MonkeyLearn in the Google Sheets marketplace and add the add-on for free:
3. 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:
4. Upload Your Data and Choose What to Analyze
You are now ready to import or upload the data you want to analyze. Once you have your data on a spreadsheet, make sure to organize the texts you want to analyze so that they are laid out in only one column.
Then, go to Add-ons, MonkeyLearn, and click Start:
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:
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:
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.
5. Run Sentiment Analysis
Click Run in the MonkeyLearn’s add-on box to run the sentiment analysis on your data. 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…
Tweet Sentiment Analysis
How positive or negative are the comments of those who talk about you, your brand, or your products on Twitter? We have created a Tweet Sentiment model to help you analyze that. You can choose it from our list of models in the add-on and run the Analysis:
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.
Reviews Sentiment Analysis
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:
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:
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 are 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!
Sign up to our Newsletter
Receive awesome Machine Learning posts and tutorials!