Tableau Maps
Tableau Maps
• If you want to analyze your data geographically, you can plot your
data on a map in Tableau.
• This topic explains why and when you should put your data on a map
visualization.
• It also describes some of the types of maps you can create in Tableau,
and how to create each one.
Why put your data on a map?
• There are many reasons to put your data on a map.
• Perhaps you have some location data in your data source?
• Or maybe you think a map could really make your data pop?
• Both of those are good enough reasons to create a map visualization, but it’s important to keep in mind that
maps, like any other type of visualization, serve a particular purpose: they answer spatial questions.
• You make a map in Tableau because you have a spatial question, and you need to use a map to understand
the trends or patterns in your data.
• But what is a spatial question?
• Some examples might be:
• Which state has the most farmers markets?
• Where are the regions in the U.S. with the high obesity rates?
• Which metro station is the busiest for each metro line in my city?
• Where did the storms move over time?
• Where are people checking out and returning bikes from their local bike share program?
• All of these are spatial questions. However, is a map the best way to answer them?
When should you use a map to represent your
data?
• If you have a spatial question, a map view might be a great way to
answer it. However, that might not always be the case.
• Take for example, the first question from the list above:
Which state has the most farmers markets?
• If you had a data source with a list of farmers markets per state, you
might create a map view like the one below.
• Can you easily tell which state has the most farmers markets?
When should you use a map to represent your
data?
When should you use a map to represent your
data?
• What if you create a bar
chart instead?
• Now is it easy to spot the
state with the most farmers
markets?
When should you use a map to represent
your data?
• The above example is one of many where a different type of visualization
would be better to answer a spatial question than a map.
• So when do you know if you should use a map view?
• One rule of thumb is to ask yourself whether or not you could answer your
question faster, or easier with another visualization.
• If the answer is yes, then perhaps a map view is not the best visualization
for the data you’re using.
• If the answer is no, then take the following into account:
• Maps that answer questions well have both appropriate data
representation, and attractive data representation. In other words: the
data is not misleading, and the map is appealing.
When should you use a map to represent
your data?
• If your map is beautiful, but the data is misleading, or not very
insightful, you run the risk of people misinterpreting your data.
• That’s why it’s important to create maps that represent your data
accurately, as well as attractively.
What types of maps can you build in Tableau?
• Simple Maps
• Proportional symbol maps
• Choropleth maps (filled maps)
• Point distribution maps
• Heatmaps (density maps)
• Flow maps (path maps)
• Spider maps (origin-destination maps)
Build a Simple Map
• You can build several different types of maps for your geographic
analysis in Tableau.
• Navigate to a worksheet.
• In the Data pane, under
Dimensions, double-
click State.
• A map view is automatically
created because the State
field is a geographic field.
Build a simple point map
• From Measures, drag Sales to Size on
the Marks card.
• The data points on the map update to
show the amount of sales
proportionally.
• Select Maps > Map Layers.
• In the Map Layers pane, do the
following:
• Click the Style drop-down and
select Normal.
• Under Map Layers,
clear Country/Region Names.
• The background map updates with the
new settings.
Build a simple point map
Build a simple filled (polygon) map
• From Dimensions,
drag Sales to Color on
the Marks card.
• The polygons on the map
update to show the
amount of sales using
color.
Proportional symbol maps
• Proportional symbol maps are great for showing quantitative values
for individual locations.
• They can show one or two quantitative values per location (one value
encoded with size, and, if necessary, another encoded with color).
• For example, you can plot earthquakes recorded between 1981 to
2014 around the world, and size them by magnitude.
• You can also color the data points by magnitude for additional visual
detail.
Your data source
• To follow along with this example, download the Create Point Distribution
Maps in Tableau Example Workbook from Tableau Public, and open it in
Tableau Desktop.
• Open a new worksheet.
• Ensure that the Latitude geographic role is assigned to your latitude field,
and the Longitude geographic role is assigned to your longitude field.
• In the Data pane, double-click Latitude and Longitude to add them to the
view.
• The Latitude and Longitude fields are added to the Columns and Rows
shelves, and a map view with one data point is created.
Build the map view
Build the map view
• On the Columns shelf, right-click Longitude and
select Dimension.
• On the Rows shelf, right-click Latitude and
select Dimension.
• The map view updates with every location in
your data source.
• On the Marks card, click Size, and then move the
slider to the left.
• Your point distribution map is now complete.
• A data point for every location in your data
source is now plotted on the map (minus any you
filtered from the view).
• You can now see that a majority of hailstorms
occur in the eastern half of the United States.
Choropleth maps
• Choropleth maps are best for showing ratio or aggregated data for
polygons.
• These polygons can be counties, regions, states, or any area or region
that can be geocoded in Tableau.
• They can even be custom territories created in Tableau
Your data source
• On the Marks card, click the plus icon on the State field to drill down to the
County level of detail.
• There is now a data point for every county in your data source.
• From Measures, under countyObesity, drag Percent-2012 to Color on the
Marks card.
• The map view changes to a filled map mark type and the polygons are
colored green.
• Note that the default aggregation for the Percent-2012 measure is SUM by
default.
• On the Marks card, right-click the Percent-2012 field and select Attribute.
• Since the data in this field is already a percentage, it does not make sense
to aggregate it as a sum.
Build the map view
• To create a flow map, your data source should include the following
types of information:
• Latitude and longitude coordinates for each data point in a path
• A column to define the order to connect the points (this can be date
information, or manually applied numbers, such as 1, 2, 3, 4, 5)
• A unique ID for each path
• Enough data points to shape each path into a line
Basic map building blocks
Columns shelf: Longitude (continuous measure,
longitude geographic role assigned)
• To follow along with this example, download the Create Flow Maps in
Tableau Example Workbook from Tableau Public, and open it in Tableau
Desktop.
• Open a new worksheet.
• In the Data pane, under Measures, double-click Latitude and Longitude.
• The Latitude and Longitude fields are added to the Columns and Rows
shelves, and a map view with one data point is created.
• From Dimensions, drag Storm Name to Detail on the Marks card.
• The map view updates with a data point for every storm in the data source.
In the next steps, you will narrow the storms down to only those that
occurred in the western Pacific Ocean in 2012.
• From Dimensions, drag Date to the Filters shelf.
Build the map view
• In the Filter Field [Date] dialog box that appears, select Years, and
then click Next.
• In the Filter [Year of Date] dialog box that appears, click 2012, and
then click OK.
• The map view updates to show only the storms that occurred in 2012.
• From Dimensions, drag Basin to the Filters shelf.
• In the Filter Field [Basin] dialog box that appears, select West Pacific,
and then click OK.
• The map view updates to show only storms that occurred in the
western part of the Pacific Ocean.
Build the map view
Build the map view
• On the Marks card, click the mark-type drop-down and select Line.
• A Path button appears on the Marks card, and the map view updates with
a line connecting every data point.
• From Dimensions, drag Date to Path on the Marks card.
• The line disappears. This is because the Date field is set to discrete years.
Since the date field in the Storm data source includes day, month, year, and
time, this is not the correct level of detail for this field.
• On the Marks card, right-click the YEAR(Date) field and select Exact Date.
• Now the map view updates with a data point for every recorded date and
time. You can now see the individual paths of each storm.
•
Build the map view
Build the map view
• From Measures, drag Wind Speed to Size on the Marks card.
• The map view updates to show the varying wind speeds along each storm
path.
• On the Marks card, right-click the SUM(Wind Speed) field and
select Measure > Average.
• From Dimensions, drag Storm Name to Color on the Marks card.
• Each storm path is assigned a color and the flow map is now complete.
• You can now see the paths for every recorded storm that occurred in the
West Pacific basin in 2012.
• You can also see at what point in their path their wind speeds were
strongest.
Build the map view
Create Heatmaps that Show Trends or Density in
Tableau
• You can create maps in Tableau to reveal the patterns or relative
concentrations that might otherwise be hidden due to an overlapping
mark on a map.
• These types of maps are called heatmaps, or density map.
• Tableau creates a heatmap by grouping overlaying marks, and color-
coding them based on the number of marks in the group.
• Density maps help you identify locations withhow greater or fewer
numbers of data points.
• Density maps are most effective when working with a data set
containing many data points in a small geographic area.
Your data source
• You can choose “Density” from the mark type drop-down and Tableau
will compute a density surface on your view.
• The density surface that appears recomputes as you zoom or filter
data on the remaining marks.
• When using Pages or a small multiples view, the Density is computed
across the full domain of the data for comparative analysis.
• To follow along with this example, download the Create Heatmaps in
Tableau Example Workbook (click Download in the upper right hand
corner), and open it in Tableau Desktop.
Build the map view
• Size: You can use the Size shelf to adjust the size of the density marks.
Clicking on the Size mark will show the size slider. Adjusting the slider
will apply a size increase or decrease to the size of the marks group
that makes your heatmap.
• Underlying marks): You can select an individual data point from
anywhere in your density map. These marks have size (10 pixels) and
color (blue) applied by default. Size and color are not adjustable for
underlying marks.
• Zoom: Selection, tooltips, labels, and hovering all work based on the
marks in the zoom of the view. Density maps have no fixed or
constant display and will always recompute as you zoom.
•
Create Filled Maps with Pie Charts in Tableau
• On the Marks card, click one of the Latitude (generated) tabs, and
then click the Mark type drop-down and select the Pie mark type.
• From Measures, drag Sales to Size on the Latitude (generated) Marks
card you selected.
• The Sum of sales for each state is shown as text.
• From Dimensions, drag Category to Color on the same Marks card.
• If the size of the pie charts is too small, click Size on the Marks card to
adjust the size.
Build the map view
• The map view now shows the sum of profit, as well as the sum of sales
for each category, for each state.
Spider maps
• You can create maps in Tableau Desktop that show paths between origins
and destinations.
• These types of maps are called spider maps, or origin-destination maps.
• Spider maps are great for when you’re working with hubs that connect to
many surrounding points.
• They are an excellent way to show the path between an origin and one or
more destination locations.
• There are several ways to create spider maps in Tableau. This topic
illustrates how to create a spider map using two examples.
• Follow the examples below to learn how to set up your data source, and
build the view for two different spider maps.
Example 1: Metro station traffic in Paris, France
• To follow along with this example, download the Create Spider Maps in
Tableau Example 1 Workbook from Tableau Public, and open it in Tableau
Desktop.
• In the Create Spider Maps in Tableau Example Workbook, click the New
Worksheet icon.
• In the new worksheet, from Measures, drag Longitude to
the Columns shelf, and Latitude to the Rows shelf.
• From Dimensions, drag Line Group (Path ID) to Detail on the Marks card.
• On the Marks card, click the Mark Type drop-down and select Line.
• The map view updates with a line connecting all of the points. The Path
button should appear on the Marks card.
Build the map view
Build the map view