For finding the shape files, check http://www.gadm.org/ or Google search for the terms:
shapefile administrative boundary
From http://www.gadm.org/country Spain is one of the options, and it looks like from the preview the level you are interested in is available. If you wanted the islands moved, you would have to edit the coordinates.
I created a tutorial video and vbscript for converting the shapefiles into something that can be drag-and-dropped into Tabelau: http://joemako.tumblr.com/post/3289363623/preprocess-shapefile-for-tableau-tutorial-video
Additionally, there are knowledge base articles on the topic as well:
Fantastic stuff Joe .. it all works exactly as you described.
Thanks a lot!
Hi - I created a map worksheet as described in your notes. See attached Tableau workbook.
There is a map on sheet 1 showing provinces of Spain.
Next I added a 2nd data source (Spain_network_quality.xls) which includes data I'd like to use to colour-code different polygons in the maps (for each province of Spain). The two data sources have a linked dimension called 'Province'.
I am able to colour code the polygons with a specific measure (DCR 2G Voice) however the map takes no notice of dimensions in the 2nd data source. I try to filter on 'Year' or 'Week' and cannot get anything to change. If I put these dimensions into the filter tab, the map disappears.
I tried switching the data files such that my map data was the secondary source instead of primary - but Tableau always switched the map data file to be primary.
Is there a way to link the data dimensions from my 2nd data source to filter measures in my map?
I created a dashboard (dashboard 1) and added Sheet 6 (which is a bar chart created from my 2nd data source). I applied the 'Use as filter' action - but this still didn't change my map ..
Can you see what I'm doing wrong?
network_quality_-_spain.twbx 1.7 MB
How about using parameters?
If that will not provide the desired result, you will need to join your data either when connecting or before Tableau. This join will likely effect your aggregation of choice.Depending on what you are looking for in an end result, you may want to make your data both tall and wide.
In the attached workbook, I cleaned up your polygons, taking the number of vertexes from 277,230 to 24,111, resulting in a noticeable refresh time difference, and provided an example use of parameters to filter.
Thanks Joe - parameters seem to be doing what I want. Great!
Cleaning up the polygons really helped too - how did you do that?
What do you mean by making data both tall and wide?
>Cleaning up the polygons really helped too - how did you do that?
I used a data transformation tool to perform the following:
- rounded to two decimal places
- removed consecutive duplicates
- if between three consecutive points, they had the same slope, removed middle point
- if first and last point were the same, removed one (Tableau will auto close polygons)
> What do you mean by making data both tall and wide?
See attached xls file for a before and after. You can see that the data is highly duplicated, this allows you to filter, calculate, and display nearly any viewpoint in Tableau. This is not necessary in every situation.
OK thanks - I'll try to create a tall&wide data file to see how it works.
Did you create a special VB script or similar to do such a data transformation? Or just manually?
One last question - on the edited map you created above, I'd like to select a province in 'Bar chart' section of 'New Dashboard' and then have it highlighted on the map (+ annotated value?) .. I couldn't find how to link this across the dashboard. Is it possible?
SQL is a good option for data transformation like this, a few union all statements, a one-to-many, and a many-to-many will massively duplicate the data like I did for that one row. If you need help crafting the SQL, post a sample data file.