1 2 3 Previous Next 33 Replies Latest reply on Jan 20, 2012 1:09 AM by Christopher Henderson

    Data Sharing

    Julie Repass

      There are now two methods presented for quickly converting polygon shapefiles into a file that can be directly connected to by Tableau to create selectable polygon layers (Tableau Desktop 6.0 is needed for the selectable feature).

       

      One option was developed for existing ArcGIS Users and is outlined in the Knowledge Base article Creating Tableau Polygons from ArcGIS Shapefiles

       

      The other option was developed using Open Source code by own of our users, Joe Mako on map, shapefiles and points on February 14th (@Joe it would be great to repost your solution in this thread too)

       

       

      Between the two methods and the options for selectable polygon features (see the Knowledge Base article Using Selectable Polygon Features in 6.0 for an example), I thought it would be great to start a thread to share what layers are available in a format readily importable by Tableau.

       

      Many layers created by users are based on freely-available data, so for public-domain data it would be great to share what has already been created so others may use the data immediately.  If there is a lot of data contributions we can pursue further organization of shared data as necessary. Using data blending capabilities in Tableau Desktop 6.0, the flexibility to extend the polygons with various types of attribute data from secondary data sources is made much easier.

       

      Washington Zip Code Boundaries

      wazipcodepts.csv

       

      To start, attached is a data source available for import into Tableau that is based on a polygon layer for Washington state using data from the U.S. Census Bureau (I did not include a sample workbook because it is included in the Knowledge Base articles listed above).  Only the boundary information is included so you may join only the attributes needed for your analysis in Tableau. 

       

      British County Boundaries

      britishcountypolygondata.csv

       

      The British County data set was created by Ty Alevizos here at Tableau.  He also created an example workbook that shows how this data can be combined with demographic information for analysis inside Tableau (attached as britishcounties6.0.twbx).

       

      Kind Regards,

      Julie Repass

        • 1. Re: Data Sharing
          Joe Mako

          As per your request, here is my tutorial video: http://goo.gl/DrNG6

           

          Is your intention to gather shapefile resources here?

           

          If so, here are some useful resources:

           

          - http://gis.stackexchange.com/ is a great resource

           

          - check http://www.gadm.org/ for administrative boundary shapefiles (or Google search for those terms)

           

          - http://www.nws.noaa.gov/geodata/ has a nice state level shapefile that I used in my video

           

           

          Julie, I have a number of questions after taking a look at your tutorial on "Creating Tableau Polygons from ArcGIS Shapefiles".

           

          You show an example with the following fields:

           

           

          [ET_ID],[ET_X],[EY_Y],[ET_ORDER]


           

          What happens if it is a multi-polygon with islands and such? I deal with multi-polygons by adding another column I call "SubPolygonID".

           

          Does your process retain the data in the dbf file?

           

          Where is the ET_ID coming from? Is it something that can be easily joined to other data sources (like a state abbreviation in my example)?

           

          Can you make a video of your process, as I did for mine?

          • 2. Re: Data Sharing
            Joe Mako

            In your "britishcounties6.0" workbook, there are some data quality issues. For example,

             

            - in the "eng" data set, there are countries named: "Null", "A?", and "B?"

            - three countries are missing their path orders

            - and then there are an additional 12 countries that only exist in the "eng" source data

            - the field named "Latitude" was actually the Longitude, and vice versa (thankfully they were properly geocoded).

             

            As for the "wazipcodepts.csv" file, I would recommend making use of data blending, instead of having the data rows repeated for every point in the polygons. The approach used in this file, was the only option prior to version 6. In version 5, I had used this technique, but currently I do not consider it a good route because it makes other calculations unnecessarily complex. Also, when I connected Tableau to this data, there were quite a few polygons with some issues, could be issues with the point order, or artifacts from the original shapefile (I know the Census Bureau distributes shapefiles that need cleaning before actual use).

            • 3. Re: Data Sharing
              Joe Mako

              Attached are some more example workbooks.

               

              In the UK workbook I have two tabs a "High Detail" and "Low Detail" The difference is, I rounded and condensed the points to two decimal places before connecting Tableau to the data. I recommend rounding the coordinates to a level of detail that is acceptable for the zoom level you intend to display. It helps ensure your refresh is as quick as possible. Additionally, you may be able to smooth your polygons in a GIS application (I have not learned how to do this yet).

               

              In the WA workbook, I show you can layer polygons on top of each other, In this case, I applied a sort order on the field "Type" to ensure that the Zip5 polygons were on top of the Zip 3 ones.

               

              In both these workbooks I am using data blending, one data source is just the polygon data (with an additional column for easy joining), and the other is the attribute table generated by my script from the dbf file.

               

              I have also attached the pre-extraction data source files that I used for these workbooks. For some of these files, I applied rounding to the points, I did this after my script, because currently my script does not do rounding. It is on my list of things that I would like to add though.

              • 4. Re: Data Sharing
                Julie Repass

                Yes, certainly please modify the input data files provided to refine as necessary for their intended use as this is the intent for sharing examples of existing work :).  The Washington zip code file will support import into both 5.x and 6.x Tableau Desktop versions, and the raw field names and data output are used as a frame of reference for the tutorial. Existing methods to address chain islands and other issues are great - thank you for the input!

                 

                The British County .CSV attached initially has the correct field labels, so I renamed the fields in the workbook and reattached to the original post.  Thank you for the feedback.

                 

                Kind Regards,

                Julie Repass

                • 5. Re: Data Sharing
                  Richard Leeke

                  Good idea to start a data sharing location like this.

                   

                  I just had a quick browse of the British counties data - and noticed one odd quirk that perhaps someone can explain.  Two of the counties (Norfolk and Suffolk) are not selectable and don't display a tooltip.  This is true in the original workbook Julie posted and in Joe's UK workbook - though it is only the low resolution one in Joe's workbook which doesn't work, they are fine in the high detail sheet.

                   

                  My first thought was that perhaps the data doesn't quite form a closed polygon correctly - but surely if that was the case they wouldn't be coloured, either?

                   

                  Screenshot attached to save you looking up where Norfolk and Suffolk are.

                  • 6. Re: Data Sharing
                    Joe Mako

                    Richard, I did not have the issue you describe in either workbook.

                     

                    As for polygons being closed, Tableau will close all polygons.

                    • 7. Re: Data Sharing
                      Julie Repass

                      Hello Richard,

                       

                      I was unable to reproduce the issue either.  Are you on Tableau Desktop version 6.0.4?  Also, what happens if all other applications are closed on the desktop machine?  My thought is perhaps the system has run out of the resources for displaying the tooltip?

                       

                      -Julie Repass

                      • 8. Re: Data Sharing
                        Richard Leeke

                        Very odd.

                         

                        I'm sure it's not Tableau version or machine resources, I'm running 6.0.4 on Windows 7 64 bit on an 8 core machine with 8 GB of memory and very little else running.  I'll try it on another machine when I get to the office.

                         

                        After a bit of experimenting I've found that I can in fact get the tooltips for both of those counties and also select them both - but not simply.  If I drag a selection rectangle that completely encloses each of those counties they are selected.  If I hover the mouse very carefully over the boundaries I get the tooltips and if I click on the boundary the shape is selected.  I just don't get tooltips or selection from hovering or clicking inside the shape.

                         

                        I also found that in some places selection just selects a small fragment of the shape.  I've attached a screenshot of that happening for Norfolk at the N end, near the Lincolnshire border.  I only got that Norfolk fragment on Joe's workbook, but I also got several small fragments of Essex (immediately south of Suffolk) and that happened on both Julie's original and Joe's versions.

                        • 9. Re: Data Sharing
                          Richard Leeke

                          Just tried it from a different machine and the tooltips work from that one.  I still get a few anomolies even on that machine though.  For example the fragment I mentioned before which shows a tooltip of Norfolk turns out to be part of Lincolnshire (a little island off the coast just by the Norfolk border) - but clicking on that highlights Norfolk not Lincolnshire.

                           

                          Not a problem for me, but just thought I'd mention it...

                          • 10. Re: Data Sharing
                            Julie Repass

                            Hello Richard,

                             

                            Yes that is certainly curious behavior.  I did notice in the screenshot you attached that the tool-tip was truncating the lat/long to two decimal places for that instance (my tool-tip is showing 3 decimal places).  Is it truncating the tool-tip for all the polygons or just the ones experiencing the anomalies?  It may be worth trying to generate the initial map from the original raw .CSV file to see the difference between opening a packaged workbook and connecting to the raw input file. If for some reason the anomaly polygon coordinates are being truncated, this would explain the very small selection area.  However if it is just the selection area but not the shaded polygon region this may indicate an inconsistency between the selection criteria and display criteria.

                             

                            -Julie Repass

                            • 11. Re: Data Sharing
                              Richard Leeke

                              Tooltips (and annotations, which is what my screenshot showed) are 2 decimal places for lat/lon for all shapes - on both the "Rounded to two decimal places" and the "High Detail" tabs.  That is the case on both machines I tried it on (i.e. the one where I have the problem with selection and the one where I don't).

                               

                              Also, zooming in on the area around "The Wash" (the area of sea between Norfolk and Lincolnshire) I found that at some zoom levels, selecting anywhere in the sea around there highlights Norfolk - even selecting right up close to the Lincolnshire coast.  But the extent of that area changes a lot as I change zoom level.

                               

                              So there's definitely something a bit odd going on here.

                              • 12. Re: Data Sharing
                                Julie Repass

                                Hello Richard,

                                 

                                Hmmm....being able to select the sea at a different zoom level sounds like it could be a scaling issue. If you wish to pursue further, please let me know or send an email to support@tableausoftware.com and we can dig under the hood to figure out the underlying issue. 

                                 

                                By the way, you brought up an excellent point earlier regarding the relevance to your particular visualization.  The ultimate purpose for the selectable polygons is to provide another tool to convey the information message for the Tableau Viz designs.  As we seem to be discovering first hand, for the thematic views the selectable polygon capabilities are a great addition but for highly-detailed views, the high-resolution imagery or background maps available may still provide the best geographical context to present the information.

                                 

                                -Julie

                                • 13. Re: Data Sharing
                                  Richard Leeke

                                  I'm certainly not bothered about chasing it - I was just idly browsing the sample workbooks, so pointed it out.  I'm happy to help if it's something you guys want to get to the bottom of, though.

                                   

                                  Selectable polygons are definitely a useful addition, by the way - I hadn't noticed that they had come in with version 6.  I've used polygons a bit in the past to grow my own stacked area charts - but the lack of tooltips and highlighting from the legend made the polygon mark type a bit of a second-class citizen as far as I was concerned.  I'll definitely have another play with stacked area charts now that they are selectable.

                                  • 14. Re: Data Sharing
                                    Julie Repass

                                    Thanks Richard and I will keep an eye out for the issue since I just have not been able to reproduce the same behavior in the example workbook.  By the way, impressive desktop machine (I am a little embarrassed I asked if you had enough memory)!

                                     

                                    -Julie Repass

                                    1 2 3 Previous Next