Mapping custom polygons
Tableau supports not only using geographic map tiles, but also drawing and display custom polygons (or closed shapes). This can be helpful when visualizing or emphasizing certain areas in a map or background image.
In this recipe, we will draw custom polygons around two points of interest in Vancouver, Canada:
Getting ready
To follow this recipe, open B05527_05 – STARTER.twbx
. Use the worksheet called Custom Polygon
, and connect to the Vancouver Points of Interest
data source:
How to do it...
Here are the steps to create the custom polygon areas:
Change the mark type in the Marks card dropdown to Polygon.
Double-click on the Latitude and Longitude appearing under Measures. Make sure you double-click the Latitude and Longitude fields from the data source, not the ones that have the (generated) suffix.
From Dimensions, drag Shape Id to Detail.
From Measures, drag Point to Path in the Marks card.
Go to the Analysis menu, and uncheck Aggregate.
From Dimensions, drag Location...