1 2 3 4 Previous Next 46 Replies Latest reply on Sep 5, 2014 11:15 AM by Joe Mako

    map, shapefiles and points

    Greg Sagan

      Hello,

      I've seen may references on how to create shapefiles that overlay on a map.  I need to be able to plot points over top of the shapefiles on the map.  Is this possible?

        • 1. Re: map, shapefiles and points
          Joe Mako

          You can get polygons and points in the same pane by making use of the multiple mark or combo marks feature of Tableau 6.

           

          However, the last time I checked, you could not get polygons, points and a Map Background at the same time. If all you need is polygons and points, and a white background is okay, that can be done.

           

          If you provide a sample data set (both polygons/shapefile and points), an example workbook can be made for you.

          • 2. Re: map, shapefiles and points
            Greg Sagan

            Joe,

             

            Thanks for responding.  I need to find a solution where I can show public safety districts/beats divisions of a city or county.  And plot calls for service & type on the map.  Any ideas?

             

            Greg

            • 3. Re: map, shapefiles and points
              Joe Mako

              Greg,

               

              There are a few options, and I can show you a few if you provide some sample data. :)

               

              I request sample data, so you can see how the data will need to be transformed. Additionally, generating sample data is not fun for me, but transforming data, visualizing and answering questions is.

              • 4. Re: map, shapefiles and points
                Greg Sagan

                Joe,

                 

                I have data for the district/beat,call type and geocodes. However, I do not have a shapefile.  I was going to create it if I had a solution.  I don't want you generating sample data, the help you offer is great.  Can you still show me the options you talked about without the shapefile or where can we go from here?

                • 5. Re: map, shapefiles and points
                  Joe Mako

                  > "I have data for the district/beat,call type and geocodes."

                   

                  - Can you provide a few rows from that data set? (anonymized if need be)

                  - Will the points you want to plot be one point per polygon, or lots of points spread around to visualize the density of the points?

                  - Will you want to color the polygons, or allow the viewer to interact with the polygons?

                  - What is the max count of polygons you expect to plot at one time?

                  - What is the max count of points you expect to plot at one time?

                  • 6. Re: map, shapefiles and points
                    Greg Sagan

                    Can you provide a few rows from that data set? (anonymized if need be)

                    (Greg) attached is a sample data set

                    - Will the points you want to plot be one point per polygon, or lots of points spread around to visualize the density of the points?

                    (Greg) Lots of points spread around

                    - Will you want to color the polygons, or allow the viewer to interact with the polygons?

                    (Greg) The color will be defined by us, static.

                    - What is the max count of polygons you expect to plot at one time?

                    (Greg) max is 15

                    - What is the max count of points you expect to plot at one time?

                    (Greg) max for a polygon, estimated 150.  Usually around 20-50.

                    • 7. Re: map, shapefiles and points
                      Joe Mako

                      Okay, sounds good, here are the steps that I did to produce the attached:

                       

                      1. Grabbed a shape file from the Census Bureau, and converted to a structure ready for Tableau, added as the sheet "Polygons" in the attached .xls

                      2. Unioned the two sets of data together as another sheet in the .xls workbook (you can also do this with SQL), see how the data is arranged. (I renamed the two "INCIDENT_L" fields so you can tell them apart)

                      3. Connected Tableau to the "Union" sheet, and converted the four lat/lon fields to a number data type, and moved them to the measure area.

                      4. Laid the fields out like in "Step 1" in the attached workbook - Setting them to a continuous dimension, so they are each a green pill with no aggregation, and formatted each pill, on the pane tab, to "Hide" "Special Value (e.g. NULL) Marks"

                      5. Created a double dual axis

                      6. Set the Marks pallet to "Multiple Mark Types"

                      7. Set the mark options for "Latitude" - this is the polygon one

                      8. Set the mark options for "INCIDENT_Lat" - this is the point one, I made it a shape

                      9. One the Color legends, I hid the "NULL" colors

                      10. I then hid the Headers

                      11. I placed it on a dashboard with the Size set to exact dimensions, to I could properly manually set the height/width ratio (because Tableau currently does not recognize the dual Lat/Long)

                       

                      I am uploading a video for this currently.

                      • 8. Re: map, shapefiles and points
                        Joe Mako

                        Here is the video: http://joemako.tumblr.com/post/3174038705/tableau-points-and-polygons-tutorial-video

                         

                        Correction: In the video I forgot to turn on "Synchronize Axis" for each of the secondary axis.

                         

                        and workbook with the done attached. You can unpackage the workbook if you want to see the underlying data as an Excel file.

                        • 9. Re: map, shapefiles and points
                          Greg Sagan

                          Thanks Joe, I looked at your example late last night. I'll see if your solution will satisfy their requirements, they really wanted to see a map with their roads.

                           

                          Question, can you plot two different type of shapes on a map? One set of data using symbols and the other using filled in circles over a map?

                           

                          Thanks

                          • 10. Re: map, shapefiles and points
                            Joe Mako

                            > "Can you plot two different type of shapes on a map? One set of data using symbols and the other using filled in circles over a map?"

                             

                            Yes, you just need to drop a dimension on the Shape shelf to set what kind of mark you want for each point.

                            • 11. Re: map, shapefiles and points
                              Greg Sagan

                              That may work.  I could do something similar to the hiking map example and use enlarged filled circles (ie. transparent) geocoded for each intersection of a district. Then use symbols geocoded for the nature of call.  This way I can see the underlying road map.

                               

                              This makes sense? Suggestion?

                              • 12. Re: map, shapefiles and points
                                Greg Sagan

                                ok, thanks

                                • 13. Re: map, shapefiles and points
                                  Joe Mako

                                  > "This makes sense? Suggestion?"

                                   

                                  Yes, and get some data and try it! :)

                                  • 14. Re: map, shapefiles and points
                                    Greg Sagan

                                    Need some help.

                                     

                                    Tried most of the afternoon but I cannot get the "multiple marks" selection to be available.  I've attached a worksheet and database.  Tried a single database, separating the databases and blending or a join which did not get the "multiple marks" selection to be available.  Need to set intersection points as a shape and incident points as symbols. 

                                     

                                    Ideas...

                                    1 2 3 4 Previous Next