I've recently updated my mapping utilities to work with Tableau 8.2 (in the case of "tabgeohack") and to add support for point and polyline shape files as well as polygons (for "shapetotab").

It just occurred to me that the download links for the latest version are buried somewhere in the middle of page 22 of the gigantic Grow your own Filled Maps thread - so it will soon become really hard to find them.

So I've started this thread as a permanent location for downloading the latest versions. Then as and when new versions come out, I'll update this post so it always has links to any relevant versions.

I suggest that we keep this thread just for that and carry on using the original Grow your own Filled Maps thread for questions and support.

Summary of available versions:

Version 2.0.10 of tabgeohack is updated to work with Tableau 9.3 (due to a change in the way Zip Codes are stored). This release also contains a couple of other minor bug fixes and some changes aimed at supporting Mac (not completed).

Version 2.0.6 is still available in case of issues with the changes made for MAc support.

See the release notes (tabgeohack.txt) included with the release for details of what changed with each version.

Use tabgeohack version 1.0.13 for Tableau version 8.1 or earlier.

Version 1.0.11 of shapetotab adds support for the MULTLINESTRING geometry type which occurs in some polyline files.

Version 1.0.10 added an option to filter the contents of the shapefile, at export time.

Version 1.0.9 added support for shape files containing point or polyline features as well as polygons.

There were a few issues getting version 1.0.9 going with later versions of some of the components used, so version 1.0.8 is still available to fall back to if you have problems with the latest version.

The download files with the latest versions of both utilities include installation and usage documentation.

Thanks for all the great utilities. I am trying to figure out if I can take a AutoCad shape file of a floor layout and mimic what you have done with the tsunami map. Since this is not a geographic "map" would I be following the same steps as indicated in the Shape to Tab instructions?

I've never actually looked at the AutoCad shape file format, but what you say sounds right. You just need to end up with a file with a set of x,y coordinates for each shape, along with the point order, to allow you to draw polygons in Tableau. Basically you want a structure similar to the output from shapetotab, but with your x and y coordinates in place of lon and lat.

thanks. I have downloaded it and it's working. I want to purge the standard geography of county, zipcode, areacode, and CMSA. I tried doing it with a test file for Taiwan. See attached. I'm getting an uninitialized error. Am I doing something wrong in the yml?

I also posted on clearly and simply, but couldn't find how to attach the yml doc.

I had a quick look and I'm surprised nobody has hit this before - nothing has changed in this area since I first wrote it.

Firstly the reason for that "Use of uninitialized value $total_deleted" message was that no rows were deleted from any tables and I hadn't set the counter to zero before I started processing, so it gave a warning when I tried to print the answer. I've fixed that so it will be right next time I release it - but the error is completely harmless so I won't bother doing a new release just for that.

The reason nothing was deleted is down to the way I designed it to work. The various geographic roles form a hierarchy, with Country at the top, like this:

role_hierarchy:

- role: Country

children:

- role: State

children:

- role: City

- role: County

- role: ZipCode

- role: AreaCode

- role: CMSA

The way that the purging works is that you specify the roles that you want to purge and it purges everything at that level apart from any explicit exceptions that you want to keep. I did it that way because normally you are only interested in particular localised areas at some level, so it is much easier to say "purge all countries except Taiwan" than to list all of the countries that you do want to purge.

The geocoding database enforces referential integrity, so if you delete a country, all of the other roles for that country will be deleted, and so on down the tree. If you don't specify the lower level roles explicitly, only the children of the higher level roles atht are being purged will be purged. However you may want to keep a high level role, but purge some of the more detailed roles, in which case you can specify the lower level ones.

But where that breaks down slightly is that the lower level purging entries only apply to any exceptions that have been explicitly retained at the higher level.

In your case you have commented out the purging rule for country - which means that no countries will be purged. As no countries are being purged it doesn't look any further down the tree, hence nothing at all is purged.

I'm not quite sure what you were hoping to do. I'm guessing you wanted to keep all countries, states and cities and delete all counties, zip codes are codes and CMSAs. If so, the only way I can see to do that is to include the delete rules for country, state and city but list every single country, state and city as exceptions so they don't get purged.

On the other hand, as you seem to be focused on Taiwan data it may be that you actually want to delete everything except top level Taiwan data. If that's the case, you could say this:

purge_roles_exceptions:

# All countries except Taiwan are purged.

#Country:

# - Taiwan

# State is not listed, states for all countries except Taiwan will be purged explicitly

#State:

# City is not listed, cities for all countries except Taiwan will be purged explicitly

# City:

# County, ZipCode, AreaCode and CMSA are listed with no exceptions, so even Taiwanese

# entries will be purged

County:

ZipCode:

AreaCode:

CMSA:

I suspect you were probably trying for the first case. I don't think it has ever come up before, If that is what you need I'll have to have a think what I would need to change to make that possible. No promises.

the very thorough explanation is awesome and it makes total sense. I will take the direction of specifying the countries that we care about including in the analysis and then purge the unneeded roles and see how this goes. Have a great weekend!