2 Replies Latest reply on Jul 31, 2018 1:05 AM by Sebastian Sofariu

    Drawing a circle on a map?

    Imesh Bandara

      Hi everyone,

       

      Can anyone please help me to learn how circles have been added on this map (LINK)?

       

      THANK YOU VERY MUCH!

        • 1. Re: Drawing a circle on a map?
          Deepak Rai

          Please check underlying data. The values of Longitude and Latitudes are set up to create circles and Radius filter is used to filter data so that you get either 5 mi or 10 mi circles.

          Thanks

          Deepak

          • 2. Re: Drawing a circle on a map?
            Sebastian Sofariu

            Hi Imesh,

             

            While Tableau Desktop cannot automatically map radius circles around data points natively, it is possible to map circles via the Polygon or Line mark type in Tableau Desktop. 

             

            Generally, in order to implement this functionality, the following is necessary:

             

            1.  Database Latitude and Longitude values (the generated Latitude and Longitude values cannot be targeted in a Calculated Field)

            2.  A "degrees" field that contains values 1-360

            3.  Calculated Fields for both Latitude and Longitude, which draw the circle by referencing the original lat/long fields, a desired radius length, a radius coefficient (the radius of the earth in KM or miles), the aforementioned degrees field, and various trigonometric expressions.

             

            The below Community Posts contain various of methods of creating circles in Tableau Desktop.

             

            Richard Leeke's answer in the first link is likely going to be most pertinent, as the second link involves using third party shape utility programs such as TabGeoHack. 

             

             

            To display the circles at the time when clicking a point on the map:

             

            1. Open Richard Leeke's workbook by Tableau Desktop.

             

            2. Create a calculated field named Latitude or Circle Latitude.

            IF WINDOW_COUNT(MAX([ID]))=1 THEN AVG([Circle Latitude])

            ELSE AVG([Latitude])

            END

             

            3. Create s calculated field named Longitude or Circle Longitude

            IF WINDOW_COUNT(MAX([ID]))=1 THEN AVG([Circle Longitude])

            ELSE AVG([Longitude])

            END

             

            4. Replace Circle Latitude on Row to Latitude or Circle Latitude and Circle Longitude to Longitude or Circle Longitude

             

            5. Open a new dashboard and put the worksheet on it.

             

            6. Create an action filter as below.

            Source Sheet: Sheet 1

            Target Sheet: Sheet 1

            Tager Filter:

            -- Source Field: ID

            -- Target Field: ID

             

            Hope this help

            1 of 1 people found this helpful