Lesson 7 - Spatial Analysis
Estimated Read Time: 2 Hours
Learning Goals
In this lesson, you will learn to:
- Discuss use cases for spatial analyses and its various visualizations
- Create a visual for a spatial analysis
Welcome back! This Module has been all about creating visualizations, and the previous Lesson was no different. It taught you how to create two more types of statistical charts: scatterplots and bubble charts. Both of these charts can be used to visualize trends, or relationships, between variables in a data set.
In this Lesson, you’ll once again be focusing on a new type of chart: charts with a spatial aspect. You first encountered this type of chart back in Lesson 1 – Intro to Data Visualization. At the time, you had some questions concerning your data set that you couldn’t answer, usually because they included some sort of spatial aspect—for instance, whether children in certain states receive more flu shots, whether vulnerable populations vary by state, and so on. In this Lesson, you’ll finally be able to answer those questions by creating some geographic visualizations (maps!) in Tableau. Ready to add another chart to your Tableau repertoire? Then, let’s get started!
1. What is Spatial Analysis?
Spatial analysis refers to any analysis that incorporates a geographic component. The level of geography could be anything—from something as small as a specific latitude and longitude to something as big as an entire country or continent.
Say, for example, that you were looking at sales numbers for an international company. These sales are tracked according to each customer’s address. While this address is an exact location, it also includes the city, state or province, country, and continent of that buyer, which gives you, the analyst, a variety of options when it comes to analyzing this data spatially. You could, for instance, group sales by city to determine which cities have the most buyers.
When performing spatial analysis, data integrity is incredibly important. If one address listed Barcelona, and another listed Barça, you’d need to treat these cities as one and the same. Otherwise, the integrity of your data would suffer. Or, one address might list “USA” as the country while another uses “United States.” This would need to be adjusted for consistency.
Ideally, the data system collecting this spatial information already incorporates such checks. You may have encountered something like this yourself when making a purchase online and typing in a billing or shipping address. Many companies will reformat the address entered by the user or provide a matching address that fits the format of their data collection system. Many postal services, too, use address verification. Companies can reference these databases of verified addresses when customers enter their information.

Figure 1. Many postal services keep databases of verified addresses, which online sellers can use to verify their customers’ addresses.
2. Map Types
You already learned about the importance of maps in the history of data visualization back in Lesson 1. The first maps were directional and used solely for navigation. However, as the fields of data and statistics grew, maps came to be used for much more than getting around. The map of Napoleon’s Russian campaign, for example, was created as a way to visualize the direction and size of Napoleon’s army during his attempted invasion of Russia. As an analyst, it’s these types of maps that you’ll be working with the most—maps for analyzing differences in data across geographies.
Analytical maps fall into a number of different categories based on the manner in which they display information:
- Point maps, which display individual points
- Heat maps, which display point densities
- Choropleth maps, which use colors to code regions
- Graduated symbol maps, which use size to display quantities
Each of these types of maps will be explained in turn.
Mapping Software
There are many software programs capable of creating maps for spatial analysis. Tableau has this capacity, as do R and Python. However, spatial analysis isn’t the sole purpose of these programs. In order to take advantage of more-complex mapping capabilities, you need to use a piece of software created specifically for spatial analysis.One of these more-complex mapping capabilities is called geocoding. Geocoding allows you to turn addresses into a set of coordinates (i.e., latitude and longitude). Just like how computers can use a binary language of 0s and 1s to encode information and perform calculations, so too can programs use a numeric language to encode address information. Instead of storing a database of every single address in the world (which would require a multitude of different formats), all address information is simplified to a single set of coordinates.
You may have learned about latitude and longitude in school, along with the equator and prime meridian:
Figure 2. Imagine if the world were a giant tomato and you just hacked it into quarters. You would have sliced along its equator and prime meridian! (Source: Meridian (geography), Wikipedia)
Everything north of the equator has a positive latitude, while everything south of the equator has a negative latitude. Similarly, everything east of the prime meridian has a positive longitude, while everything west of the prime meridian has a negative longitude.
The Eiffel Tower, for instance, has a latitude of 48.858374° and a longitude of 2.294484°, which are both positive (its actual address is Champ de Mars, 5 Avenue Anatole France, 75007 Paris, France). Conversely, the Christ the Redeemer Statue in Brazil has a latitude of -22.951823° and a longitude of -43.210454°, which are both negative (its actual address is Parque Nacional da Tijuca – Alto da Boa Vista, Rio de Janeiro – RJ, Brazil).
The most popular spatial analysis program is Esri’s ArcGIS software, but many others exist. You likely won’t need to geocode data yourself in your work; rather, you’ll work with information that’s already been geocoded. Tableau can use latitude and longitude to display individual points, as well as recognize geographic boundaries such as countries and states. As such, most of the spatial analysis you’ll be conducting will use these geographic boundaries (instead of latitude and longitude).
2.1. Point Maps
Point maps are maps that show the exact location of events. They use a set of latitude and longitude coordinates to display the point at which something has occurred. Take the map in Figure 3, below, which shows the birthplace of each world language. Each dot on the map represents the birthplace of a language. The map itself is descriptive in nature, relying on users themselves to notice any patterns and trends that the data suggests:

Figure 3. Did you know there were 2,678 different languages in the world? (Source: After Babylon)
If, however, you were to start aggregating the points in certain geographic areas, you’d be creating an analytical map that defines these trends. For instance, you can see that the concentration of languages is very dense in Indonesia and the Philippines, especially in comparison to, say, Russia. You may also be able to detect patterns and even some time-based facts from this map. Notice the line of languages down the left side of the American continent? This mirrors how Indigenous peoples migrated. Do you think this could offer some insights into how languages developed around the world?
2.2. Heat (Density) Maps
Heat maps turn individual points into a relative density to demonstrate trends. They’re most useful when there are too many points close together to distinguish each individual data point. In this way, you can think of them as a subtype of point maps. The point map in Figure 3, above, for example, included a dense cluster of languages around Indonesia and the Philippines. This made it hard to distinguish the number of points in this region. To combat this, you could use a heat map, which shows the relative density of those points using a color scheme.
TIP!
Heat maps can also be called density maps or hotspot maps.
Believe it or not, you’ve likely seen heat maps before—as part of a weather forecast! Weather stations use heat maps to display temperatures across an entire geographic region. These maps are created by displaying the relative density of individual temperatures taken across the region, then associating that density with an intuitive color scale. With temperatures, for instance, it makes sense to display colder temperatures in blue and warmer temperatures in red. You’re probably familiar with maps like those in Figure 4, below:

Figure 4. -10 in the north. 27 in the south. Only in the U.S.! (Source: Weather Central)
Heat maps are unique because they create their own spatial boundaries. Notice how the blue doesn’t stop at state boundaries, rather, follows the natural flow of the changing weather currents?
Think back to John Snow’s cholera map, which you first looked at in Lesson 1. The Environmental Systems Research Institute (ESRI) worked with John Snow’s data and overlaid a heat map on top of his point map. The high density of points makes a point map less effective (there’s simply no way to count all those dots). A heat map would provide a better solution for visualizing those high-density areas on the spatial plane:

Figure 5. Fortunately, we don’t use individual water pumps to dispense water anymore. Unfortunately, cholera is still a global threat!
The red circles in Figure 5, above, represent individual cholera deaths, while the red and colors in the background represent areas of high point density. You can see how the density is centered around the water pump responsible for inflicting the local population with the disease. The color scale goes from red to yellow, with the lightest yellow colors representing the fewest cholera deaths. The large blue dots indicate the regions John Snow used for his original analysis (you can ignore them).
The ESRI have created an online resource demonstrating how they used geographical mapping software to embellish John Snow’s map. Item 6 in the content list provides a short description of how they used a heat map to embellish the original point map: John Snow’s Cholera Outbreak Mapping, ESRI.
Unless you perform a lot of spatial analysis, you won’t often be working with latitude and longitude. Instead, you’ll more commonly work with spatial boundaries such as regions, countries, or neighborhoods. For these types of spatial analysis, you’ll be working with choropleth and graduated symbol maps.
2.3. Choropleth Maps
Choropleth maps are maps that shade predefined spatial areas in proportion to some numeric count or statistical value. You’d want to use a choropleth map if you were comparing the relationship between a geographic variable and a quantitative data element. For example, you could create a map of the European Union with each member state shaded according to its population count or percentage. Light green could represent low populations, medium green could represent medium populations, and dark green could represent high populations.
Take a look at the example in Figure 6, below, from the Migration Policy Institute, which displays asylum acceptance (or recognition) rates in European countries:

Figure 6. Countries like Switzerland, Ireland, and Norway have higher asylum recognition rates, while countries like the Czech Republic, Iceland, and Poland have lower asylum recognition rates. (Source: Migration Policy)
Country boundaries form the color blocks, and the degree of each country’s shading corresponds to that country’s rate of asylum recognition. Switzerland is one of the darkest-shaded countries. This means it has one of the highest asylum acceptance rates (it offers asylum to a high proportion of individuals seeking it). Countries with similar rates appear similarly colored, while countries with lighter shading have lower rates. The table on the right shows a breakdown by nationality of individuals seeking asylum (though this isn’t shown on the map itself).
2.4. Graduated Symbol Maps
Graduated symbol maps are maps that use symbols, most commonly circles, whose sizes are proportional to some count or numeric value. Similar to choropleth maps, graduated symbol maps show the relationship between a geographic variable and a quantitative data element.
Let’s look at an example. André Oliveira created a map of graffiti by British artist Banksy. The size of each orange circle corresponds to the count of graffiti sites in that area. Bigger circles mean more Banksy work:

Figure 7. A quick glance is all it takes to see that most of Banksy’s work has been in North America and Europe. (Source: André Oliveira)
Graduated symbols can be combined with choropleth maps to show the relationship between geography and two quantitative variables, similar to how bubble charts allowed you to compare more variables than a scatterplot. These combination maps don’t have any special name, but they’re still a common way to show multiple variables on a single map:

Figure 8. The states with more unauthorized immigrants are those with large international travel hubs, such as California, Illinois, New York, and Texas. (Source: The Economist)
You’ll be creating a combination map, along with the other maps already introduced in this Lesson, in Tableau. Let’s take a look!
3. Mapping in Tableau
Although Tableau can’t convert addresses to latitudes and longitudes, what it can do is use coordinates, along with spatial boundaries, to create some pretty impressive maps. To practice making some of your own analytical maps in Tableau, let’s walk through a few examples using data on UNESCO world heritage sites.
- Download the 2019 UNESCO sites data set (.xls). The file lists the names for each UNESCO site, along with their latitudes and longitudes.
As always, it’s a good idea to profile your data set first. This will let you know how many records it contains, what variables are included, and whether the variables are numbers or text. You can perform an abbreviated profiling by simply examining the file in Excel.
Once done, open a new Tableau workbook and connect to the UNESCO file, choosing the data tab. Navigate to Sheet 1 and rename it “Heritage Sites Map.”
Notice that Tableau categorizes some of the variables as dimensions (or qualitative) and some as measures (or quantitative). In previous Lessons, you recoded these default classifications. When working with the candy data set in Lesson 3: Data Visualization & Storytelling, for example, you had some variables that should have been classified as dimensions (above the divider in the variable menu), but Tableau classified them as measures (below the divider). Seeing how Tableau categorizes your data when initially loaded can be a helpful first step. Remember, dimensions are textual data, while measures are numbers—data you can use in calculations. Tableau can also give each variable a more specific data type such as number (#), text (ABC), or date (calendar icon).
In the Measures section, you’ll find some date variables listed (date_end and date_inscribed). However, they’ve been categorized as numbers. This is because those dates only include years rather than full dates, making them unsuitable for the date data type.
With spatial analysis, you’ll encounter another variable type—geographic data elements. You’ll see one such data type in your Dimensions list now:

Figure 9. A globe icon next to a variable means that that variable is a geographic data element.
If you click on the down arrow to the right of the variable name and select Geographic Role, you can see that Tableau is categorizing this field as a State/Province. This may vary depending on where you live because region categorizations vary. For instance, a “state” has a different geographic meaning in Europe than it does in the United States. As such, these next few steps may look different depending on your region.

Figure 10. What’s in a state?
Double-click the geocoded_state_en variable name to create a map. Tableau will automatically put the variable on the Marks card under Detail while placing the Longitude (generated) and Latitude (generated) on the Columns and Rows shelves respectively. A map with a single point in the state of Georgia will likely appear below. This happens when Tableau treats “states” as states defined in the United States, thus, treating the country of Georgia as the state of Georgia:

Figure 11. There are zero world heritage sites in the state of Georgia.
As you can see, Tableau doesn’t always guess correctly. Though this field is is supposed to represent countries, Tableau used the column name to categorize it as States, so you need to reassign it. Return to the variable menu and, this time, select Country/Region under Geographic Role. The map should now have a point in the geographic center of each country in the data.
TIP!
If you don’t live in the United States, Tableau may not have made this error. If Country/Region or just Country is already selected under Geographic Role, then you don’t need to do anything!

Figure 12. That looks better!
You should also see a few new variables show up in your Measures list:

Figure 13. Tableau has automatically created these latitude and longitude variables for you.
The first set comes from columns in the Excel file. Each UNESCO site was accompanied by the geocoded location—locations that were derived from sets of latitudes and longitudes. The second set of variables (i.e., the ones with (generated) attached to them) were automatically generated by Tableau. These come from the geocoded_state_en variable. Tableau recognized that this variable was a geographic data element, so it generated latitude and longitude variables from it in order to translate the country names into regions on a map.
As you know quite well by now, data profiling is a common—and important—step in any analysis. While you’ll usually perform it in more depth, you can also do some of your initial profiling steps directly in Tableau. This Lesson added a few more steps to that initial profiling by introducing spatial variables into the mix. These variables require special treatment not only in how they’re used for your analysis, but also in how Tableau categorizes them. They warrant their own variable icon after all!
4. Point Maps
Now that your data is in Tableau, you can start to build some maps! Begin by removing everything from the view. Click on each variable name and select Remove to do so, leaving you with a blank sheet:

Figure 14
Creating a point map with latitudes and longitudes is quite simple. The data has a row for each UNESCO site, and you want to show each of these sites on a world map. Simply drag the Latitude variable to the Rows shelf and the Longitude variable to the Columns shelf. This will likely create a map of a single point because Tableau tends to aggregate information by default. You first witnessed this when you were creating your scatterplot.

Figure 15
This isn’t a very useful map! Mapping average latitude and longitude simply doesn’t make sense. If you’ll remember from the previous Lesson, however, there’s a way to turn this off—simply open the Analysis menu and select the Aggregate Measures option to deselect it:

Figure 16
Once done, you’ll be presented with a world map of all the UNESCO world heritage sites:

Figure 17
Just like with your previous charts, it can be a good idea to do some reformatting at this point, especially in terms of colors and labels. Here, for instance, each heritage site has been categorized as “cultural,” “natural,” or “both.” Why not use color to visualize this on the map? Go ahead and drag the Category variable from the Dimensions list to the Color box on your Marks card.
If you click on the Color box again, you’ll be able to adjust the default colors to ones that better fit your color guidelines. In this example, we’ve used an intuitive color palette: “Natural” sites are green; “Cultural” sites are green’s complementary color, blue; and “Mixed” sites are a mixture of green and blue, brown:
Figure 18
You can also adjust the background image of your maps in Tableau. Change the underlying map image by going to the Map menu at the top of your screen and choosing Background Layers:

Figure 19
This will open a menu on the very left of your Tableau view (where the data variables are usually listed). Change the map Style (under Background) to Normal. The water on your map should turn blue. Additionally, check to add the Coastline as a Map Layer, which will add an outline to all the land masses on the map. Feel free to explore the other various options on your own:

Figure 20
Finally, let’s make the point map title a bit more descriptive. Something like “UNESCO World Heritage Sites by Category” would work well:

Figure 21
Congratulations! You now have a point map of the UNESCO world heritage sites according to heritage category.
Point maps are perfect when it comes to things you typically think of maps doing—for instance, showing where things are located. You decide on the scale, be it world, country, region, city, or neighborhood level, then examine the relationships between the points. For instance, are the points concentrated around certain areas or are they evenly dispersed? The heritage sites are mainly concentrated on land masses, but you can see that some exist on small islands or in the water. You can also use color to add another piece of information—in this case, the type of heritage site—to the mix.
5. Heat Maps
You may notice when looking at your map that there are some regions, such as western Europe, that are covered in points, making it difficult to see which countries have heritage sites and where. This high density of points makes your map a good contender for a heat map. Let’s set one up in Tableau!
Start by making a duplicate of the map you just made in a new sheet. To do so, right-click the sheet’s tab at the bottom of your view and select Duplicate:

Figure 22
Rename the original sheet containing your point map to “Point Map” and name your new, duplicated tab “Heat Map.”
Up to this point, you’ve been using the Show Me menu to change the type of your visualization. When making these changes, the Marks type also changed. This time, while you do want to change your map from a point map to a heat map, you won’t do so via the Show Me menu. This is because you don’t want to change the type of visualization altogether; rather, the type of point map. This subtype is found through the Marks card rather than your Show Me menu. At the top of the card, you’ll find a dropdown menu currently displaying Automatic. Change this to Density:

Figure 23
Your map will be now transformed from a point map into a heat map. Notice that the Categories variable has been moved—it’s now associated with the Detail box rather than the Color box on your Marks card. This is because density maps use color as an inherent property of the density (differences in density are shown by differences in color). Thus, you can no longer use color to show an “extra” variable.
You’ll also notice that the heritage site categories are no longer represented on the map. This is because variables on the Detail card are no longer being shown. As such, you can remove it completely from the Marks card without changing your visualization:

Figure 24. Right now, your heat map looks a bit like cotton candy.
Once again, take this opportunity to adjust the colors on your new map. You’ll find that Tableau treats colors for heat maps a bit differently than the rest of the charts you’ve made. You can’t pick a specific color; rather, a color scheme. The Density Multi-color light scheme is a very typical hotspot coloration with lower densities represented by green and higher densities represented by red. Once chosen, your map should look something like this:

Figure 25. That’s a bit easier to interpret than the blue!
One thing you may notice is that the color blends into the ocean. Let’s get rid of the blue color you added to the ocean for your point map by going back into the Map Layers options and removing the Base. Additionally, remove the Land Cover layer, which will leave you with nothing but country names, borders, and coastlines:
Figure 26. Less color in the background makes the colorful heat masses really pop out.
Note that the text labels for country names are only visible when zoomed in. Let’s do so now! Try zooming into western Europe. When your mouse is on the map, a menu will appear in the top-left corner. The rectangle with the magnifying glass allows you to zoom into a rectangular region of your choosing:

Figure 27. Simply click the rectangle and magnifying glass icon, then draw a rectangle on the screen to automatically zoom into that area.
Alternatively, you can search for places on the map. Click the magnifying glass (not the rectangle and magnifying glass), then type “Norway,” and the map will automatically zoom to that country:

Figure 28. Did you know Santa Claus’s village is in Lapland?
When zoomed out to show the entire world, this map works better as a heat map. This is because when zoomed out, there are some areas where the points are so dense that they become unidentifiable. Zoomed in, however, like with the Nordic map above, a point map would work fine. At this level of zoom, the points are more spread out, making it easy to identify each individual point.
This is a great demonstration of the art of data visualization. Both maps can be used for different needs to show the location and distribution of events or data on a spatial canvas.
6. Choropleth Maps
Point maps and heat maps are useful for identifying specific locations. Oftentimes, however, what you’ll be interested in as an analyst is how many items of something exist or occur in an existing spatial boundary. Using this same UNESCO heritage site data set, let’s visualize how many heritage sites exist in each country (i.e., which countries have the most UNESCO sites).
Create a new sheet in Tableau and title it “Choropleth Map.” For this type of map, rather than working with individual latitude and longitude points, you’ll be working with spatial boundaries. In this data set, the spatial boundaries are the countries, which are found in the geocoded_state_en variable.
Tip!
Before you go any further, make sure you turn Aggregate Measures back on in the Analysis tab.
Double-click the geocoded_state_en variable. As before, Tableau will place the generated Latitude and Longitude on the Rows and Columns shelves respectively, defaulting to a point map with a single point in the center of each country. You may notice that there’s no point located in Greenland. This is because this data set (from 2019) hasn’t been updated to include the three new sites added to the UNESCO list for Greenland:

Figure 29. Which countries don’t include any UNESCO heritage sites?
Tableau has two types of map visualizations. Point and heat maps are what Tableau refers to as “symbol maps.” A choropleth map, however, is different, and is simply classified as a “map.” Using your Show Me menu, change from a Symbol Map to a Map:

Figure 30. A map isn’t the same thing as a symbol map!
The countries with points (i.e., the countries with UNESCO sites) will now be colored blue. A few countries, such as Zambia, remain unshaded as they had no point within them:

Figure 31. Somebody needs to get Zambia and South Sudan a UNESCO heritage site.
Choropleth maps are used to show numeric values on a spatial platform, most commonly in the form of counts. What you want to do now is create a map that shows the number of heritage sites in each country using color.
As you’ll recall from when you examined the Excel file, each row of the data set is a heritage site. To get the total count of heritage sites, you’ll want to count the number of records. Fortunately, for you, Tableau automatically generates a data(Count) variable in the Measures list. Drag this variable to the Color box on your Marks card, and Tableau will automatically add an aggregation, choosing to CNT() the number of records. In this case, a count is exactly what you want:

Figure 32. Just like that, your countries are shaded according to the number of UNESCO heritage sites they have!
Remember from the design guidelines you learned that people have a hard time distinguishing between too many colors. Tableau generated a continuous color scale from 1 to 55 sites. However, this isn’t exactly what you’d call intuitive and easy to interpret. Let’s change that to a discrete scale, which will allow you to choose a maximum number of colors (five in this case).
Click on the Color box on your Marks card, select Edit Colors, and change the palette to Stepped Color with 5 steps. Choropleth maps that show counts commonly use monochromatic color schemes, so keep the palette monochromatic for now (but feel free to change the color itself if you want):

Figure 33. Using fewer, discrete colors makes it easier to interpret the map.
Notice that some of the color variation did, indeed, disappear. For instance, all the countries in Africa and most of South America (except Brazil) are the same color. Meanwhile, China, Italy, and Spain have the darkest colors, making them the clear winners when it comes to the highest number of UNESCO heritage sites.
At this point, feel free to play around with the formatting options under Map Layers. For instance, try changing the Style to Dark. The style is mostly a preference. Some people prefer light, while others prefer dark. Go ahead and choose dark for this map to see which background you prefer.
Notice that the color legend has a somewhat undecipherable title—CNT(data). To change it, select the dropdown arrow on the right side of the title and choose Edit Title:

Figure 34
Change the title to “Heritage Sites Count.” While you’re at it, go ahead and rename the entire map something more descriptive, for instance, “UNESCO World Heritage Sites”:

Figure 35. Even something as simple as more-descriptive titles and labels can make a “world” of difference for those trying to interpret your map!
You now have a choropleth map that shows the countries with the most and fewest heritage sites! Congrats!
Unlike with your point and heat maps, you no longer see where each individual heritage site is located. Instead, the map shows which countries have the most heritage sites. Theoretically, you could obtain this same information from a point map; however, you’d have to count each of the points manually, which could prove difficult for countries with 22, 23, and even 35 points! As such, whenever you want to know how many of something is contained within a geographic boundary and compare that how many of something across a geographic region, a choropleth map is your best choice.
Tip: Orienting Your Map
Suppose you don’t like how your map is currently oriented; for example, the fact that North America seems to be split across the seam, appearing on both the left and right sides of the view. You can move the Americas (or any other geographic location, for that matter) to the center of the image very easily.First, place your mouse in the view so that the map menu in the top-left corner of the map appears. Choose the bottom arrow icon to extend the menu, then select the crossed arrows to pan the view:
Figure 36. The icon for the pan function looks like a set of crossed arrows.
Once selected, click anywhere on the map, then hold and drag the mouse to rearrange the map however you want. You could, for instance, move the Americas to the center, like in the image below:
Figure 37. Make America centered again! (Actually, unless you were specifically trying to showcase something only in the Americas, displaying them in the center would make for a poor orientation choice. A better solution would be to position the continents so that no land masses are cut in half, for instance, with the Americas on the left and Africa, Europe, Asia, and Australia on the right.)
7. Graduated Symbol Maps
Remember how we said earlier that point maps and heat maps are related? In fact, in Tableau terms, heat maps are actually just a subset of point maps. Similarly, choropleth and graduated symbol maps are also related. Graduated symbol maps are simply choropleth maps that use size rather than color to convey a count. Let’s make your own now!
Duplicate your choropleth map into a new sheet and name it “Graduated Symbol Map.” Use the Show Me menu to change the type of map you’re using—a Symbol Map instead of a Map:

Figure 38. When making a graduated symbol map, you’ll want to choose the Symbol Map option from the Show Me menu.
Your map should update to look something like this:

Figure 39. Your map should look similar to the default point map you created before, only this time, with circles of various sizes.
Once updated, your map will change from visualizing the number of heritage sites in each country using color to visualizing them with differently sized circles (the larger the circle, the more heritage sites in that country).
Notice that Tableau has automatically created four circle size categories. This number can vary, so you’ll want to check that these categories are appropriate for your map. Like color, the size of something can be hard to interpret if you have too many different categories. As a general rule, never use more than five size categories:

Figure 40. Tableau has created four circle size categories: one for countries with 1 heritage site, one for countries with up to 20 sites, one for countries with up to 40 sites, and one for countries with up to 55 sites.
If you want, you can change this symbol to something other than a circle. To do so, change the dropdown menu on your Marks card from Automatic to Shape. A new Shape box should appear:

Figure 41. Changing the dropdown to Shape will add the familiar Shape box back to the list of options on your Marks card.
You can use the Shape box to change the shape of the symbols on your map. For demonstrative purposes, change the shape to an X. This makes it a bit harder to differentiate the different sizes. We recommend sticking to circles whenever you make your maps. If you do choose to use a different shape, ensure that it’s filled (rather than hollow), as this makes it easier to distinguish the different sizes.
Graduated symbol maps display the same information as choropleth maps—numbers, or counts, according to some spatial boundary. This makes the choice between using choropleth maps and graduated symbol maps a simple matter of preference. One advantage graduated symbols do have is that all its shapes exist on the same scale. When looking at the map, viewers’ eyes will automatically gravitate towards the largest circles. With choropleth maps, while their eyes will be drawn to the darkest colors, they’ll also be drawn to the largest sizes, which don’t actually have anything to do with the counts. For instance, a viewer would be more likely to notice China than Italy and Spain simply because China is bigger.

Figure 42. Though China, Italy, and Spain all share the same dark color, China will naturally draw viewers’ eyes simply due to its size.
8. Combination Maps
As discussed earlier in this Lesson, you can combine choropleth and graduated symbol maps in order to display two distinct counts. This allows you to show two different variables on the same map, similar to how you used color and size to add new dimensions to your scatterplots. While you can’t use size to add a variable on choropleth maps, what you can do is use the size of a graduated symbol to add an additional variable, thus combining these two map types into a single combination map. This combination map has no special name; however, you can create them in Tableau using the “dual axis” method. Let’s take a look!
Once again, duplicate your choropleth map tab and name the new tab “Combo Map.” This will give you a base choropleth map to work with. On top of this, you’re going to add a graduated symbol map that shows how many of these sites span multiple countries.
Heritage sites spanning more than one country only have one country geocoded in the data set. Wadden Sea, for instance, is a heritage site that spans the countries of Denmark, Germany, and the Netherlands. However, it’s only geocoded to Germany (it only shows up in the number of heritage sites for Germany). This is where the Transboundary variable comes into play. This variable lists all heritage sites that occupy more than one country. You can use this variable to add information about multi-country heritage sites to your map.
In order to create a combination map, you first need to create a second map. (These maps will be merged at the end!) While holding either the Command key (for Macs) or the Control key (for PCs), drag the Latitude (generated) variable to the Rows shelf to create a second copy. This will result in two maps:
Figure 43. Double the maps—double the fun!
You should also now have multiple Marks cards:

Figure 44. There should now be two copies of the Latitude (generated) variable on your Marks card, allowing you to individually adjust both of your maps.
Click on the bottommost Latitude (generated) variable to display the options for the second map:

Figure 45. You can switch back and forth between the two variables on your Marks card with ease!
Right now, the options on the Marks card are the same for both maps. Let’s change that! Start by changing the mode of the bottommost Marks card from Map to Circle. This should change your bottommost map from colored countries to colored circles:

Figure 46. Changing options on the bottommost Marks card will only change the bottommost map. Convenient!
Next, drag the CNT(data) variable (listed under the boxes on your Marks card) to the Size box. This will change how the variable is visualized—from color to size. The circles on your bottommost map should now all be the same color but have different sizes, similar to a graduated symbol map:

Figure 47. There are those dots again.
Now, you want to change the graduated symbol map to display a new variable. Rather than the total number of heritage sites, you want to look at heritage sites that span multiple countries, which is recorded in the Transboundary variable. Drag the Transboundary variable (from the Measures list) on top of the CNT(data) variable listed on the Marks card. This will replace the CNT(data) with the new Transboundary variable. Dragging any variable on top of another one will replace the original variable.
What’s changed here? First, the variable in the Marks card has changed to SUM(transboundary). In addition, a new legend has appeared with this new variable name and a scale of 0 to 3:

Figure 48
Most importantly, the map now displays the Transboundary variable:

Figure 49. The circles on your map now represent how many heritage sites span multiple countries.
Because the values cover such a small range (0 to 3), you can show a different sized circle for each value (0, 1, 2, and 3) rather than using a continuous scale. On the Marks card, click the down arrow next to the SUM(Transboundary) variable and check the Discrete option:

Figure 50. Remember—“continuous” refers to a complete range between two numbers, while “discrete” refers to a fixed number of individual categories.
Your legend should update to display a different-sized circle for each value:

Figure 51. After changing the variable to discrete, your legend should display an individual category for each value.
The point of this visualization, however, is to highlight countries that do have multi-country heritage sites—in other words, a Transboundary value greater than zero. As such, let’s introduce some color to further highlight these circles. While holding the Command key (on Macs) or Control key (on PCs), drag the SUM(Transboundary) variable to the Color box on your Marks card. Each category of circle size will update to additionally display a unique color, which will be shown in a new color legend:

Figure 52. Your circles should not only be multi-sized, but multi-colored, as well!
As always, you’ll want to do a bit of adjusting with your new colors. Select the Colors box to bring up the Edit Color menu, then make the “0” value a lighter shade than the other values using shades of gray:
Figure 53. “Four Shades of Gray,” the next sizzling blockbuster in data analytics literature.
You may decide that you want to remove these 0s altogether. Unfortunately, you can’t filter only this bottom map. If you remove the 0s from the graduated symbol map, you’ll also remove them from the choropleth map. This will change both maps so that they only show counts of heritage sites that span country borders. This is because filters work on a sheet level. While you might have two different maps, because they’re on the same sheet, Tableau treats them as a single visualization.
And now for the final step—combining your two maps into a single combination map! Click the down arrow next to the second Latitude(generated) variable in your Rows shelf and select Dual Axis:

Figure 54. If you remember that “dual” means “two,” then you can remember that “Dual Axis” will combine TWO maps into one!
Once selected, the two maps will merge into one:
Figure 55. By the powers of choropleth maps and graduated symbol maps combined, I am a Combination Map!
From here, all you need to do is adjust the labels. First, update the map title to something more descriptive, like “UNESCO World Heritage Sites by Country.” Next, edit the graduated symbol legend title to “# Crossing Borders.” You can also hide the title of the color legend since it’s redundant with the graduated symbol title. To do so, click the arrow next to the title and deselect the Show Title option:

Figure 56. Redundant titles will only clutter your map.
You now have a map that displays the count of heritage sites using different shades of blue, and the count of sites that cross country borders using multi-sized, multi-colored circles. It makes it easy to see that, for instance, Spain has many heritage sites and many that cross borders. China, on the other hand, has many heritage sites but few that span country borders:

Figure 57. Who knew you could display so much information on a single map!
Combination maps allow you to show more information than you could on a single choropleth or graduated symbol map, making them handy when you have multiple variables you want to display at the same time.
Summary
You’ve already learned a lot about the benefits of using visualizations to display data over the course of this Module, but most of those benefits pale in comparison to how useful visualizations are for spatial analysis. It’s easy to see how maps were one of the first ways to display data, both for navigational and analytical purposes.
In this Lesson, you explored a few common mapping categories for spatial analysis and what types of analysis they’re best suited for. The type of map you choose will depend on the type of data you want to display (individual points versus spatial boundaries). You finished up by creating some maps for yourself in Tableau: a point map, a heat map, a choropleth map, a graduated symbol map, and a combination map. That’s a lot of map types to add to your Tableau arsenal! In the next Lesson, you’ll explore how to create visualizations out of qualitative data in the form of sentiment analysis and word clouds. But first, let’s create some maps for your Cliqz project!
Suggested Readings & References
Exercise
Estimated Time to Complete: 1-3 Hours
Let’s create some spatial visualizations to examine which countries search for most queries or even which countries type longer queries.
You’d need this to determine if you need more servers to serve those countries or a better search algorithm to cover local results
Directions
- Create a map of query counts (or lengths) per country.
- Decide whether you want to look at a particular month, year, or average across time.
- Add the other parameter from above (count or length of query) to the map, turning it into a combination (dual axis) map.
- Update your visualization using the style guide you created in Lesson 2: Visual Design Basics & Tableau.
- In a Word doc, describe any spatial trends you see:
- Which countries have the highest? The lowest?
- How does time impact those trends?
- Take a screenshot of your final visual, including any legends, and include it in your Word document together with your answers from step 4.
- Export your final Word document as a PDF and upload it on the drive for your mentor to review.
- Publish your workbook to Tableau Public in order to save your progress and submit the link along with your PDF.
Bonus Task
- Reproduce the geo map in Excel.
- Find a list of latitudes and longitudes online on a topic of your choosing. (Try searching “GPS coordinates” + “[your subject of interest]”.) Use this list to create a point map and heat map in Tableau.
Submission Guidelines
Filename Format:
- YourName_Lesson7_GeoMaps.docx
When you’re ready, submit your completed exercise to the designated folder in OneDrive. Drop your mentor a note about submission.
Important: Please scan your files for viruses before uploading.
Submission & Resubmission Guidelines
- Initial Submission Format: YourName_Lesson#_…
- Resubmission Format:
- YourName_Lesson#_…_v2
- YourName_Lesson#_…_v3
- Rubric Updates:
- Do not overwrite original evaluation entries
- Add updated responses in new “v2” or “v3” columns
- This allows mentors to track your improvement process
Evaluation Rubric
| Criteria | Exceeds Expectation | Meets Expectation | Needs Improvement | Incomplete / Off-Track |
| Spatial Analysis |
|
|
|
|
Got Feedback?
Contact
Talk to us
Have questions or feedback about Lumen? We’d love to hear from you.







