Word clouds are great visualizations for finding words that are most referenced in books, publications, and social media. This section will cover creating a word cloud in Tableau using BigQuery public data.
The first few steps are the same as in the preceding example:
- After opening Tableau Desktop, select Google BigQuery under the Connect To a Server section on the left; then enter your login credentials for BigQuery.
- At this point, all the tables in your dataset should be displayed on the left.
- Click where it says New Custom SQL and enter the following query in the dialog:
SELECT word, SUM(word_count) word_count
FROM `bigquery-public-data.samples.shakespeare`
GROUP BY word
ORDER BY word_count desc
The dataset is from the works of William Shakespeare. The query returns a list of all words in his works, along with a count of the times each word appears in one of his works.
- At the bottom, click on the tab titled Sheet 1 to enter the worksheet view.
- In the dimensions section, drag and drop the word dimension into the text tab in the marks section.
- In the dimensions section, drag and drop the word_count measure to the size tab in the marks section.
- There will be two tabs used in the marks section. Right-click on the size tab labeled word and select Measure | Count:
This will create what is called a tree map. In this example, there are far too many words in the list to utilize the visualization.
- Drag and drop the word_count measure from the measures section to the filters section. When prompted with How do you want to filter on word_count, select Sum and click on next.
- Select At Least for your condition and type 2000 in the dialog. Click on OK. This will return only those words that have a word count of at least 2,000.
- Use the dropdown in the marks card to select Text:
- Drag and drop the word_count measure from the measures section to the color tab in the marks section. This will color each word based on the count for that word:
You should be left with a color-coded word cloud.
Other charts can now be created as individual worksheet tabs. Tabs can then be combined to make what Tableau calls a dashboard. The process of creating a dashboard here is a bit more cumbersome than creating a dashboard in Google Data Studio, but Tableau offers a great deal of more customization for its dashboards. This, coupled with all the other features it offers, makes Tableau a much more attractive option, especially for enterprise users.