More Custom Map Tips for Tableau without Using Mapbox
In a previous post I examined a way to create Minimalistic Maps in Tableau here without using Mapbox. In short, by unchecking the "base" in Map Layers you are able to change the water color using the formatting options. However, I was recently working on a visualization and wanted to do the opposite. I wanted to use the base layer along with the streets and highways. In other words, I wanted to change the color of the land and didn't care about the water color. Here's an example of a map I created in Tableau.
The map above uses the "dark" map and has the "Streets and Highways" checked. Notice how the streets are showing up on the map. They are very hard to see. I then added some data on the color shelf for a few zip codes, but by default the color is encoded on top of the map, so the streets now disappear completely in the shaded areas.
To show the streets again, we can set the transparency on the color, which will let the streets bleed through the color a bit. This helps, but the streets and highways are still very difficult to see on this map.
At this point, you could build a custom Mapbox map with a black background and high contrast streets and highways, but if your map is in the United States then we can leverage something already native in Tableau to achieve a similar effect. We can use the Data Layers.
Steps to create custom map using the Data Layer
1. Create a custom color palette using the color that you want on your map.
Modify your preference file by adding an "ordered-diverging" or "ordered-sequential" color palette.
Example Code to add to your preference file for a black background to your map.
Enter #000000 for black or replace with whatever color you wish.
2. Open Tableau and Create a viz with a map zoomed into the streets somewhere in the United States
3. Select Map in the toolbar
4. Select "Map Layers" in Tableau 9.2 (or "Map Options" in previous versions)
4. Set the Map Style to either Light or Normal
5. Click the Data Layer dropdown box and select "Population" (it doesn't really matter which one you select).
6. The "By:" selection should be set to "State"
7. Click the dropdown box "Using:" to change the color and select the new color that added you your preference file. In the example below I use the "Black to Black" color that I created.
By doing this, the streets show up as a much lighter color because they are set up that way in the Light and Normal maps of Tableau. Here's an example using the setting above.
You can also encode data on the color shelf with transparency and maintain your high contrast streets and highways. The final result will look something like this:
Here is an example using the Normal base map in Tableau, but chaging the land color to blue.
Note - this doesn't give you the same flexibility in your design as Mapbox does, but it does give you the ability to create some quick custom color maps without using Mapbox, which could be handy in certain instances.