My latest installment of Tableau tips is all about maps. Here are 10 tips for creating different map styles in Tableau.

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." 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 tips #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 border 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, choose the "dark" map style and set the Pane to white or another light background color.

For a dark map with very light streets, 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.    &ltmapsource inline="true" version="10.0"&gt

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 &ltmap-layer-style name="background_color" request-string="#000000"/&gt 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

评论

Wow, didn't know most of this stuff and I use maps all the time..
Just wondering: I wasn't able to get the 'black to black' color schema on my data layer and I'm using Tableau 10.0, is this new within 10.1?

It was a beautiful writing. Thank you.

www.teknovudu.com

Great tips!

This was amazing article. I have learned very much about maps and formatting. Specially changing the color and background of the same. I never attempted doing it. Now after seeing this it looks so easy.


添加新评论