A Useful USA Zip Code Shapefile For #Tableau and #Alteryx

featured


Introduction

I created a USA Zip Code shapefile that can be used in Tableau, Alteryx or other programs that read shapefiles. This article is simply meant to share the files I used and created and to document the original data sources.

I cannot promise that the final product is of perfect quality. From what I have read, getting zip codes perfectly represented is not an easy thing to do. I give the data sources I used to help anyone track issues that they may discover with this file.

Background

I had found zip_code_database a couple of years ago and have used it for a number of projects. Now that Tableau uses shapefiles so brilliantly, I decided to use Alteryx to blend the zip code database with a zip code shapefile that I downloaded from here.

The reason I did this has to do with the utility of such a file. The raw zip code shapefile is empty by itself. It only has polygonal boundaries for each zip code. That might be helpful for geospatial operations, but it doesn’t help us much when doing BI studies. The primary weakness of that file is that there is no state information in the file. I did the data joining operation in Alteryx to make a much more useful shapefile.

The resulting Zip_Code_Polygons in shapefile format should be useful for a lot of purposes. As shown in Figure 1, I had Alteryx add some goodies like zip code areas, perimeter lengths, centroids, etc. There are also fields included from the database including time zones, major cities, etc. I cannot vouch for the complete accuracy of this information, but it has served me well in the times I have used it. There seems to be some funkiness in the time zones, but I’m not too worried about that, so use it at your own discretion.

Zip_Code_Shapefile_Creation

Figure 1- The Alteryx data joining operation used to create the zip code shapefile. The two original files can also be downloaded in this article.


The Zip Codes Rendered in Tableau

Click here to download the Tableau 10.4 (twbx) file (you must rename the *.zip to *.twbx) of this information. The shapefile has been imported and an extract was created for this data.

Figures 2 through 5 are some renderings of this data and Tableau 10.4 absolutely crushes these drawings. There is almost no time delay in rendering the 33,000+ zip code polygons. Maybe I should throw this file at Power BI and do some comparisons!

USA Zip Code Map

Figure 2- The contiguous 48 USA Zip codes.


 

TimeZones_And_Zips

Figure 3 – The time zones colored by zip codes.


 

Northeast_Zips

Figure 4 – The zip codes of the northeastern US.


 

NY City Zip Code Map

Figure 5 – New York City and surrounding area zip codes.

2 thoughts on “A Useful USA Zip Code Shapefile For #Tableau and #Alteryx

  1. Thanks for posting Ken – looks like you added some useful fields in there. Whenever I had to solve zipcode related problems in Alteryx, I would also grab the file from census site but then have to blend to add other things that I needed. Your file will be an excellent base to work from on zip code related stuff.

  2. Pingback: 3danim8's Blog - A Useful USA County Shapefile For #Tableau and #Alteryx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s