1 13 14 15 16 17 Previous Next 517 Replies Latest reply on Apr 7, 2020 10:52 AM by Kent Marten Go to original post
      • 210. Re: Grow your own Filled Maps
        Richard Leeke

        I've never seen that error before, so can't answer off the top of my head.


        I just tried it with your files and got exactly the same issue on my machine - so it's definitely something with your files (which is good news - you've given me a repro so that makes my life easy).


        I'll have to debug into it to figure out what is going on before I can give you an answer. Will try to look at that this sometime soon...

        • 211. Re: Grow your own Filled Maps
          Richard Leeke

          I had a quick look and I'm 99% sure that the problem is that you have spaces in your field names. I'm really surprised nobody has run into this before - I suppose it must be a very uncommon case.


          I don't have time to try to figure out how to cope with that better just now - I had a quick try and couldn't get any of the obvious approaches (like wrapping the field name in quotes wherever I use them) to work. I do remember that the utilities I'm using under the covers were quite pedantic over that sort of thing and I didn't find the documentation very comprehensive, so ended up with a lot of trial and error.


          A quick Google also turned up this phrase in a document which I think applied to accessing field names in shape files using those utilities (even that wasn't clear!):


          The names are required to be well behaved tokens (no spaces, or odd characters).

          If you are creating the shape file from QGIS I'm guessing you may have control over the field names. If so, try replacing the spaces with underscores and see how you go.

          The error was specifically on "Dealer Cod" and you also reference "Dealer Nam" in the YAML file - but I'd do all 4 of the ones with spaces in them to be on the safe side.

          Let me know how you get on.

          • 212. Re: Grow your own Filled Maps
            Brian Scheur

            Spot on!  Exactly the issue.  Working fast with data that isn't mine performing unfamiliar processes has led to a lot of little hiccups like this... This was the first that i wasn't able to troubleshoot on my own.  Thanks so much Richard (for this, and for everything else in this thread and others)!

            • 213. Re: Grow your own Filled Maps
              Sanjin Matusan



              I am trying to display filled map so Croatian counties.I am using your TabGeoHack tool.

              I read your original post, documentation and other resources from on web (in particular blog post http://www.clearlyandsimply.com/clearly_and_simply/2012/03/create-your-own-filled-maps-in-tableau.html and Allan Walker blog) .


              However, I am jet unable to produce map. If someone can look, and point me in the right direction...


              Here are my files: https://www.dropbox.com/sh/zt46wbnv9uppsmz/97QTe_TYIc

              Shapes.zip – my counties vector layer. Displayed correctly in QGIS.

              Zupanije.csv – output from tabgeohack –roles command, my custom geocoding

              Zupanije.yml – my tabgeohack config file

              Book1.twbx – my Tableau workbook


              Thanks in advance,


              • 214. Re: Re: Grow your own Filled Maps
                Richard Leeke

                You were almost there - there's just one line in the YAML file which you don't need.


                The role-hierarchy is only there to control purging of unwanted data to keep the size of the geocoding database down (so that packaged workbooks don't get too big). By adding the line for the Zupanije role to the end of the hierarchy you are actually telling tabgeohack to delete all the rows of new data that you have just imported.


                Deleting that one line from the YAML file gives this:




                You will notice that the character set for the names hasn't been handled very well - lots of question marks. I'm afraid that happens down in the libraries I'm using, so there's nothing I can do about that. I did have a bit of a look to see if I could when I was first writing it, but I had to make do with passing on the warning, which you will have seen at the --roles stage:


                Warning: Conversion of shape file Zupanija2.shp to ESRI format and target CRS generated warnings:

                Warning 1: One or several characters couldn't be converted correctly from UTF-8 to ISO-8859-1.

                This warning will not be emitted anymore

                Warning 1: Value '3059888378.00000000000' of field Shape_1_Ar has been truncated to 19 characters.

                This warning will not be emitted any more for that layer.

                • 215. Re: Grow your own Filled Maps
                  Rod Light


                  First of all, thanks for the great work you have put into your 'hack'.

                  I'm trying to build an 'alternate' method for getting to the same result you do using Alteryx as an interface to create the spatial objects and configuration files. My vision is to make it more of a 'parameter-driven interface' that could make it easier for a user to get the final results.

                  I've gotten much of it completed, but am getting hung up on writing the Geometry field that TabGeoHack adds to GEOCODING.FDB.

                  Would you mind sharing the back-end process (I'm assuming it is a Firebird process) that enables the rewrite of the database tables?

                  If you are willing, you can connect with me directly at rlight@alteryx.com.

                  Thank you,


                  • 216. Re: Grow your own Filled Maps
                    Richard Leeke

                    I'll drop you an email so we can find a mutually convenient time to talk.


                    I've seen the Alteryx interface being used to drive the equivalent of shapetotab (probably your work too, I imagine?) and it looks very slick. Doing something similar for adding geocoding would certainly be a lot nicer than having to pick your way through YAML files.

                    • 217. Re: Grow your own Filled Maps
                      Rod Light

                      I can't take credit for the app you probably saw using the Alteryx platform...It was one of our Sales Engineers that put that together. And yes, he did a good job of putting that together.

                      It will be great if we can connect.


                      • 218. Re: Grow your own Filled Maps
                        Sanjin Matusan

                        Thank you very much Richard


                        I managed to crate filed maps for my administrative regions. Country->Region (Regija)->County(Zupanija)->City(Naselje)


                        Now I need to expand and collapse the hierarchy by clicking on quick filter or using the parameter or some other way...


                        For example, I plan to have parameter control: Level of detail by which user will be able to choose map level detail (Level 1, Level 2, Level 3 attached jpegs) but on the same map, not three maps, or options is to use some Tableau built in functionality, some drill down (currently I not aware of such functionality) – like“Desired behavior - collapsing map level when filter is changed.jpg” where I placed root hierarchy on Filled map Color


                        Desired behavior - collapsing map level when filter is changed (not working on example)

                        Desired behavior - collapsing map level when filter is changed.jpg


                        Maps for each level of detail:


                        Level 1 Regija (State)

                        Level 1 Regija (State).jpg


                        Level 2 Zupanija (County)

                        Level 2 Zupanija (County).jpg

                        Level 3 Naselje (City)

                        Level 3 Naselje (City).jpg


                        I need something similar like India or Brazil post -  http://community.tableau.com/thread/116369?start=195&tstart=0 post 198 and 202 (without the hierarchy or with hierarchy – hierarchy is better option I think)


                        my tabgeohack config file: Dropbox - Croatia.yml

                        my shapes: Dropbox - shapes.zip


                        Thanks in advance,


                        • 219. Re: Grow your own Filled Maps
                          Richard Leeke

                          For the India example you referred to I had arranged the various levels as a hierarchy, like this:


                          Put the hierarchy on the Detail shelf and as you expand and contract the hierarchy the borders adjust.


                          Automatically colouring at the lowest level of detail is slightly more tricky because if you put the hierarchy on the colour shelf it doesn't automatically colour the lower levels as you expand the hierarchy.


                          The trick is to define a calculated field like this, and put it on the colour shelf.


                          IF (MIN([Name_L3]) == MAX([Name_L3])) THEN


                          ELSEIF (MIN([Name_L2]) == MAX([Name_L2])) THEN


                          ELSEIF (MIN([Name_L1]) == MAX([Name_L1])) THEN






                          As long as you have more than one member at each of the lower levels that will automatically return the dimension at the lowest level of detail that you have expanded the hierarchy.

                          • 220. Re: Grow your own Filled Maps
                            Sanjin Matusan



                            Do I need to create hierarchy for my custom geo-coding – for importing custom geo-coding in Tableau?

                            When I analyze IND - RL.yml I see that Level1 first repeats all fields from level0, level2 repeats all fields from level1… for example:

                                -   role_name: Level1


                                        -   IND_adm1.shp



                                            alias: ID_L0


                                            alias: Name_L0


                                            alias: ID_L1

                                            # unique ID indicator (default false)

                                            unique_id: true


                                            alias: Name_L1


                            Similar is written in the official Tableau documentation http://onlinehelp.tableausoftware.com/current/pro/online/en-us/maps_customgeocode_importfile_newhierarchy.html

                            "The next level is Region so its import file should contain columns for both Theater and Region. An example is shown below. … Continue down the hierarchy making sure that each file contains columns for the current level and all of the levels above it."


                            I didn't do that part of config in my yaml file. Maybe because that my borders don’t adjust with hierarchy change?


                            Thanks in advance

                            • 221. Re: Grow your own Filled Maps
                              Richard Leeke

                              I had forgotten all about that - it's a very long time since I've looked at this in any detail, but I think you are quite right.


                              I just had a quick look at the original shape files that Minh supplied for India and as you pointed out, the lower levels include the identifiers for the higher levels, so I carried those over into the custom geocoding files, which allowed Tableau to construct the hierarchy.


                              So if your shape files don't include the higher level identifiers directly you may have to do some data transformation before importing the geocoding.


                              I think this is right but I really can't remember for sure, but it certainly sounds familiar and as you say that fits with how the YAML is defined.


                              Thinking about it, that has to be right - how else would Tableau know which level of the hierarchy to use for the geocoding?

                              • 222. Re: Grow your own Filled Maps
                                Juracy Americo

                                Hi Sanjin and Richard,


                                Because I did that recently I can say,  you are both right.

                                Before run tabgeohack for the Brazil example I manage the shapefiles in QGIS to include the identifiers for the higher levels into the lower levels and after that the tabgeochack can carrie those over into the custom geocoding files.


                                Best regard

                                • 223. Re: Grow your own Filled Maps
                                  Sanjin Matusan

                                  Yes, thank you, this also seems logical to me, and now pieces come together


                                  My shapes do not have this information but I have information in database so I will adjust and add that information in resulting Custom Geocoding Files\*.cvs files, or if this won’t work I will do it in shape  dbf files directly.


                                  I'll try this in the next week and I will post the result in the group.


                                  Thank again for your help and for pointing me in the right direction, and for great tool of course.


                                  Now I saw your post Juracy also. Thanks

                                  • 224. Re: Grow your own Filled Maps
                                    Juracy Americo

                                    Hi Richard,


                                    Thank you for this piece of information:



                                    IF (MIN([Name_L3]) == MAX([Name_L3])) THEN


                                    ELSEIF (MIN([Name_L2]) == MAX([Name_L2])) THEN


                                    ELSEIF (MIN([Name_L1]) == MAX([Name_L1])) THEN





                                    1 13 14 15 16 17 Previous Next