Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
What is a Word Cloud?
3.
Uses of a Word Cloud
4.
Features of a Word Cloud
5.
Creating a Word Cloud in Tableau
5.1.
Customising a Word Cloud
6.
Limitations of a Word Cloud
7.
Frequently Asked Questions
7.1.
How can we create a word cloud with a custom shape in Tableau?
7.2.
How can we export the word cloud created in Tableau as an image?
7.3.
How can we share Tableau visualisations?
7.4.
What kind of visualisations can we create using Tableau?
7.5.
Give examples of a few companies which use Tableau.
8.
Conclusion
Last Updated: Mar 27, 2024

Making Word Cloud in Tableau

Crack Google SDE interview : Essential projects
Speaker
Saurav Prateek
SDE-2 @
20 Jun, 2024 @ 01:30 PM

Introduction

Hey, Ninjas! You must have heard about Tableau if you are interested in data analysis and visualisation. Data analysts in big businesses utilise Tableau, a powerful data visualisation tool, to help produce interactive reports, dashboards and visualisations. Tableau converts raw data from some data sources into meaningful visualisations. We use these visualisations to find valuable patterns and insights about the data.

Introduction

One such helpful visualisation is a word cloud. Word clouds are a popular way of visualising text data. Word clouds help in summarising and comparing data. In this article, we will explore the concept of word clouds, their uses, features, and how to create a word cloud in Tableau.

What is a Word Cloud?

A word cloud (also known as a tag cloud or text cloud) is a visual representation of text data where the size of each word depends on its frequency in the data set. The words are arranged randomly like a cloud and have different colours, sizes, fonts, etc. 

The primary purpose of a word cloud is to identify the most prominent words in a data set. They summarise the entire data and help compare the different words with each other based on various features.

Word Cloud Example

The above visualisation is a word cloud showing different types of Pokemon. The size of a word represents the number of Pokemon of that type. Each type has a different colour. We can observe that most Pokemon are of Water type. We also follow that the type with the least number of Pokemon is Fairy type, as it has the smallest size in the word cloud.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Uses of a Word Cloud

We can use word clouds for various purposes, such as:

  1. Word clouds help gain insights into a data set's key topics or themes.
     
  2. Word clouds summarise large amounts of data and attractively present them.
     
  3. Word clouds make reports and presentations more appealing and attract the reader's attention.
     

There can be different situations where a word cloud may be helpful. A word cloud can help identify problems from feedback data. Word clouds can also determine the most used keywords and thus help in SEO (Search Engine Optimisation).

Features of a Word Cloud

Word clouds have many different features which enhance their appearance. We can customise a word cloud according to our needs. These features include:

  1. The size of a word in the word cloud represents its frequency in the data set.
     
  2. We can use different colours for different kinds of words.
     
  3. The font style is customisable.
     
  4. We can filter words and exclude stop words from the word cloud. Stop words are commonly used words that do not add much meaning to the text. Some stop words are “the”, “is”, etc.
     
  5. When we have a lot of words, we can choose how many topmost words to use.

Creating a Word Cloud in Tableau

Let us look at the steps to create a word cloud in Tableau. 

  • First, Open the Main Tableau Interface after choosing your data set. In this example, we will use the Sample - Superstore sample database provided by Tableau.
Open Main Tableau Interface
  • Then, choose the field whose values should appear as words in the word cloud. In this example, we use the Sub-category field. We drag and drop this dimension field into the Text box in the Marks card.
Add text
  • Now, we can see the different words in the view section, which will appear in our word cloud. 
Text in View
  • Now, we have to choose a measure field and assign sizes to the words according to it. In this example, we will use the Sales measure to change the size of our words. We drag and drop the Sales field into the Size box in the Marks card. 
Add Size
  • Now, all sub-categories have different sizes corresponding to the sum of sales from that sub-category, as we can see in this treemap.
Treemap in View
  • To convert this treemap visualisation to a word cloud, click on Automatic in the Marks card, and choose Text.
Change visualisation type
  • Now we have a word cloud.
Uncoloured Word Cloud

This word cloud could look more appealing if we use colours! Let us look at the steps to add colours to the words to make the visualisation more attractive.

  • Choose the field according to which you want to add colour. In this example, we will colour all Sub-categories according to the Category to which they belong. Thus all similar subcategories should have the same colour. 
     
  • Now drag and drop the chosen field into the Color box in the Marks card. This step will also create a legend on the right side of the screen, which shows the Category and its colour.
Add Color

These steps will create the following word cloud.

Coloured Word Cloud in View

We have now created a colourful word cloud which shows the different subcategories and the relative sales for each subcategory.

Customising a Word Cloud

Tableau also offers various features to customise the word cloud. Sometimes there may be too many words in the word cloud. We can adjust the number of words in the word cloud using Filters.

We can filter the words according to some field. In this example, we will filter the different subcategories and use only the top 15 subcategories according to their average profit. 

  • Drag and drop the Sub-Category field into the Filters shelf.
Add Filter
  • This will open the menu where we can choose the filtering criteria.
Filter Menu
  • Go to the Top tab and choose the options as shown.
Configure Filter
  • When we click OK, we will see the customised word cloud.
Filtered Word Cloud

This word cloud only contains the 15 topmost subcategories with the highest average profit.

Limitations of a Word Cloud

While word clouds are helpful, they also have some limitations:

  1. Word clouds do not show the context or meaning of a word in the word cloud.
     
  2. Word clouds can be confusing at times. As the size of a word depends on its frequency or some other parameter, sometimes it can be challenging to interpret the difference in sizes of two different words. Due to this limitation, other visualisations like bar charts or tree maps are more frequently used.
     
  3. Word clouds do not show how the words in the word cloud are related.

Frequently Asked Questions

How can we create a word cloud with a custom shape in Tableau?

We cannot, unfortunately, create a word cloud with a custom shape in Tableau.

How can we export the word cloud created in Tableau as an image?

We can export the word cloud as an image using the Worksheet tab in the Ribbon. In the Worksheet menu, click on Export and then click on Image.

How can we share Tableau visualisations?

There are various ways to share Tableau visualisations. To share a Tableau visualisation, we can publish it to Tableau Server or Tableau Online and share its link. We can also embed the visualisation in a website.

What kind of visualisations can we create using Tableau?

Tableau enables us to create a wide variety of visualisations. They include bar charts, line graphs, pie charts, scatter plots, heat maps, geo maps, etc.

Give examples of a few companies which use Tableau.

Several large companies use Tableau for data visualisation. These companies include Coca-Cola, Walmart, Verizon, LinkedIn, Nike, and Netflix.

Conclusion

Word clouds are a simple and attractive way to visualise text data. Tableau makes it very easy to create word clouds. However, as word clouds have some limitations, we can use other visualisations along with word clouds to get better insights about the data.

We recommend reading the following articles to learn more about Tableau and Data Analysis:

If you liked our article, do upvote our article and help other ninjas grow. You can refer to our Guided Path on Coding Ninjas Studio to upskill yourself in Data Structures and AlgorithmsCompetitive ProgrammingSystem Design, and many more!

Happy Learning!

Previous article
Introduction to User Filter
Next article
Making Line Charts in Tableau
Live masterclass