Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Tableau 2019.x Cookbook

You're reading from   Tableau 2019.x Cookbook Over 115 recipes to build end-to-end analytical solutions using Tableau

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781789533385
Length 670 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (6):
Arrow left icon
Tania Lincoln Tania Lincoln
Author Profile Icon Tania Lincoln
Tania Lincoln
Slaven Bogdanovic Slaven Bogdanovic
Author Profile Icon Slaven Bogdanovic
Slaven Bogdanovic
Teodora Matic Teodora Matic
Author Profile Icon Teodora Matic
Teodora Matic
Rintaro Sugimura Rintaro Sugimura
Author Profile Icon Rintaro Sugimura
Rintaro Sugimura
Dmitry Anoshin Dmitry Anoshin
Author Profile Icon Dmitry Anoshin
Dmitry Anoshin
Dmitrii Shirokov Dmitrii Shirokov
Author Profile Icon Dmitrii Shirokov
Dmitrii Shirokov
+2 more Show less
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Getting Started with Tableau Software 2. Data Manipulation FREE CHAPTER 3. Tableau Extracts 4. Tableau Desktop Advanced Calculations 5. Tableau Desktop Advanced Filtering 6. Building Dashboards 7. Telling a Story with Tableau 8. Tableau Visualization 9. Tableau Advanced Visualization 10. Tableau for Big Data 11. Forecasting with Tableau 12. Advanced Analytics with Tableau 13. Deploy Tableau Server 14. Tableau Troubleshooting 15. Preparing Data for Analysis with Tableau Prep 16. ETL Best Practices for Tableau 17. Other Books You May Enjoy

Building a map

Maps are a great way to present geographical data, as they are intuitive and easy to read. In this recipe, we will show name frequency by state, but this time using a map. This recipe will cover two frequently used ways to present data on a map: creating a map with circles of different sizes, and creating a filled map with a color gradient.

Getting ready

To complete this recipe, you will need to connect to the Baby_names.csv dataset and open a new blank worksheet.

How to do it...

First, we will make a map with circles.

Creating a map with circles

  1. Drag and drop State into the worksheet workspace.
  2. Drag and drop Frequency onto Size in the Marks card.
  3. Click on Size in the Marks card, and move the slider to the center, through which we can increase and decrease the size of the circle in the following map:

You can see the results in the following screenshot:

If the map is failing to display, navigate to File|Workbook Locale in the main menu toolbar and select More.... When the Set Workbook Locale window opens, select English (United States).

Creating a map with a color gradient

  1. Drag and drop State into the worksheet workspace.
  2. Drag and drop Frequency onto Color in the Marks card:

How it works...

Tableau has correctly recognized that the State dimension contains geographical information, and has assigned a geographical role to it. This is indicated by a small globe symbol () next to the dimension name in the Dimensions pane, as well as in the data preview on the Data Source page. Based on that, it has automatically generated two new measures, which are not in the dataset itself: Longitude and Latitude. When you drag and drop the State dimension into the worksheet workspace, the Show Me functionality is implemented. It places State in Detail in the Marks card, Longitude into the Columns shelf, and Latitude into the Rows shelf. Based on what we do with our measure, Frequency, Tableau automatically chooses the appropriate mark type, which is a circle or a map.

There's more...

It is possible to add and subtract layers from a map and change the map style by performing the following steps:

  1. From the main menu toolbar, navigate to Map | Map Layers… to open the Map Layers pane:
  1. In the Map Layers pane, you can add and remove map layers by checking and deselecting the boxes in front of them:
  1. You can also add data layers by selecting them from the Data Layer drop-down menu. Depending on the data you are showing on your map, adding different data layers might add relevant information to your visualization.
  2. It's also possible to adjust the background style under Background.

  1. Set the map style and layers as default. This means that every time you create a new map, those settings will be applied.

See also

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime