3 Replies Latest reply on Dec 28, 2018 4:20 PM by Kevin Hao

    Map organizations with multiple locations

    Kevin Hao

      Hello all, I have a list of organizations which I would like to map in Tableau. Some of these organizations have multiple locations (ex: NY, CA, MA).


      The original data format comes from excel, and it is ~250 items long.


      To make this more complex, sometimes the location is a state, sometimes it is a country. Anyone have any ideas on what I should do? Thanks!

        • 1. Re: Map organizations with multiple locations
          Jeffrey Shaffer



          Tableau will map City, State and Countries automatically. You can put them all on Details in the Marks Card. Longitude (generated) on Columns and Latitude (generated) on Rows. Tableau will plot points at the cetner of those geographies. Alternatively, you can Geocode the points yourself. Ideally you have an address for these locations. Then use a tool like Geocod.io to geocode the address. This will return a lat/long for the address. Then you can put the actual Longitude on Columns and Latitude on Rows (not the generated ones) and it will plot the exact location. This will work well because you can control exactly where the point goes down to the physical address of the location.


          Hope this helps.



          • 2. Re: Map organizations with multiple locations
            Michael Gillespie

            You will have an issue if what you're mapping (state, city, county, country) differs from row to row.  Tableau will recognize all kinds of geolocations, but it can only map things at ONE level of detail at a time (so all countries, or all cities).


            If you only have 2 different levels of detail you COULD try a dual-axis map, one for cities and one for countries.  But as Jeff pointed out, you will only get the center point of the city or country as a "dot" on the map, and that may not be what you need.


            The better idea is to get the exact lat & long values for each specific location and add them to your data set.  That way, you have an identical level of detail for ALL your locations.  Again, as Jeff said, use the exact lat & long values for this, NOT the Latitude (Generated) etc. fields that Tableau creates for you.

            • 3. Re: Map organizations with multiple locations
              Kevin Hao

              I see, thank you. I think what I will do is break the data into two parts - one where I have just countries (and turn the states -> USA values in excel using a formula, I guess), and make two maps from this - one that's globally focused, and a second that's just country focused where I'll just use the state values.


              Regardless, it seems like Tableau won't be able to work with my data as is, I'll have to dive back in and restructure my data so that Tableau can understand it.


              Another problem I have is just converting the data...perhaps an example is the best way to show my problem:


              Given this data set in excel:

                   CompanyA | Location1, Location2, Location3
                   CompanyB | Location1, Location3
                   CompanyC | Location2


              This doesn't translate nicely over to Tableau. I'd have to reformat it as such:
                   CompanyA | Location1
                   CompanyA | Location2
                   CompanyA | Location3

                   CompanyB | Location1

                   CompanyB | Location3

                   CompanyC | Location2


              Any ideas on the best way to take care of situations like this one?