This post is NOT really intended to be a super-clean and comprehensive, step-by-step instruction set for how to draw Alteryx-generated polygons in Tableau. However, if you are willing to do a little work, you will be able to reproduce the results in this article.
This article contains my working notes and an example application, which will be very helpful to some people but may be insufficient for others. I might take more time to expand this post in the future, but for now I just wanted to get the basics documented before they slip my mind.
If you like this article and would like to see more of what I write, please subscribe to my blog by taking 5 seconds to enter your email address below. It is free and it motivates me to continue writing, so thanks!
My Working Notes
My motivation for writing this post is to help recreate certain types of work when the time is right for me to do it. I have placed a lot of information into an Excel workbook to help me (and potentially other people) remember how to use this approach. Click here to download this workbook.
There are two required Alteryx macros (xml code) stored on worksheets in this workbook. There are also two example Alteryx workflows (xml code) stored on worksheets in this workbook.
I use this method to store the Alteryx xml files because the WordPress content management system doesn’t allow direct uploads of files like these. I’m being sneaky by putting the Alteryx xml commands onto Excel worksheets, but I like working this way because all the files I need are in one place.
All you have to do is cut and paste these xml codes out of the Excel workbook and place them in ASCII files where they need to be. My working notes in the Excel workbook that is available in this post show you where the files have to be placed. A few other insights are also given in the working notes.
The Example Application
I wanted to document how polygons that are created in Alteryx can be visualized in Tableau. I chose to use the Chicago Bears home stadium (Soldier Field) as my base point for this analysis. Figure 1 shows the simple data I entered for doing two types of analysis. First, I calculated seven radii around the stadium from 1 to 50 miles. Secondly, I calculated seven drive time polygons around the stadium from 10 to 120 minutes. The choices of these values were simply arbitrary.
The reason I used seven replicate values of Soldier Field rather than seven different locations was to document another important feature of Alteryx that doesn’t get mentioned much. This feature allows you to produce a series of output files using a field in the database to automatically create a series of self-descriptive output file names.
In this case, I created a total of 14 output files using the values stored in the two fields called: Radius Distance (miles) and the Radius Drivetime (minutes) (see Figure 1). The Tableau data extract output files (*.tde) get named automatically in the workflow as (1) Soldier_Field_Radius_1.tde … (7) Soldier_Field_Radius_50.tde and (1) Soldier_Field_Drivetime_10.tde … (7) Soldier_Field_Drivetime_120.tde.
This automatic generation of output files is an outstanding feature of Alteryx that I use to my advantage in nearly every workflow that I create. In this case, I used two workflows to write seven output files each, for a total of fourteen automatically-named output files.
Figure 2 shows the workflow for calculating seven different radii around the Soldier Field Stadium in Chicago, IL. The automatic output file naming convention is created in the final step as shown in Figure 3.
Figure 4 shows the workflow for calculating seven different drive times around Soldier Field. It is very similar to the radius calculations except that a drive time value is selected as the computational method and the final step for creating the output files uses the Radius drive time (minutes) field to set the output file names.
Figure 5 shows four results from this work. The left side of the figure shows the 1 and 20 mile radius polygons. The right side of the figure shows the 30 and 120 minute drive time polygons. The procedures to draw these polygons in Tableau are documented by Craig Bloodworth in this video.
One of the nice things about Tableau is that once you create the settings for the first map, you can save the Tableau workbook to a new name and use the “Replace Data Source” feature in the new Tableau workbook to update the map with the new data stored in the next *.tde file. Click here for more information on how to use the replace data source feature. Finally, the polygons are drawn in Tableau with a transparency of about 50% to allow the maps to project through them.