Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Determining which DMA a Zip most greatly falls into based on total area

DBillerth
5 - Atom

Hi all,

 

Background:

 

In a csv, I have a list of all U.S. zip codes and the DMA in which they fall into. But because many zip codes fall into multiple DMAs (zips dont align with DMA geographical boundaries perfectly),I have multiple rows of the same zip code but with a different DMA associated. 

 

What I'm Hoping To Do:

 

Let's assume a single zip code falls into 3 different DMA's. In terms of geographical area, I'd like to assign a DMA to a zip based on the criteria that the zip most greatly falls into a single DMA of a group.

 

Zip X | DMA A | 20%

Zip X | DMA B | 50%

Zip X | DMA C | 30%

 

In the above example, I'd like the output to be Zip X = DMA B. I'd like to do this for my entire list.

 

Thanks in advance!

2 REPLIES 2
tom_montpool
12 - Quasar

The Spatial Match tool can be used to create the intersection polygon between the ZIP and DMA polygons. If you are doing this nationally, be sure to deselect the ZIP and DMA polygon objects in the tool configuration -- it really speeds things up!

 

Then the Spatial Info tool can get you the area of the intersection polygons.

 

Then Sort on ZIP (Asc) and Area (Desc)

 

Then the Unique tool with ZIP selected should get you each ZIP and the DMA it has the largest intersecting area with.

DBillerth
5 - Atom

Thanks so much Tom,  this worked out great. I appreciate your help!

Labels