12 Replies Latest reply on Nov 23, 2015 11:50 PM by Richard Leeke

    Tableau Maps

    Sudarshan Nelaturi

      I am relatively new to Tableau .

       

      I have a requirement, where i have to plot an address location on the Tableau and pass Radius as a Parameter, once the user chooses the parameter the circle from the point should increase or decrease based on the Radius Value. I have had a look at the KB article http://community.tableau.com/message/176349. It got a bit hard for me to understand.

       

      Any suggestions will be highly appreciated

        • 1. Re: Tableau Maps
          Shawn Wallwork

          I took it apart, stripped it down to it's bare essentials, and I still can't figure out how it is drawing the radius circles. There's usually a radius formula in there that uses the parameter as a variable, but in this workbook there's nothing like that. I reached out to Richard Leeke to see if he had any idea what is going on.

           

          In the meantime try this workbook instead: Re: Concentric circles

           

          At least it has the radius formulas in it:

           

          CIRCLE LONGITUDE

          IF [Type]="Circle" THEN

          DEGREES(RADIANS( [Longitude] ) +  ATAN2(COS(([distance in Km]*[Radius])/6371)-SIN(RADIANS( [Latitude] ))*SIN(RADIANS( [Circle Latitude] )), SIN(RADIANS([Degree]))*SIN(([distance in Km]*[Radius])/6371)*COS(RADIANS( [Latitude] ))) )-90

          ELSE [Longitude]

          END

           

          CIRCLE LONGITUDE

          IF [Type]="Circle" THEN

          DEGREES( ASIN(SIN(RADIANS([Latitude]))*COS(([distance in Km]*[Radius])/6371) + COS(RADIANS([Latitude]))*SIN(([distance in Km]*[Radius])/6371)*COS(RADIANS([Degree]))) )

          ELSE [Latitude]

          END

           

          These are the two fields doing all of the work. See if you can work out how to apply this to your situation. Meanwhile, we'll wait to see what Richard says.

           

          --Shawn

          • 2. Re: Tableau Maps
            Shawn Wallwork

            Here's the stripped down version of the radius workbook, just in case anyone wants to have a go at explaining how these circles are getting drawn. (It's a 9.1 workbook.)

             

            --Shawn

            • 3. Re: Tableau Maps
              Richard Leeke

              The circles are drawn as Filled Map areas, so I must have created a shape file containing sets of circles with radius 1, 2, 3, 4, 5 and 6 centred on each of the stores in your main viz.Those shapes have then been imported as custom geocoding with my tabgeohack utility.


              The [Store Circle] calculated field appends the radius parameter value to the store name to form the identifier for the circle to draw.


              So whilst this approach allowed a few things that you were wanting to do at the time, Shawn (like labeling the circles and perhaps overlaying on other filled map areas, it required quite a bit of work to set up the data very specifically for those particular stores and radii.


              I think the approach using the formulae is going to be a lot easier to get going.


              • 4. Re: Tableau Maps
                Shawn Wallwork

                Thanks for the help on this Richard. Good to hear from you again!

                 

                --Shawn

                • 5. Re: Tableau Maps
                  Sudarshan Nelaturi

                  Thanks Guys for this prompt response,

                   

                  I tried downloading the Stripped version of the workbook, it is giving me errors saying Tableau Cannot open this file.

                   

                   

                  Richard Leeke, I am trying to install the tabgeohack utility. Do you have any guidelines on how to go about it/

                  • 6. Re: Tableau Maps
                    Richard Leeke

                    My guess is that you are running a version of Tableau earlier than 9.1 (which is what Shawn used for that workbook). If you click the Show Details button on the error message when Tableau fails to load the workbook it will say "The file was created by a newer version of Tableau" if that is the issue.

                     

                    In terms of setting up tabgeohack, there are three resources you may find useful.

                     

                    1) The user guide (which is included in the zipfile you download from here) has detailed installation instructions (page 6).

                     

                    2) The Grow Your Own Filled Maps thread in Viz Talk has lots of discussion of setting it up and using it.

                     

                    3) Robert Mundigl wrote a really good step by step set of instructions for setting up and using tabgeohack on his Clearly and Simply blog.

                    • 7. Re: Tableau Maps
                      Sudarshan Nelaturi

                      Thanks Richard,

                       

                      Quick question, How did you get the Prefix of Filter Stores: in the filter card?

                      • 8. Re: Tableau Maps
                        Richard Leeke

                        There are aliases defined for the Filter Stores field. If you right-click on the field in the datasource and select Aliases... you'll see.

                        • 9. Re: Tableau Maps
                          Sudarshan Nelaturi

                          Thanks Richard,

                           

                          Is there a way to increase the size of the circle  based on the calculated value dynamically?Richard Leeke.

                           

                          I am happy to attach the tableau file if needed.

                          • 10. Re: Tableau Maps
                            Richard Leeke

                            Using the other approach Shawn linked to above, where the boundary of the circle is calculated with those formulae, the radius can be based on a value in your data or a calculated field, so yes, you can vary the size.

                             

                            With the original workbook you started the thread with - there are several different sized circles centred at the positions of each of the stores and a parameter chooses which sized circle to show. But the sizes and positions of those circles are baked into the packaged workbook (actually using shapes imported into Tableau as custom geocoding).

                            • 11. Re: Tableau Maps
                              Sudarshan Nelaturi

                              Richard Leeke Shawn Wallwork , Thanks a lot for all your support. Version of this has been completed and will be submitted for review to the execs in the next couple of days.

                               

                               

                              Thanks again guys

                              • 12. Re: Tableau Maps
                                Richard Leeke

                                Glad you got it going.