6 Replies Latest reply on Dec 27, 2012 12:49 PM by Joshua Milligan

    Multiple state map circles

    Thomas Swasey

      Novice at tableau.  Would like to show the US senators on a map showing their ages represented by a circle size relative to their age.  Other facts would also be in the popup. Each state would have 2 circles representing each senator.

        • 1. Re: Multiple state map circles
          Joshua Milligan

          Hi Thomas!

           

          I took a shot at doing what you described and have attached a workbook.  The workbook shows a possible version of the.circles view.  It also contains some other possibilities for visualizing the data.

           

          One of the things I love about Tableau is that it lets you explore the data visually, ask questions, and very easily create new ways of looking at the data. The process is very iterative and flexible.

           

          Take a look at what I came up with and see if it generates any other ideas!

           

          Joshua

          • 2. Re: Multiple state map circles
            Alex Kerin

            To build on Joshua's great example - there are ways you could have the two circles more distinct - for example using calculations to separate the senators in a state into two dimensions - then we can use multiple mark types and a dual axis map to have a lower transparency for one of the circles.

             

            If you had the Lat and Long in the data file (rather than allowing Tableau to calculate it, you could also physically separate the circles horizontally - something along the lines of

             

            New Longitude: if second senator in state then Longitude + 5 else Longitude

             

            However, as Joshua alluded to, you are not going to be able to easily compare the size of circles between 50 and 55 for example. The more interesting questions are around max age, average age and combined age:

             

            combined.png

            max.png

            • 3. Re: Multiple state map circles
              Shawn Wallwork

              If you had the Lat and Long in the data file (rather than allowing Tableau to calculate it, you could also physically separate the circles horizontally - something along the lines of

               

              Thomas, the easiest way to do this is just right-click your map (out in the ocean somewhere) and then click 'View Data'. This gives you a mini-spread sheet of your data, including Tableau's generated lat/longs. Click upper-left to highlight all, then copy. Paste into Excel, delete the '(generated)' from the lat/long headers. Now when you connect to it, you'll be able to use it like Alex suggested in a calculated field. [Why Tableau doesn't allow us to use the generated lat/longs in calculations, I don't know.]

               

              By the way, you're going to have some real problems with all those small eastern states, which is why filled maps make a lot more sense.

               

              And when 8.0 is released in a few months you'll even be able to easily solve the Alaska/Hawaii problem:

               

              Map 8.PNG

               

              --Shawn

              • 4. Re: Multiple state map circles
                Thomas Swasey

                Thanks

                I am presently using Tableau Public and can't open your twbx file. Any chance of getting an excel file with the data

                thanks

                Tom Swasey

                • 5. Re: Multiple state map circles
                  Thomas Swasey

                  Thanks to all for helping me. I'm a fan of smart and all of the answers worked. For my needs, I created the following by reassigning the second Senator longitude a value of longitude-1.

                   

                  http://public.tableausoftware.com/views/Senateages/Dashboard1?:embed=y

                   

                  Tom Swasey (original questioner)

                  • 6. Re: Multiple state map circles
                    Joshua Milligan

                    Tom,

                     

                    Hmmm....  I'm not sure why it won't open.  It is  a zip file.  Were you able to unzip it first?  Maybe you could use Tableau Reader?

                     

                    I've attached a spreadsheet of the data. 

                     

                    Here's how I got the data (it's one of those really cool things Tableau does, but isn't always obvious).  I went to a Wikipedia listing of senators which was in a table.  I selected the table and copied it to the clipboard.  Then I simply pasted into Tableau.  It read the clipboard and created a data source.

                     

                    I had to rename the fields and create a calculated field for the approximate age (the year the senator was born was included).  Hope it helps!

                     

                    Joshua