6 Replies Latest reply on May 25, 2012 11:50 AM by . Tableautester

    geocoding using different table

      Hi,

      I'm new to mapping using tableau, but have some experience in mapping and geocoding (MapInfo).

      here is my problem: I have a list of name that have various geographical reference. This could be postal/Zip code or in the absence of such a field, a city/state country name. Of course, the postal code vary by country Canada has a form A9A 9A9 while the us ha a zip code in the form 99999.

      My question is: is it possible to geocode in "stages", ie first Canadian postal code, then zip code then city of the world, etc...

      Is there any way to do something similar in Tableau (7 BTW)?

       

      Gérard Garreau

      Concordia University

        • 1. Re: geocoding using different table
          Richard Leeke

          If I understand you correctly there are really two questions in here:

           

          1) Can Tableau cope with different forms of postcode/zipcode?

           

          2) Can Tableau fall back to less and less precise geocoding, based on different geocoded fields, until it finds a match.

           

          The answer to 1) is yes and I'm fairly sure the answer to 2) is no (or at least I can't think how to achieve that).

           

          For the first case, all you need to do is have country and postcode fields in your data (with their geographic roles set appropriately) and place both on the view. The postcode field just needs to be a text field with the relevant format for each country. Tableau sorts out making the right association based on the Country.

          • 2. Re: geocoding using different table

            Richard,

            Thanks for the answer, Do I understand correctly your suggestion that canadian postal code and US zip code could/should be in 2 different fields. If so can I have multiple fields that are refered as "postal code"?

            On the other hand can I assign a single geographical role to a field and have 2 fields called longitude and latitude that Tableau can use to mapped different address? Our students come from pretty much anywhere in the world and I would like to map their origin.

            Thanks

             

             

            Gérard Garreau

            Concordia University

            • 3. Re: geocoding using different table
              Richard Leeke

              No, just a single [Postcode] (or [ZipCode]) field which has the postcode in whatever format applies to that country as well as a Country field which has the Country in one of the formates that Tableau understands (which can be the full name (including quite a few variants) or it can be one of various abbreviation formats.

               

              You just need to make sure that both [Country] and [PostCode] have their geographic roles set appropriately and you need both to be on the view.

              • 5. Re: geocoding using different table
                Gérard Garreau

                Another question on this. Is there any way to "force" tableau to use the custom geocoded file (one that has longitude and latitude)? Is there any way to know which geocode table tableau is using? Finally, I've read somewhere that the column name are case sensitive (latitude vs Latitude), and has a set of rules for their. However, I could not find information on this.

                 

                Thanks

                 

                Gérard Garreau

                Concordia University

                • 6. Re: geocoding using different table
                  . Tableautester

                  You need to make two different files, one is an .ini and the other is a .csv

                   

                  I don't think it really matters what you call the columns as long as you make sure they match in both files, you will have to change the data type to a number and tell Tableau it is a Long or Lat for the Geographic Role.

                   

                  Here is an example of one I made yesterday that works:

                   

                  In a file named "My Custom GeoCode.ini" I have the following:

                  [My Custom GeoCode.csv]

                  colNameHeader=True

                  Format=CVSDelimited

                  Col1="Area" text

                  Col2="Region" text

                  Col3="Comp" text

                  Col4="Market" text

                  Col5="Latitude" Double

                  Col6="Longitude" Double

                   

                  In a file named "My Custom GeoCode.csv" I have the following that looks like this fake data:

                  Area,Region,Comp,Market,Latitude,Longitude

                  North,Region1,Comp123,Market ABC,41.21,-114.15

                  South,Region2,Comp456,Market DEF,42.21,-113.15

                  East,Region3,Comp789,Market GHI,43.21,-112.15

                  West,Region4,Comp101112,Market JKL,44.21,-111.15