Tableau Tips - Volume 6 "Map Tips"
This installment of Tableau Tips focuses on tips for creating different map styles in Tableau.
Click on images below for full screen
#10 - Remove Map Layer
An easy way to create a clean map for your visualization is removing the map layers. Select Map on the toolbar and "Map Layer" and then uncheck everything in the map layers window. This will leave only the outline of the map data.
#9 - Change Map Border Colors
When using a map, you can change the border colors under Color. Select Color and choose the border color you want.
#8 - Create US Map Outline
Combining Tip #10 and #9 and removing the fill color we can create a map outline. First remove the map layer (Tip #10) and then set the map fill color to match the background color. Then color the borders to the desired color (Tip #9). We now have just an outline of the map.
#7 - Create a Minimalistic Map
I first posted about this here. By removing the base layer (similar to Tip #10), we can change the Pane color to change the water color on the map to any color. Once the base layer is unchecked, simply right-click on the map and select "Format", then select "Shading" and change the "Pane" color to the desired color.
#6 - Countries of the World Outline
Similar to Tip #8, we can create and outline of the countries. In this example I also combined Tip #7 to change the pane color to match. This creates a red outline of the countries on a completely black background.
#5 - Add Map Gridlines
Right-click on the map and select "Format" then select gridlines for the Rows and Columns and change to the desired color and transparency.
#4 - Data Layer as Map Background
Tableau has built-in data layers for the United States. By adding custom colors in the preference file we can use these as background colors. I have created a "black to black" color in the preference file. This allows me to use population at the level of state, using "black to black" as the color scheme to color everything black. Then applying Tip #10 and #7 to create a minimalistic map with dots.
#3 - Dual Axis Map Alternative
First we build our map with sales by city. Then duplicate the Longitude on the columns. On the first Longitude pill, remove everything except state. Then change fill color and boder colors to black. On the second Longitude pill change the color to the desired color and transparency. Remove the map layers (Tip #10) and then change the Pane background color (Tip #7).
#2 - High Contrast Maps
Tableau has three base map options; normal, light and dark. These maps are well done, but often times don't have enough contrast. This is especially the case when projecting on screens using various projectors. One option is to use Mapbox maps and there is a high contrast option that is one of the defaults in Mapbox. You can also create your own custom maps in Mapbox. However, there are a few alternatives for doing this in Tableau without the need for Mapbox. I posted one alternative method here, but this only works where there is a data layer available. Here is another alternative that can be used for any map and can be used to create high contrast for both light and dark maps.
The key is to remove the base layer and changing the background color of the Pane, as we did in Tip #7. The difference in this case is that we keep the Streets and Highways checked under the map layers (and Land Cover if desired). For a light map with dark streets then choose the "Dark" map style and set the Pane to white or another light background color.
For a dark map with very light streets then choose the "Light" or "Normal" map style and set the Pane color to a dark or black background.
#1 - Create a New Map Style in the TMS
You can add a new map style to your TMS to use the style over and over and make it even easier to use.
IMPORTANT: Change the inline="true" in the opening lines of your TMS file if you want your new custom map style to save in your Tableau file or on Tableau Public. <mapsource inline="true" version="10.0">
Below is a sample Map Style for you to copy and paste into your TMS file. Then open Tableau, create a map and this new map style "Dark Contrast" should appear in your list. Uncheck Base and set the other map layers options as desired.
This map sets a dark background using <map-layer-style name="background_color" request-string="#000000"/> and combines that with the other elements of the "Normal" map using "from=tableau4_2_water" and "from=tableau4_2_landcover". When the "Base" map layer is unchecked the resulting map will look similar to the map below.
I hope you find these tips helpful. If you have any questions feel free to email me at Jeff@DataPlusScience.com
Jeffrey A. Shaffer
Follow on Twitter @HighVizAbility