Tableau

Shape Files for Tableau: GeoCoding SHP for the Rest of Us

Ever since Tableau natively started connecting to shape files, I’ve been itching to put it to good use.  However, it seems all the things I want (neighborhood tracts, odd zoning areas around places, and the like) have to be created.  Now, I’m not an Alteryx Ace or ArcGIS jedi, and I’m too cheap to buy a number of these things.  Googling gets you all kinds of things, but none of it has been helpful.

Until…

I was searching for something else and found that – are you ready for this – Google Maps has polygons and lets you make all kinds of personal maps.  I know people are able to make these things, but I’ve yet to figure out how…

So, I tried the next logical step.  If you’re willing to give your kidney, left eye, and right brain to Google (or at least all your data), you can download Google Earth.  Google Earth is loads of fun on its own.  Really, you can explore the whole world without ever stepping away from your computer.

Google Earth also lets you make personal maps and – you guessed it – shapes on a map.  Are you ready for this?

You can make shape files for free without coding!  Better yet, they work in Tableau!  Note: there’s limitations here – it’s gotta be able to be SEEN on Google maps.

My area that I wanted, the Columbus Zoo, spans 580 acres.  You bet this shows up on Google.  What’s nicer?  People upload photos, so I can make sure I’m capturing the right thing.

So how do you do this?

  1. Get Google Earth set up.  This part is on you or your IT department.
  2. Make a Google login if you’ve somehow made it this far without selling your soul er, giving up your data.  Otherwise, login.
  3. Find your place.
  4. Use the toolbar to make shapes.  Bonus points if you have digital artist’s tools.
  5. Save.
  6. Export the KLM file.

The expanded version:

Toolbar is at the top.

Click on either pin, polygon, or lines.  I chose polygon.

Hold down your left mouse button and trace the shape you want, then release.  If you stop early, it will make a straight line from your ending point to your starting point.  If you choose a clear stretch at the end, this is handy.  Otherwise, you’ll just get mad.

You can add notes, change the color (only useful on Google – does NOT go into Tableau), or do other fun things.  The notes DO come with the export, so if there’s additional data you want to add, feel free.

Click OK.

Rinse. Lather. Repeat. You can also add folders and drag items into it.  To export, I recommend putting them in folders and then selecting the folder.  To be confusing, mine is on the polygon.

Select ‘Save Place As…’  Google, being evil Google, wants you to save a KMZ.  DON’T DO IT!!!  Save it as a KML.

Drag this onto Tableau, do whatever joins you need, and look for the Polygon in the measures.

Congrats, you avoided buying a program and got to be an artist today!  You can also see why I did this.  And, yes, there really is a golf course that is owned by the Zoo.  Maybe someday, I’ll do a viz on that.

Leave a Reply

Your email address will not be published. Required fields are marked *