How to Do Text Analysis & Visualize the Results in Tableau

Text analysis uses machine learning to automatically sort and classify unstructured text, like social media data, customer surveys, emails, and more. Visualization tools, like Tableau, turn that data into charts and graphs for powerful, data-driven insights.

MonkeyLearn offers a suite of AI text analysis tools that you can try before you buy. Sign up to try them for free.

Text analysis allows companies to break down unstructured text and organize it to get usable data. For example, analysis programs can read through customer support tickets and classify them by topic to automatically route them to the proper department or employee.

Once your data is properly organized, you can perform more advanced techniques, like sentiment analysis, to classify customer opinion as positive, negative, or neutral. Running this data through Tableau will illuminate your data with fine-grained results and easy-to-understand visualizations. 

Tableau is one of the best data visualization tools in the business intelligence industry. Follow along to learn how to visualize text analysis in Tableau. But first, we’ll show you how to organize your text data with MonkeyLearn, so you can visualize results by topic, sentiment, and more.

How to do Sentiment Text Analysis With MonkeyLearn

MonkeyLearn is a SaaS platform that offers powerful text analysis tools to help you get the most out of your text data, in any format.

One option is to use MonkeyLearn’s pre-trained sentiment analysis tool that is ready to go, out of the box. 

You can also train your own machine learning model to the terminology and specific needs of your business or industry. Just follow the steps below to create a custom sentiment analyzer. Once your model is trained, it can perform text analysis automatically, 24/7. 

1. Create a new text classifier

Sign up for your free MonkeyLearn account.

From the MonkeyLearn dashboard, click ‘Create a Model,’ then ‘Classifier’:

The option to choose an extractor or classifier in MonkeyLearn’s model builder.

2. Select ‘Sentiment Analysis’:

The option to choose from three classifiers: topic, sentiment and intent.

3. Upload your training data

You can upload a CSV or Excel file with text data you want to classify: tweets or Facebook posts, online reviews, support tickets, etc. Or import data directly from data sources, like Twitter, Zendesk, Gmail, and more.

A selection of apps and sources you can click on to connect and upload your data.

If you don’t have a file readily available, click ‘Data Library’ to download a sample dataset.

4. Train your sentiment analysis model

Tag each piece of text as Positive, Negative, or Neutral. After you’ve tagged a few, you’ll see machine learning at work, as the model begins to predict sentiment. Retag incorrect predictions. The more you train the model, the better it will perform.

Tagging each text as positive, negative, or neutral to train the sentiment classifier.

5. Test your sentiment classifier

Click ‘Run.’ From there you can enter or paste new text to test your model. Keep manually tagging if the model is choosing inaccurately.

Entering text to test the sentiment classification model.

6. Put the model to work

Now that you have a trained model, you can put it to work analyzing huge amounts of data: 

  • Batch processing: upload an Excel or CSV file with new data and you’ll get a return file with your sentiment analysis results.
  • Integrations: connect to a third-party app like Zapier, Zendesk, or Google Sheets.

A choice of app integrations: Zapier, Google Sheets, Rapidminer, and Zendesk.

Sample of code for MonkeyLearn API.

Visualize Text Analysis Results in Tableau 

Once you’ve  received the results from your analysis as a CSV, Excel, or JSON file, follow the five steps below to bring your data to life with Tableau. The visual analytics software offers a number of impressive options, and you can try it out for free. 

1. Sign up for a free trial and install Tableau

Click on “Try now” for a 14-day free trial. Download and install Tableau Desktop. 

2. Connect to your data source

You can link Tableau to a number of files and databases, like Excel, Google Sheets, CSV, JSON, and more. 

To use an Excel file, for example, go to the ‘Connect’ menu on the left and choose Microsoft Excel from ‘To a File.’ 

Tableau interface showing how to connect a data source.

3. Choose your file and sheet

Next choose the file, then the sheet within it that you want to use.

The example below is from a document of app reviews tagged by sentiment and aspect. Aspect-based sentiment analysis allows you to organize text data by aspect (subjects, like Ease of Use, Features, Price, etc.), then perform sentiment analysis of each text within each aspect.

Once you’ve selected your file, Tableau will show you a preview of the data:

Tableau preview screen of selected data showing words and their corresponding sentiment.

4. Use your data to create Tableau charts and graphs

Access the workspace by clicking on “Sheet 1” in the toolbar at the bottom:

Tableau data source tool bar.

In the workspace, the left column shows two parameters that you need to set up: ‘Dimensions’ and ‘Measures.’ 

Tableau workspace screen showing Dimensions and Measures.

Dimensions and Measures are used to organize data in Tableau and create structure for visualizations. Double click to choose the ones you’d like to use, and they will be set up as columns or rows. In this example, we’ll use Aspect as ‘Dimension’ (rows) and Positive, Negative, and Neutral as ‘Measures’ (columns).

Option to choose Columns: Negative, Neutral, Positive and Rows: Aspect.

Next, go to the column on the right side under ‘Show Me,’ which shows all the visualization options available for the dimensions and measures you selected:

Tableau option to choose from Visualizations menu.

Select the visualization you want to use and see the results instantly.

Tableau Sentiment Counts by Aspect horizontal bar chart.

The above is a horizontal bar chart showing the number of positive, neutral, and negative opinions (measure) for each aspect (dimensions). 

You can click around to try out different visualizations. There are quite a lot to choose from.

Tableau Sentiment Counts by Aspect vertical bar chart.

5. Combine visualizations in the Tableau dashboard.

One of the most impressive things about Tableau visualizations is that you can combine multiple charts and graphs into a single display. Having all of your data visible on a single screen allows for powerfully persuasive displays.

To create a dashboard, go to the top menu bar ‘Dashboard’ > ‘New Dashboard,’ then just drag the sheets you want to add to your dashboard. The below shows three different visual outputs of the results we worked with above.

Tableau screen showing multiple visualizations of sentiment analysis and counts by aspect.

If you want to learn how to do even more great visualizations with Tableau, check out these Tableau training courses.

In Closing

Machine learning text analysis techniques, like topic classification and sentiment analysis (among many others) can give you powerful insights into the opinions and emotions of your customers and the public at large. Once you get started with text analysis, you’ll learn about the myriad benefits. And with MonkeyLearn’s easy-to-use SaaS platform, you can get it all set up in, literally, just minutes.

Coupling MonkeyLearn’s AI with Tableau’s complex organization and aesthetic appeal make your results wholly engaging and easy to comprehend. You’ll see trends and patterns – and be able to showcase them simply to staff, clients, and investors.

Sign up to MonkeyLearn for free and get the most out of your data.

Tobias Geisler Mesevage

Tobias Geisler Mesevage

Head of Marketing @monkeylearn. Enjoys stories, AI, probability, boxing, and having skin in the game.

Notification

Have something to say?

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.