Join Curt Frye for an in-depth discussion in this video Creating a basic map, part of Tableau 9 Essential Training.
- View Offline
- [Voiceover] Creating maps in Tableau 9 is a straightforward process, but there are some quirks to it. So I wanted to take a movie to walk you through the process of creating a map in Tableau. As my sample file, I'll be using the Customer Locations workbook and you can find that in the Chapter 10 folder of the exercise files collection. And as you can see, I've already loaded the data from the Customer Locations Excel workbook and I have two fields, state and city.
The stylized globe icon next to those two measures indicates that Tableau recognizes them as geographic data. And if we look down in the Measures group, we can see that there are two fields, one called latitude generated and the other called longitude generated. And what that means is that Tableau was able to take my state and city data and generate what are called lat-long, or latitude-longitude pairs based on those values.
So with that background, let's go ahead and try to map the data. To do that, you need to hold down the Control key and click the fields you want to include. So I'll hold down the Control key and click both state and city, and then I'll go down to the Measures group still holding down the Control key, and click latitude and longitude. And when I do, you might have noticed that the map visualizations in the Show Me panel became available so I have filled maps and I have symbol maps.
Let's go ahead and create a symbol map. That's this icon, or button, so I'll click it and Tableau will create my map. It does take a moment, so I can see that I have a number of data points. I have Duluth, Minnesota, Moscow, Idaho, Revenue, Washington, Portland, Oregon, Washington, D.C., and so on. But now with the map created, let's take a look at the data underlying it because there's a few more things that I want to point out.
I'll go to the Analysis menu, and click View Data, and here you can see the sheet for the data that I entered, and there are a couple things to note, the first, is that for Revenue, Washington, we have a latitude and longitude generated. But for Vienna, Virginia, and Mount Crawford, Virginia, and also Quad Cities, Illinois, we don't have any values. They are nulls, which means they don't appear on the map. That means for whatever reason, Tableau wasn't able to look up a latitude and longitude value for those locations.
It also means they don't appear on the map, and that can be a problem. If you're creating a map, and it seems like some points aren't displayed, then you should definitely look at the underlying data, so again, you go to the Analysis menu and you click View Data, and you can see which points, if any, haven't been displayed. There are a couple of things that you can try to map these locations in Tableau. The first is to add more information. In the United States you might use a zip code, whereas outside of the U.S. you would use a postal code.
And also you might look for a more specific town name. For example, Vienna, Virginia, might not return a value but Tyson's Corner might. So if it's possible that a city or town has a different name or an alternate name, use that. And finally, it is also possible that the location might be an informal name or it might be too small to appear within the database. If that's the case, then understand that some of the points in your data collection might not be mapped.
When you're done looking at your data, you can click the Close box and go back to working with your map.
- Connecting to a data source
- Joining related data sources
- Creating visualizations
- Displaying the data underlying a workbook
- Creating custom calculations and fields
- Sorting and filtering data
- Adding crosstabs
- Creating heat maps, charts, and basic maps
- Building a dashboard