A Useful DMA Shapefile For #Tableau and #Alteryx


Introduction

Contrary to the title, this article contains two Designated Marketing Area (DMA) shapefiles that might be useful for people that need to display data in Tableau at the DMA level.

The first offering is a full-resolution shapefile, with all the fine-scale boundary definitions intact. This shapefile is about 76.2 Mb. The second offering is a generalized shapefile (at the 1 mile level). This shapefile is about 1.6 Mb.

The generalized shapefile will make displaying DMA-based data in Tableau much faster to prepare without sacrificing too much DMA geometry accuracy.

This article accompanies a presentation I gave at the Atlanta Alteryx User Group meeting on Thursday Jan 14, 2021. I have included a practice video recording I made of this presentation in this article.


Background

In a recent segment of work, I encountered a time-sink related to a geospatial data join in Tableau. Since I frequently have to do these types of joins, I wanted to reduce the time needed to complete them.

This article and the video shown below contains the information about that situation and how I formulated a solution.

My Description of the Problem and the Solution



Download the DMA Shapefiles


Click here to download the full-resolution DMA shapefile (Figure 1). Note that key = 000 is the USA national DMA polygon that I created, so that you can display data at the national level if you have it. You can use a filter to turn off key=000 in Tableau to avoid having this coverage over-riding your DMA based results.

Figure 1 – Full resolution DMAs used to display data.

Click here to download the 1-Mile generalized DMA shapefile (Figure 2). Note that the key = 000 is the USA national DMA that I created, so that you can display data at the national level if you have it.

Figure 2 – 1-Mile generalized DMAs used to display data. Notice that it is very hard to see differences in DMA boundaries at this scale.

Download the Alteryx Workflow for Generalizing the DMAs


Click here to download the packaged Alteryx workflow that I developed to generalize the DMAs. This workflow contains the full-resolution DMA shapefile, which is the input file shown in Figure 3.

Figures 4 through 6 show various aspects of this workflow. Users that are not used to writing shapefiles should recognize that field names need to be less than 8 characters. This is why I had to use short field names starting with “D” to hold the computations of “Delta”, or “change from” the original areas and boundary lengths, as shown in Figure 5.

Figure 3 – The Alteryx workflow for generalizing DMAs, or any type of polygon for that matter.

Figure 4 – The 1 mile generalization setting used in the workflow.

Figure 5 – The last formula tool is used to compute the changes in area and boundary lengths, as well as the percent changes.

Figure 6 – The polygon generalization workflow only takes 40 seconds to execute.

Final Thoughts

Be sure to listen to the presentation within this article if you want to understand more about polygon generalization. I discuss when it is useful and applicable to use, and I discuss when you should not do it. Thanks for reading!


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.