14 Replies Latest reply on Nov 20, 2018 8:01 AM by Don Wise

    Only 1 out of my 30 districts is showing up in map

    Mohamed Hersi

      Dear All,

       

      I have the following geo-structure:

      Country (this is fine)

      Region (all showing up in the map)

      District (only 1 out of 30 is showing up in the map)

      Health Facility (all showing up after I manually entered all Lat/Long for them at their level)

       

      Tableau easily recognized my country and regions (except one region where I had to change spelling in the data source to match that of Tableau).

       

      Then, I tried to map out my Health Facilities, but was nit possible, and so I had to enter the Latitude and Longitude for each Health Facility.

       

      However, my district are NOT showing up, and I don't have district-specific geocodes (my Lat/Lon are at Health Facility level).

       

      So how can I overcome this problem with my districts not appearing on my map?

       

      Regards

      Mohamed

        • 1. Re: Only 1 out of my 30 districts is showing up in map
          Paul Wachtler

          Hi Mohamed,

           

          Can you share your workbook?  It's not really possible to troubleshoot this without seeing what's happening with your data.

           

          Best,

          Paul

          • 2. Re: Only 1 out of my 30 districts is showing up in map
            Tanya Mamchik

            Hi Mohamed,

             

            Paul is right, it is hard to help without the workbook, but check if you have these in your workbook:

            1) Geometry (collect) field from your district shapefile is under "detail" marks.

            2) District field is NOT in rows or columns.

            3) District field is under "detail" marks.

             

            Please attach the workbook if you would need additional help.

             

            Thanks,

            Tanya

            • 3. Re: Only 1 out of my 30 districts is showing up in map
              Mohamed Hersi

              Dear Paul,

               

              I have attached a workbook for reference.

              So my problems are:

              1. My districts are not appeasing on map
              2. Earlier, Tableau could not propose matches for my health facilities, so I had to enter manually over 100 Latitude and Longitude coordinates. That is too much! Is there any easy, quick way to do this?

               

              Regards

              Mohamed

              • 4. Re: Only 1 out of my 30 districts is showing up in map
                Don Wise

                Hi Mohamed,

                I took liberty of checking your workbook and related data.  Your .csv file contains named references to Districts, but Tableau doesn't support those currently.  You'd need better Geographic Data to support what you're trying to do. So, to support that effort, I found the necessary GIS data (GEOMETRY) for Somalia and Districts online at the following location: Somalia shapefiles - Map East Africa

                 

                I added the .shp file in as a Spatial File to be joined with your .csv data. and got the attached and below results.

                 

                To answer your question about why you had to enter so many Latitude/Longitude points, it really has to do with the quality of your underlying Geographic Data (.csv file) and whether it will match the baseline data in Tableau.  In your case, it appears that not all of the necessary GIS Data was there, which is why you had to manually enter them in. In your .csv file, you should have at least Country, Region, District, City.  Not sure about whether Tableau supports the HF Code as like a Zip Code? 

                 

                I also noticed that you'd set the Health Facility name to a geographic identity of City, and Tableau won't match on that particular column of data if it contains data it doesn't recognize (i.e., Beldaje HC as opposed to Beldaje).  So, a better set of data might get you better results...that being said, I extracted the 'City' from the Health Care Facility Name and also added in Country:

                Screen Shot 2018-11-18 at 12.43.23 PM.png

                Then brought the spatial file and the .csv file together.  The join was done as a new calculation of '1' on one side and '0' on the other side and the join is set as an OUTER JOIN:

                Screen Shot 2018-11-18 at 12.11.31 PM.png

                Which then allowed me to bring in the GEOMETRY from the .shp file, then thereafter bring in the .csv data as a DUAL-AXIS map:

                Screen Shot 2018-11-18 at 12.06.57 PM.png

                Now you have your Districts and your Health Facilities layered onto the same map. If you can't see all your data points, it's due to the fact that some HC's and Hospitals are at the same Lat/Lon; simply click on the attribute in the Legend to highiight the marks:

                Screen Shot 2018-11-18 at 12.49.29 PM.png

                Attached is a 2018.3 workbook.  Hope it helps!  Thx, Don

                1 of 1 people found this helpful
                • 5. Re: Only 1 out of my 30 districts is showing up in map
                  Mohamed Hersi

                  Dear Don,

                   

                  Thanks for the detailed response. I went to the same website and downloaded the .shp file. But when I tried to connect to Tableau, it wo'nt connect and hows the following error message:

                   

                  Districts not appearing in map.PNG

                   

                  Your suggestion of how to overcome this problem?

                   

                  Regards

                  Mohamed

                  • 6. Re: Only 1 out of my 30 districts is showing up in map
                    Mohamed Hersi

                    Hi Don, following on my last reply sent this morning (19 Nov 2108), I have found a solution for uploading the .shp file into Tableau. I have downloaded the same file you downloaded and uploaded to Tableau and would like to follow your steps in creating the same map.

                     

                    In the attached a workbook in which I have created following your steps (thanks for the detailed explanation).

                     

                    I have the questions about the workbook you ave shared:

                    1. I want to make changes to the Geography file e.g. delete or add some columns, so I don't know how the 1s and 0s which you have used the OUTER JOIN could be affected?
                    2. Can you explain what you mean by '1' and '0' when JOINING files?
                    3. Why OUTER JOIN and not other Joins?
                    4. Is Blending possible, if yes how, if not why not?

                     

                    Regards

                    Mohamed

                    • 7. Re: Only 1 out of my 30 districts is showing up in map
                      Don Wise

                      Hello Mohamed,

                      You could do an inner join which would then set your geography only to those Districts that match your data, yes.  I did an outer join as I'm not familiar with your geography nor what your attempted view is to look like; better to provide more than less! The 1 and 0 join simply provides a method of joining disparately defined data.  It is telling Tableau use all of the Polygon data, and where Point data can be found within the Polygon data, then join it together if using Dual-Axis mapping.  I would NOT use Data Blending.  You will be frustrated if you decide to do so.  Hope this answers your question. Thx! Don

                      1 of 1 people found this helpful
                      • 8. Re: Only 1 out of my 30 districts is showing up in map
                        Mohamed Hersi

                        Thanks Don,

                         

                        Just a quick explanation on my geography levels. There are 4 levels:

                        Country

                        Region

                        District

                        Health Facility

                         

                        I want to be able to see data at all 4 levels.

                         

                        One problem I noticed in your creating City Names from Health Facility Names is that these Health Facility Names are derived from the City, town or village they are located, and in many cases, there are more than 2 Health Facilities located in the same City or town but with different names (one of the might have the City or town name and the other with a different name but they are all located in the same city or town.

                         

                        BUT, since my Geography file has data some part of the country, I don't want to see map for all Somalia (although I will need later)- I just want to see those regions and districts that I have in my 'Geography' file. So in this case, can I use INNER join?

                         

                        Any solution to the above problems?

                         

                        Regards

                        Mohamed

                        • 9. Re: Only 1 out of my 30 districts is showing up in map
                          Don Wise

                          Hi Mohammed,

                          You need to understand that Tableau is not going to support separate City names as you originally had them named.  Hence my prior comment, that many of the data points will display, but they'll be viewed as on 'top of one another', that is until you go to a lower level of view on the map. Then those data points will start to separate out based on your latitude & longitude data.  From a high level view they will appear as one point; lower level of view, then you'll see multiple data points.  In order to separate out which data points belong to the same city, drag the field Health Facility over to the 'Label' card and they'll display, or drag the field Health Facility over to detail and they'll show up on hovering over the data point.

                           

                          To bring the map down to just the region/districts that you have in your Geography file, change the join from 1 and 0 to an INNER JOIN but use the drop down on each side and select Region and Region1. 

                          Screen Shot 2018-11-19 at 10.37.12 AM.png

                          You'll get this:

                          Screen Shot 2018-11-19 at 10.37.19 AM.png

                          1 of 1 people found this helpful
                          • 10. Re: Only 1 out of my 30 districts is showing up in map
                            Mohamed Hersi

                            Dear Don,

                             

                            Thanks for all support so far. I am getting there.

                             

                            I am asking the following questions:

                             

                            Q1. how did you get the Latitude and Longitude with Map symbol next to them in the Marks (the ones with the downward/upward arrows underneath 'All')? What is the process of creating these (I know how to add other Details, Color etc, but just want to know how to get them there first?)

                            How do you get these Lat and Long with dropdown menus in the Marks shelf.PNG

                             

                             

                             

                            Q2. When I add a SECOND Latitude in the Rows, it shows as AVG and creates a problem - see below

                             

                            2nd Latitude in Rows a problem.PNG

                             

                            Q3. Can you explain more on the steps of creating the Dual-axis map?

                             

                            Q4. For the '1' and '0', does it matter which data I used them for?

                             

                            Q5. For the Country, Region, District, City, Latitude, Longitude, does matter how they are sequenced/arranged in my data source e.g. do they have to be in that order?

                             

                            Regards

                            Mohamed

                            • 11. Re: Only 1 out of my 30 districts is showing up in map
                              Mohamed Hersi

                              Hi Don,

                               

                              I also noted the following two differences between your version and mine:

                               

                              Q1. My 'Geometry' in the Marks shelf has the word 'COLLECT' as prefix, but your Geometry doesn't have it. What difference does this (COLLECT) cause?

                              COLLECT as prefix for Geometry.PNG

                               

                              Q2. I think you copied the Latitude in the Row to create a second one next to it by dragging using Control + drag. In my case, I tried to do so but it won't create anything

                               

                              These are the other two things I noticed. Any solution?

                               

                              Regards

                              Mohamed

                              • 12. Re: Only 1 out of my 30 districts is showing up in map
                                Don Wise

                                Hi Mohamed,

                                 

                                I think you can find all your answers to your questions here: Dual Axis Mapping - Many Ways This excellent blog contains many different scenarios as to how to join disparate data sources and create a dual-axis map using different types of data sources.  Regardless, here are the steps I took to build out the current version of the map:

                                Screen Shot 2018-11-19 at 1.07.46 PM.png

                                Screen Shot 2018-11-19 at 1.15.59 PM.png

                                You don't have to control drag - just drag it onto Rows.

                                Screen Shot 2018-11-19 at 1.18.29 PM.png

                                Screen Shot 2018-11-19 at 1.20.46 PM.png

                                Screen Shot 2018-11-19 at 1.23.10 PM.png

                                Screen Shot 2018-11-19 at 1.23.15 PM.png

                                Screen Shot 2018-11-19 at 1.27.21 PM.png

                                Screen Shot 2018-11-19 at 1.30.25 PM.png

                                Screen Shot 2018-11-19 at 1.30.34 PM.png

                                Screen Shot 2018-11-19 at 1.33.05 PM.png

                                Screen Shot 2018-11-19 at 1.33.26 PM.png

                                Screen Shot 2018-11-19 at 1.36.39 PM.png

                                Screen Shot 2018-11-19 at 1.36.47 PM.png

                                1 of 1 people found this helpful
                                • 13. Re: Only 1 out of my 30 districts is showing up in map
                                  Mohamed Hersi

                                  Dear Don,

                                   

                                  This is exactly what I was looking for. I followed your screen shots easily, and I have done with success. I am really grateful for your support. You are a great mentor.

                                   

                                  Thanks a lot

                                  Mohamed

                                  • 14. Re: Only 1 out of my 30 districts is showing up in map
                                    Don Wise

                                    Thanks Mohamed,

                                    Glad to have been able to help!  Don