Was this page helpful?
Yes No

Step 4: Explore your data geographically

Closed This multi-step tutorial introduces Tableau Desktop. You are on Step 4 of 8. This multi-step tutorial introduces Tableau Desktop. You are on Step 4 of 8.

You've built a great view that allows you to review sales and profits by product between 2014 and 2017. And after looking at product sales and profitability in the South, you decide to look for trends or patterns in that region.

Since you're looking at geographic data (the Region field), you have the option to build a map view. Map views are great for displaying and analyzing this kind of information. Plus, they're just plain cool!

For this example, Tableau has already assigned the proper geographic roles to the Country, State, City, and Postal Code fields. That's because it recognized that each of those fields contained geographic data. You can get to work creating your map view right away.

ClosedLearn more: Meet geographic roles. Learn more: Meet geographic roles.

Tableau recognizes a lot of common geographic data, such as state and city names. When Tableau recognizes this type of data, it automatically assigns fields appropriate geographic roles, so they become geographic fields.

Geographic fields have globe icons next to them in the Data pane. If a field is assigned a geographic role, Tableau automatically creates a map view when you add the field to Detail on the Marks card. More on that later.

If Tableau doesn't recognize your data as geographic, you can manually assign a geographic role to each of the relevant fields.

There are several geographic roles to choose from:

  • Airport
  • Area Code
  • CBSA/MSA
  • City
  • Congressional District
  • Country/Region
  • County
  • NUTS Europe
  • State/Province
  • Zip Code/Postcode

To see this in action, watch the procedure below.

Click the image to replay it

Build a map view

Start fresh with a new worksheet.

  1. Click the New worksheet icon at the bottom of the workspace.

  2. Tableau keeps your previous worksheet and creates a new one so that you can continue exploring your data without losing your work.

  3. In the Data pane, double-click State to add it to Detail on the Marks card.

  4. Pow! You’ve got a map view.

    Click the image to replay it

    ClosedLearn more: Double-click to add geographic fields. Learn more: Double-click to add geographic fields.

    You can double-click fields to quickly add them to the view. When you double-click a geographic field specifically, it's automatically added to Detail on the Marks card, and a map view is created with marks for each location listed in the field.

    Since Tableau already knows that state names are geographic data, and because the State dimension is assigned the State/Province geographic role, Tableau automatically creates a map view.

    There is a mark for each of the 48 contiguous states in your data source. (Sadly, Alaska and Hawaii are not included in your data source, so they are left out.)

    Notice that the Country field is also added to the view. This happens because the geographic fields in Sample - Superstore are part of a hierarchy. Each level in the hierarchy is added as a level of detail, like layers of an onion.

    Additionally, Latitude and Longitude fields are added to the Columns and Rows shelves. You can think of these as X and Y fields. They're essential any time you want to create a map view, because each location in your data is assigned a latitudinal and longitudinal value. Sometimes the Latitude and Longitude fields are generated by Tableau. Other times, you might have to manually include them in your data. You can find resources to learn more about this in the Learning Library.

    Now, having a cool map focused on 48 states is one thing, but you wanted to see what was happening in the South, remember?

  5. Drag Region to the Filters shelf, and then filter down to the South only. The map view zooms in to the South region, and there is a mark for each state (11 total).

  6. Now you want to actually see how your data shapes up for this region, so you start to drag other fields to the Marks card:

  7. Drag the Sales measure to Color on the Marks card.

    Click the image to replay it

  8. The view automatically updates to a filled map, and colors each state based on its total sales.

    Any time you add a continuous measure that contains positive numbers (like Sales) to Color on the Marks card, your filled map is colored blue. Negative values are assigned orange.

    Sometimes you might not want your map to be blue. Maybe you prefer green, or your data isn’t something that should be represented with the color blue, like wildfires or traffic jams. That would just be confusing!

    No worries, you can change the color palette just like you did before.

  9. Click Color on the Marks card and select Edit Colors.

  10. For this example, you want to see which states are doing well, and which states are doing poorly in sales.

  11. In the Palette drop-down list, select Red-Green Diverging and click OK. This should allow you to quickly see the low performers and the high performers.

  12. Your view updates to look like this:

    But wait. Everything just went red! What happened?

    The data is accurate, and technically you can compare low performers with high performers, but is that really the whole story?

    Are sales in some of those states really that terrible, or are there just more people in Florida looking to buy your products? Maybe you have smaller or fewer stores in the states that appear red. Or maybe there’s a higher population density in the states that appear green, so there’s just more people to buy your stuff.

    Either way, there’s no way you want to show this view to your boss because you aren't confident the data is telling a useful story.

  13. Click the Undo icon in the toolbar to return to that nice, blue view.

  14. There’s still a color problem. Everything looks dandy—that’s the problem!

    At first glance, it appears that Florida is performing the best. Hovering over its mark reveals a total of 89,474 USD in sales, as compared to South Carolina, for example, which has only 8,482 USD in sales. However, have any of the states in the South been profitable?

  15. Drag Profit to Color on the Marks card to see if you can answer this question.

  16. Now that’s more like it! Since profit often consists of both positive and negative values, Tableau automatically selects the Orange-Blue Diverging color palette to quickly show the states with negative profit and the states with positive profit.

It’s now clear that Tennessee, North Carolina, and Florida have negative profit, even though it appeared they were doing okay—even great—in Sales. But why? You'll answer that in the next step.

Check your work! Watch "Build a map view" in action.

Click the image to replay it

Continue to Step 5: Drill down into the details.

Top ^