Multiple map layers
Tableau 2020.4 finally lets you stack multiple marks layers onto one map, and it opens a world of possibilities.
- Tableau 2020.4 lets you add multiple marks layers to a single map by dragging a field onto the red 'Add a Marks Layer' drop zone
- You can reorder layers by dragging them, controlling which sits on top using the orange indicator line
- Each layer has a drop-down to move, hide, rename, remove or disable selection, so you can click through one layer to the object behind it
- Using the same field (like region) for colour across layers keeps the colours matched between them
- I built the entire workbook and prep flow in the browser, including a spatial geometry file joined to Superstore in Tableau Prep
0:00Hey it's Tim here and in this video I'm
0:01here to talk about a new exciting feature
0:04which allows
0:04you to layer in maps, yes that's right you
0:07are now able to add additional layers to a
0:10single mapping
0:11object inside of Tableau. Let me show you
0:13how this works, in a previous video I
0:15actually created
0:16a data set inside of Tableau prep in the
0:18browser and one of the things I'm trying to
0:19do with the
0:202020.4 release is just see how much of it
0:23can I do in the browser and so far 100% of
0:26everything
0:26I've been able to do has been in the
0:28browser. So let's go ahead and let me show
0:30you how to use this
0:31feature in the browser. Hey it's Tim here
0:33just a quick one before the video, 95% of
0:36the people who
0:36watch my videos aren't actually subscribed
0:38to my channel and I've got about 7 000
0:40subscribers,
0:41they only represent five percent so join
0:43that group you know join that exclusive
0:45group subscribe
0:46and try and get the subscriber numbers up
0:48on my channel it'll be really really great
0:50for me,
0:50thank you. I'm going to go to the default
0:52section here earlier on in another video in
0:54this playlist
0:55I created this prep in the browser file
0:57here so I'm going to click on that and you
0:58're going to see
0:59this data set this is actually what I'm
1:01going to be using today. What I did is I
1:03took a spatial file
1:04from the US government website and I joined
1:06it onto superstore sales to give us the
1:09geometry
1:09for different states in the US so we've
1:11actually got that as a geometry even though
1:13Tableau has
1:14that in the geocoding database we brought
1:16in the geometry specifically. What I'm
1:18going to do is I'm
1:19actually going to create some new workbook
1:20in the browser here and we're going to show
1:22you how this
1:23new mapping capability works. So the first
1:25thing to do is just to build a basic map
1:27you know how
1:28to do this double click a city and Tableau
1:30automatically interprets this as a map and
1:33will
1:33start plotting the points because it's a
1:35city it plots the points if I was to remove
1:37this and I was
1:38to double click state instead it would
1:40actually draw a same thing again map but we
1:43can of course
1:44change this to let's see like an actual map
1:47with different layers and we can actually
1:50color this
1:50a little bit. I like to give these maps a
1:52little bit of pop I call it and just make
1:54these borders
1:55white and go back to the map layers here
1:58and we just want to make sure we wash out
2:02the colors a
2:02little bit so we don't have sort of the
2:04distracting background in there just let
2:06that wash out a
2:07little bit and you might argue okay this
2:09isn't great for visibility but that's fine
2:12I'm just
2:12trying to go for something that looks nice.
2:15I'm going to drag a state onto labels which
2:17is great
2:17and then what we will probably do is I will
2:21drag region onto color just to give us the
2:24contrast we
2:25need to show you how this works. So there
2:27we have a nice map of the states again I'm
2:28doing this all
2:29in the browser. Now the cool thing in 2020.
2:334 is I can actually drag in additional
2:36mapping context
2:38onto this information. So I've already got
2:41the state here okay and I did this just
2:43using the
2:44state field I haven't used my geometry
2:46field yet I'll show you how to do that in a
2:47second.
2:48Let me go and grab the city and I click and
2:51drag what's this red circle here I have
2:54this new
2:54ability to add a marks layer. Now if I go
2:57ahead and drop this on there you'll see
2:59several things
3:01happened. Number one it plotted the cities
3:05on top as a layer on top of the map that we
3:08already
3:09created previously. The reason that
3:11happened is because you can see here that
3:13city is actually
3:14on top in terms of layers. Now if I want to
3:16change the order of these I can of course
3:18drag them
3:18around so if I just grab state and I drag
3:20it around you can see an orange line
3:22appears and I
3:23can actually put this up there so it tells
3:25you where it's going to put it and you can
3:27even see
3:28here that now the thing that's on the top
3:30here is California and everything else is
3:33underneath. I'm
3:34going to change that back here just to make
3:36it easy to see what's going on and because
3:39we've got
3:39our cities what I'm going to do is I'm
3:41actually going to change the color of my
3:43cities just so
3:43it's easier to see. I'm going to make them
3:47red and it's not going to work nicely with
3:50this over here
3:50so maybe let's try and find a shade of
3:53maybe green let's like maybe yeah maybe
3:56that it's difficult
3:57because everything has a color so let's
3:59just choose black. I think black is quite
4:01cool actually
4:02let's go with black and we'll just drop the
4:04opacity down so it's not too harsh. Now the
4:07thing I want
4:07to do now is go back to my state layer go
4:09to color and I'm just going to wash this
4:12out a little bit
4:12so what you can see here is I'm adding
4:14context to the map actually I'm adding a
4:16little bit of variety
4:17to the map and we can keep adding
4:20information we're not done yet. What I can
4:23now do is go get
4:24my geometry that I joined inside of Tableau
4:26Prep in the browser and bring it in again
4:29onto my marks
4:30layer and now I have a spatial layer in
4:32here. Now the spatial layer is sort of
4:35defunct because it's
4:37essentially just showing us something we've
4:39already got but what I'm going to do is I'm
4:41actually going to go back to my state layer
4:44over here and switch this from a map to a
4:46circle.
4:47Now when we do that you can see nothing
4:50changes we lose the color because our
4:53geometry layer is
4:54on the top so let's take that all the way
4:56down to the bottom and go into that
4:58geometry layer
5:00and let's color this by state so we can get
5:02some of that color that we had previously
5:04and you can
5:05see it's sort of not ideal so let's go back
5:07to region and let's do that that way let's
5:09just swap
5:09that with region and now we get some of
5:12that color we had before. Notice now that
5:14we have the state
5:17color here and it's also keeping the color
5:19that we match to the region because I'm
5:22using the color
5:23in two different places you see region and
5:25state here region and geometry here and so
5:28the colors
5:28are matching so this actually acts as a
5:30really nice way of selecting the states and
5:33it's a really
5:33sort of nice interactive tool. Now what you
5:36're probably wondering is look how do I
5:38disable
5:38selections if I've got so many things on
5:40the map here how do I make things work a
5:42little bit better
5:43well the first way is you can obviously
5:45change the icon so for the state let's go
5:47ahead and
5:48change this to a square and you can see
5:50that this changes to a square and that
5:52works a little bit
5:53better we can even increase the size just
5:55to give it a bit of contrast and now you
5:57can see how that
5:58works really really nicely. Now the next
6:00thing we can do is we can disable the
6:02ability to select
6:03things on a specific layer so let's go
6:06ahead and say that we can't select this
6:08state square so you
6:09can see right now I can select that square
6:12let's deselect it let's go back and what we
6:15need to do
6:15is we just need to click on this drop down
6:17here for the state and you can see you get
6:19this nice
6:20drop down window it gives you the ability
6:22to move it up and down hide the layer
6:25rename the layer
6:26remove the layer or disable selection. So
6:29this allows us to disable the ability to
6:32click on this
6:32so you see now I'm clicking through the
6:34square to the object behind it which is
6:36actually our
6:37geometry layer so that's a really really
6:39nice feature that you can use there it's a
6:41really
6:41nice quality of life improvement if I go
6:43back to my geometry and I go to color I can
6:46actually add
6:46that white border back on so everything has
6:48that nice border that we had before and now
6:51this starts
6:51to look a little bit more interesting. Now
6:53the interesting thing about this feature is
6:55as soon as
6:56I saw this feature I thought come on there
6:57's got to be more we can do with this right
7:00and when are
7:00we going to get this for charts and visual
7:02izations right because of course this is so
7:05completely
7:05changing the way we've known the marks pane
7:08to work we've always known when you do
7:09things like
7:10a dual axis that you actually get you know
7:13two marks panes one for one of the items on
7:15the dual
7:16axis one for the other sometimes when you
7:17add lots of pills and rows and columns you
7:19get a whole long
7:20list of items here on the left hand side
7:22but this is actually allowing us to layer
7:25information on
7:25top of each other which gives you a world
7:27of possibilities when it comes to labeling
7:30and adding
7:30context to visualizations okay so if you go
7:33out to twitter and you look online you'll
7:35find some
7:36absolutely amazing hacks that people are
7:38coming up with just with the mapping
7:40capability to show you
7:42how it works I like to keep videos to the
7:43book as it were because you know these are
7:45guides for
7:46people who are getting new into tableau or
7:48trying to use this at work just to get a
7:50problem solved
7:51so I won't be hopping into the hacks but
7:53absolutely go on to tableau public go on to
7:56tableau and
7:56twitter and see what people are coming up
7:58with because I'm telling you it's exciting
8:01stuff when
8:01this comes to standard charting this is
8:03going to be a really really nice feature to
8:06have but you've
8:07seen it there pretty much a very very
8:09simple feature we have layers they're easy
8:12to add they
8:12work like you'd expect them to in tableau
8:14they're very simple to work with you can
8:16drag them around
8:17like I'm doing so here obviously that
8:19changes the hierarchy and of course you can
8:21change the
8:21ability whether they're selected or not and
8:24it makes it really really easy to work with
8:26that's
8:26pretty much the feature in a nutshell if
8:27you've enjoyed this video you know what to
8:29do hit
8:30subscribe hit the like button otherwise if
8:32you haven't you know hit the dislike button
8:34twice and
8:35drop a comment below let me know what you'd
8:37like to see instead I'll catch you in the
8:38next video
8:39and be sure to check out other videos in
8:41this playlist as well and there's lots of
8:42great content coming out over the next few
8:46days on 2020.4
This feature holds so much promise not just for maps but for all mark types in the future. Watch to find out how to layer information on your maps.
Tableau release notes
Enhance your geospatial analysis with multiple marks layer support for maps. You can now add unlimited marks layers from a single data source to your map visualizations, bringing multiple spatial layers and context together for better understanding and analysis.