2 Replies Latest reply on Mar 27, 2020 1:40 PM by Sarah Battersby

    Spider Map

    Genevieve Guay

      Hi everyone,

       

      I am trying to build a spider map (flight map), but I can't use the MAKELINE function since my origin and destination points are considered strings. I changed the geographic role to airport so it recognizes each airport on the map, and each airport has a latitude and longitude (visible when I change the latitude and longitude into text). How can I put the latitude and longitude together with my origin_iata and destination_iata so they can become spatial points and so I can use them in the MAKELINE function.

       

      Note: The latitude and longitude is not in my original dataset. It is automatically calculated by Tableau when the origin_iata and destination_iata are put into the map.

        • 1. Re: Spider Map
          Ken Flerlage

          Any chance you can attach a packaged workbook showing what you have so far?

          • 2. Re: Spider Map
            Sarah Battersby

            Hi Genevieve - if you want to use the Tableau generated lat/lon values, you'll have to export those locations and join the generated lat/lon back into your workbook.  You can't currently reference those directly in calculations.  If you need to use MakeLine for an origin and destination that are BOTH Tableau geocoding locations (e.g., the IATA airport codes) you'll do two joins to get the airport lat/lon values into your data. 

             

            To export the generated lat/lon values, map your airports, select them all, and view the data.  You'll see columns for the generated lat and lon values.  Export the table.  Then join this table back in so you can use the generated lat/lon values in the data source instead of trying to use the Tableau generated lat/lon values.

             

            As an example of how to export the data, this is what I see when I select some data on my map...if I want the lat/lon generated I'd just use export all button.  Make sure you're getting a field that will be a good unique id to join the exported data back in (e.g., the airport codes)

             

            Also, as Ken noted above, if you can provide a sample workbook (even just a table with a sample of the data) we can probably help mock up a little demo of how this would work to get MakeLine functioning for your spidermap. 

             

            -Sarah.