3 Replies Latest reply on Apr 24, 2014 7:16 AM by Michael Daivs

    Parameters and Maps

    Michael Daivs

      I was working with maps and thought that it would be great if I could allow the user to select the level of granularity. Practically it could be used to switch between regional and local aggregations for entire dashboards that include maps.  I put together a simple workbook to test the idea of changing a map reference based on a parameter and this is what I came up with.


      It would be great to hear other's thoughts.




      (Import the attached csv into your custom geo-coding to and set the geographic roll for the "Location Depth" to the geocoding.)

        • 2. Re: Parameters and Maps
          Jonathan TRAJKOVIC

          Hi Michael,


          To allow user to choose a level of detail on a map you have to use Lat/Long in your datasource (not with a geographical role). Indeed, if you use imported custom geocoding and geaographical role you will have an error when changing the level of detail becasue you can associated only ONE role to a calculated field.


          But if you use the Lat/Long directly in the datasource, you can create a parameter and change the level of detail. You just have to use Lat/Long in Average and create a calculated field using your dimension.


          I hope my answer give you some help!




          Jonathan T

          • 3. Re: Parameters and Maps
            Michael Daivs

            Hi Jonathan,


            That all makes sense and is absolutely true assuming that you are working with geocoding the way it was intended to work.


            However like with any good piece of technology Tableau allows the users the freedom to manipulate the functionality fairly easily thus creating different ways of working with the product. (One other example of this freedom is tooltip functions/graphs)


            The point I was trying to make is that if you put every geocoded location into a single geographic role and treat it like a hash table (dictionary in Python) you can do some cool things with it.


            1. You can use the single custom geocoding role for every one of the fields that you want to map as long as there are not two things named the same way that have different locations. (Including non-geographic mapping like floor plans, as long as you change the background image and set the scale of that image to -180 to 180 along the x and -90 to 90 along the y axis)
            2. You can apply this master geocoded list to a function that switches between partitions of the data on a parameter control like the example I showed. This works because every geocoded value is in the single geographic role that the parameter controlled field is associated with.
            3. Maintenance of custom geocoding is easier since you only have a single file to keep up to date.


            I don't know much about speed limitations when you create very large tables of geocoded values but this method works well for at least a few dozen values.


            Thank you for your feedback.