community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx Designer Knowledge Base

Definitive answers from Designer experts.

How To: Create a Thematic Polygon Outline

Alteryx
Alteryx
Created on

 

The Report Map Tool (master it here) allows to create thematic maps by selecting a "Theme" field on the Data tab and then further defining the theme on the Layers tab, for example: 

 

 12-28-2016 4-27-33 PM.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The above example creates a map of Texas showing average annual rainfall totals where orange is the least rainfall and blue the most: 

 

12-28-2016 4-31-20 PM.png

 

Pretty nice, right? But what if you want to change the map and instead of applying the theme to the fill color for the polygons, you want to apply the theme to the outline and just show that? 

That is a little trickier because the Report Map Tool allows you to adjust the outline color and size of your polygons, it doesn't automatically apply the theme, so a workaround needs to be built.

You could feed in each polygon as an individual layer but that is difficult to manage - to keep the color gradient consistent, making sure they are in the right order. And what if a new rainfall range is introduced? You might have to adjust a couple of layers to account for it. 

 

A better option would be to turn the polygon outlines into line polygons themselves. That would allow you to apply a theme right to the outline polygons. 

 

In order to do this, we will use the following tools: 

RecordID

Poly-Split

Filter

Poly-Build

Join

Reporting Tools

 

12-30-2016 4-11-45 PM.png

 

 

  1.  A RecordID is assigned so that we can pull the data apart and put it back together again. 
  2. The polygons are split into detailed regions using the Poly-Split tool and rows flagged as 'holes' are removed. 

  3. The polygons are split into points.

  4. Those points are reassembled as a sequence polyline. The create the polyline, the data is grouped by the RecordID to keep each polyline separate. (A polyline contains multiple line segments, where a line has one start and one endpoint, but can have any number of points in between. A polyline can be quite complex as in the case of road systems, or rivers.)

  5. The sequence polylines are joined back to the original data set. 
  6. Using the reporting tools to create the maps with rainfall range as the thematic field.

With that workaround you can create a map that looks like this: 

 

12-30-2016 4-15-16 PM.png

 

 For details on tool configurations, see the attached workflow.

Attachments
Comments
Meteoroid

Very impressive.  Thank you for sharing this visual.  

Meteoroid

Can you tell me how you originally structured your data set on this workflows data input?  Did you manually derive or did you use an algorithm to vertically assemble your spatial polygons?

 

Thank you,

 

John

Alteryx
Alteryx

Hi @johnfischbeck 

I downloaded the data with the polygons, so I don't know how they were originally structured unfortunately. I didn't make any changes to them except for what you see in the workflow. I'm not 100% sure where I downloaded it from (it was a few years ago), but I think it was NOAA. 

I put the data into a text input tool to avoid having to attach a file to the workflow. 

If you hit "copy data with headers" in a browse tool, you can then right click anywhere on the canvas and hit "paste" to create a text input tool with the data from the browse tool.