Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Tableau 2019.x Cookbook

You're reading from  Tableau 2019.x Cookbook

Product type Book
Published in Jan 2019
Publisher Packt
ISBN-13 9781789533385
Pages 670 pages
Edition 1st Edition
Languages
Authors (5):
Dmitry Anoshin Dmitry Anoshin
Profile icon Dmitry Anoshin
Teodora Matic Teodora Matic
Profile icon Teodora Matic
Slaven Bogdanovic Slaven Bogdanovic
Profile icon Slaven Bogdanovic
Tania Lincoln Tania Lincoln
Profile icon Tania Lincoln
Dmitrii Shirokov Dmitrii Shirokov
Profile icon Dmitrii Shirokov
View More author details
Toc

Table of Contents (18) Chapters close

Preface 1. Getting Started with Tableau Software 2. Data Manipulation 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

  • For more on maps, see the Tableau Help page on this topic at https://onlinehelp.tableau.com/current/pro/desktop/en-us/maps_build.html
You have been reading a chapter from
Tableau 2019.x Cookbook
Published in: Jan 2019 Publisher: Packt ISBN-13: 9781789533385
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 €14.99/month. Cancel anytime