1 Reply Latest reply on Mar 17, 2016 8:43 AM by Tobias Marty

    Combining two databases with geographical data on a dual axis map

    Tobias Marty

      I have two datasets.

      One contains post code shapes for Germany, the other contains geo coordinates for the location of companys on the map. Both are defined by longitute and latitude and are saved in two different MySQL databases. Tableau operates with custom geocoding, that was created with TabGeoHack.

      Each company has an id, which also acts as a geographical role ("company location"). There are other geographical roles, like latitude and longitude.


      I would like to create a dual axis map, where one part of the map shows the post code shapes (from one database) and the other map shows the location of the company (e.g. via a circle, from the other database). Unfortunately I only manage to display one on the map, whichever I insert first. So if I start with the company location, Tableau creates a map with generated longitude and latitude and shows the correct locations.

      WhenI then try to create the post code shapes on the other map, nothing happens. I tried different ways of creating a link between both databases, but that doesn't change anything on the map view.


      I guess that is the case because the post code shapes can't use the generated coordinates from the company locations and vice versa? Is there a way to solve this or do I have to change my basic data tables?



      I have copied the data from one database to the other and it still won't work. The table with the post code shapes obviously has a lot more entries than the one with the companies, so I tried a left outer join, which creates a lot of null values on one side. It won't draw the company locations in the same map, like before.

        • 1. Re: Combining two databases with geographical data on a dual axis map
          Tobias Marty

          I found a workaround. First, I copied the table that defines the post code shapes into the same database as the hospital locations. Then I was able to create a double axis map with both shapes and locations.


          The next problem that arose was, that once I wanted to filter the hospitals, the corresponding plz shapes would be removed.

          I found a workaround for that, too, by duplicating the post code values and using them to create the shapes. This makes them independent from the hospital locations and they can now be filtered separately.




          However, I don't think that's a very elegant solution and it uses more ressources, too. Is there a better way to do this? I included a workbook with some exemplary data, I hope it helps.