1 2 Previous Next 23 Replies Latest reply on Sep 22, 2016 3:56 AM by James Sansome

    Curved Lines on a Map

    reinholdmerkle

      I'm working at an airline and would like to show number of passengers or revenue sums according to flight routes and display this on a map.

      In general it works but i have questions on the following topics:

       

      1) Is there a way to have not straight lines between two points on a map but curved lines as on other flight route maps and display them so that all lines are visible ?

       

      2) Of course origin or destination of flight routes can occur multiple times on one map. How could I influence which airport label is displayed and which is not to avoid a map like the one attached

        • 1. Re: Curved Lines on a Map
          Russell Christopher

          Hi Reinhold -

           

          As long as you have the coordinates of points on the flight route, you can plot them - so yes, no problem with curves.

           

          I've attached a sample showing the paths of storms from our Visual Gallery. You'll see that all it's plotting is Lat & Long (on Rows and Columns) by Date (on the Path shelf) .

           

          Hope this helps!

          • 2. Re: Curved Lines on a Map
            Alex Kerin

            You couldn't have curved routes without feeding Tableau a path with all of the points the curve goes through. While doable, probably not feasible. If this is a must have, you may get better results in a data visualization language.

             

            Don't know about your second point - maybe another dimension on a dual axis (you can do this with maps as well) and multiple mark types?

            1 of 1 people found this helpful
            • 3. Re: Curved Lines on a Map
              reinholdmerkle

              Hi Russell,

              thanks for your reply.

              Unfortunately this doesn't really help because in this case I have only the coordinates of the origin airport and the destination airport and no other points in between. Nevertheless I would prefer a curved line and also no lines crossing each other. An example how I would prefer it you can see here: http://www.inf.uni-konstanz.de/algo/lehre/ss04/gd/apps/flight.html

              Regards Reinhold

              • 4. Re: Curved Lines on a Map
                Ian White

                Hi Reinhold

                 

                I think you are looking to create great arcs like in this post? This is something Urban Mapping, Tableau's mapping provider supports.

                 

                ian

                1 of 1 people found this helpful
                • 5. Re: Curved Lines on a Map
                  Jonathan Drummey

                  I can't help with the curved lines, for the multiple mark labels, you can use a table calculation that would look something like:

                   

                  IF FIRST()==0 THEN

                       WINDOW_MAX(MAX([airport]), 0, IIF(FIRST()==0,LAST(),0))

                  END

                   

                  Exactly how it will look will depend on your data, the arrangement of pills in the view, etc. This will return only one value and Null for everything else, so it will only draw the one label.

                  • 6. Re: Curved Lines on a Map
                    Alex Kerin

                    The no lines crossing each other means that Tableau will not work for you. The Urban Mapping option for curved lines would be great, but I can't imagine that they will produce non-crossing lines. I would guess you are trying to get to something like this:

                     

                    United_Airlines_DEN.gif

                    These will be hand drawn in Illustrator or some other graphics package. Your example does not use great arcs; there is some sort of calculation going on  to produce ever larger circles for each route.

                    • 7. Re: Curved Lines on a Map
                      Jake Baillie

                      1) Is there a way to have not straight lines between two points on a map but curved lines as on other flight route maps and display them so that all lines are visible ?

                       

                      As others have mentioned, Mapfluence can draw great arcs with a custom TMS file in Tableau.

                       

                      2) Of course origin or destination of flight routes can occur multiple times on one map. How could I influence which airport label is displayed and which is not to avoid a map like the one attached

                       

                      Mapfluence gives you the ability to query "across columns", meaning that a query could be built specifying that you only want airport labels shown containing certain attributes (think airplane types, codeshare partner types, etc). You could also color the lines on the map based on those attributes. Additionally, Mapfluence has the ability to exclude specific data while visualizing - so if you only wanted unique segments, you could do that. Mapfluence's query language is very SQL-like.

                       

                      For example, here's a quick map using random sample data I just made using color and thickness to represent some attributes (passenger volume and flight frequency) using unique segments.

                       

                      flights_web_shot.png

                      1 of 1 people found this helpful
                      • 8. Re: Curved Lines on a Map
                        reinholdmerkle

                        Hi Jake,

                        that looks like it could be the solution for my topic. Where can I get or look up the detailed documentation on how to get there, i.e. what are the steps for your example above ?

                        Thanks and regards

                        Reinhold

                        • 9. Re: Curved Lines on a Map
                          reinholdmerkle

                          Hi Ian,

                          thanks for your response.

                          Where could I find mire and detailed info about how to proceed with Tableau and Urban Mapping as you mentioned ?

                          Best regards

                          Reinhold

                          • 10. Re: Curved Lines on a Map
                            Allan Walker

                            Yes, this is possible.

                             

                            LHX to LHR, Great Circle using WGS 84 Mercator Projection / Data pre-processed using Vincenty Formula.

                            You don't even need path order.

                            OpenFlights.org data coming soon.

                             

                            Great Circle LAX to LHR.png

                             

                            Some progress, pre-processed in R.  Thanks to Flowing Data for the tutorial, enhanced it slightly for antipodean routes.

                             

                            monthyearJan.png

                             

                            Next, Outputting a Tableau-readable CSV for multiple paths...

                             

                            Here's a final result.

                             

                            Open Flights Great Circles.png

                             

                            Output PNG added Message was edited by: Allan Walker

                            1 of 1 people found this helpful
                            • 11. Re: Curved Lines on a Map
                              Allan Walker

                              Test Demo available here

                               

                              I've limited it to the first 50,000 rows, as the total file (without joins) is 13,000,000 rows.

                              OpenFlightsInTableau.png

                              Note - there is an obvious error in the data (not the map), let me know if you can work it out.

                              Next up, creating the TDE, and joining over to Airline, Destination Airport & Equipment Type.  Done. 

                              • 12. Re: Curved Lines on a Map
                                reinholdmerkle

                                Hi Allan,

                                after quite a time of posting this point your approach sounds very interesting to me.

                                Looking forward to get more details from you because the item is still very crucial for my daily work with Tableau.

                                Thanks and best regards

                                Reinhold

                                • 13. Re: Curved Lines on a Map
                                  Allan Walker

                                  Hi Reinhold.

                                   

                                  I'll do a blog post soon (hopefully this week) on how I achieved this.

                                   

                                  Best Regards,

                                   

                                  Allan

                                  • 14. Re: Curved Lines on a Map
                                    Jonathan Drummey

                                    Great work, Allan!

                                    1 2 Previous Next