1 2 Previous Next 17 Replies Latest reply on Apr 27, 2016 6:18 AM by Amanda Adams

    Filled map with points

      I feel stupid asking this because it seems like it should be easy, but I'm running into an issue that I'm not seeing answered on the forums.

       

      I'm trying to make a filled county map overlaid with points indicating locations. One spreadsheet uses county name/state/fips codes, and the other has location name/address/city/state/zip/latitude/longitude. I've tried making a dual axis map with multiple mark types, but rather than a map, I end up with a white graph with data points and shapes that shows latitude down one side and longitude down another (and while that's essentially what a map is, I kinda miss the graphical elements). I've also tried making two separate sheets: one as a filled map and one with plotted points, but I can't find a way to merge them into one cohesive map.

       

      I'd really appreciate some guidance, as I've seen several posts on how to do this with multiple mark types, but I must be missing something minuscule if I continually end up with a graph instead of a map. Thanks so much!

        • 1. Re: Filled map with points
          Alex Kerin

          Can you post a tbwx?

          • 2. Re: Filled map with points

            I apologize. That was short-sighted of me. Attached.

             

            Thank you!

            • 3. Re: Filled map with points
              Richard Leeke

              Certainly not obvious -  but I remembered a map that Shawn did like this so I dug back and reminded myself of the trick.

               

              The key seems to be not to have Latitude (generated) and Longitude (generated) on the shelves.  Just put your actual lat and long fields on, with one duplicated, turn that into a dual axis map and then put the fields which are geocoded at the level you want for your filled map on level of detail and set the mark type to filled map for one of your axes.

               

              I had to take the filter off and use that to colour code the filled map, or your second axis wouldn't have shown all the marks - not sure if that's what you want.

              1 of 1 people found this helpful
              • 4. Re: Filled map with points

                This doesn't seem to be working. Did you mean that I should use the same latitude (or longitude) numbers twice on one shelf to dual axis? When I do that, I still have the map, but I don't have the data for my filled map. If I use the other data set's latitude to dual axis, I end up with that white graph mention before.

                 

                Essentially what I need is the first sheet of my workbook (counties with no-kill animal shelter laws filled) under the second sheet of my workbook (all U.S. no-kill animal shelters plotted).

                 

                Thank you so much for your help!

                • 5. Re: Filled map with points
                  Shawn Wallwork

                  Danielle, one of the reasons you're struggling with this is that your 'county' field in each data set is in a completely different format. In the one, your counties look like this:

                  Danielle-1.PNG

                  Combining county & state like this makes them unrecognizable to Tableau. The good news is a simple replace will strip off all the state info. (Replace ,* with a blank.)

                   

                  Your second data source looks like this:

                  Danielle-2.PNG

                  To get Tableau to matches these up you'll need to strip off ' County'. Make sure you get the leading space stripped off when you do this. Once you've got both sets of counties formatted correctly then they will link (orange icon) like your state field does now. But I suspect to get what you really want, you're going to need to get Richard to show you how to do a custom SQL data setup. It's only 5 a.m. in New Zealand, so you'll need to give him a few hours.

                   

                  You could also probably put these two sheets together in a single Excel spreadsheet without much difficulty, and then all your problems would be solved.

                   

                  --Shawn

                  • 6. Re: Filled map with points

                    Thanks for your response, Shawn. Our database guy actually tried to give me as many options as possible, so the COUNTY_NAME field in both data sets is actually formatted as you suggested. That said, I see I was using the wrong format in the level of detail on my map, but this did not help the problem. Now, when you say link like my state does now, could you elaborate? I keep looking for a way to link my data sources like I would in QGIS, but I haven't been able to find any documentation that would help me and figured it was either something that Tableau doesn't do, or that the jargon was different.


                    I also tried merging the spreadsheets today with little success, but I'll try again, now that you have suggested it.

                     

                    Thank you again!

                    • 7. Re: Filled map with points
                      Shawn Wallwork

                      OK, that's good. Here's what I mean by link:

                      Danielle-3.PNG

                       

                      The orange strip on the left indicates this is secondary data source. The circled icon indicates both data sources have a state field AND that state field is in the view. (It won't link until the field is placed in the view.)

                       

                      If you post the two spreadsheets, I'll take a look and see if I can figure out the best way to combine or join the tables.

                       

                      --Shawn

                      • 8. Re: Filled map with points
                        Richard Leeke

                        Did you look at the modified version of the packaged workbook which I posted back. It's working in there.

                        • 9. Re: Filled map with points

                          Sorry to be incredibly dense, but I've tried opening your file several times, and it looks exactly like the file I originally posted. Am I doing something wrong?

                           

                          In the meantime, I've merged my two spreadsheets and am trying to hack it together that way. Still not having a lot of luck.

                          • 10. Re: Filled map with points
                            Shawn Wallwork

                            Richard I was able to open your file and see your solution in sheet 3. But since you're using a secondary data source and thus an ATTR to show the circles, when you try to label them with (or add them to the tool tip) they show the *. Which is why I thought a custom SQL would get around this issue.

                             

                            --Shawn

                            • 11. Re: Filled map with points
                              Shawn Wallwork

                              Danielle, I'm pretty sure Richard will come up with a better solution than this, but for what it's worth here's the best I could come up (see attached):

                               

                              Danielle-1.PNG

                               

                              --Shawn

                              • 12. Re: Filled map with points
                                Richard Leeke

                                OK, I only glanced at this quickly and didn't even notice the two data sources, so my effort was showing the wrong marks, like this:

                                 

                                Sheet 3.png

                                 

                                No time to look at this now - but Shawn seems to be getting there. I'll check back into this thread later and see if there is still an issue to do with the multiple data sources...

                                • 13. Re: Filled map with points

                                  My God, that's exactly what I was wanting, Shawn. I'll have to do a few more filters, but that's pretty much exactly what I was looking for. And it really helps to see your workbook so I can see where I was going wrong. Thanks so much!

                                  • 14. Re: Filled map with points

                                    I'm wanting approximately the same viz. I have a filled map that shows sales by zip by store. Each zip is color coded by store. What I need however, are store points such that when highlighting a particular store in the filters I get sales corresponding to zip as well as a map point corresponding to the actual location of the store. Thoughts? I've considered just annotating the map for each store location (only 15 stores). But that seems like a less than ideal solution.

                                    1 2 Previous Next