Map routes

Maps. Ive gotta be honest, playing around with these was the first thing that attracted me to Tableau. The standard prosedure of looking at a filled map of the US states based off the number of sales is really interesting and everything, but how could we take it one step further?

In the following example, we have information about the origin and destination of flights. We want to drill down into this data by looking at the different routes and filter them by the distance travelled.

When there is an origin and an endpoint within some data the route can be calculated. The first step is to make two new fields using the 'makepoint' formula and the 'origin' and 'destination' fields longitude and latitude.

Make sure you use them in the correct order!

To distinguish each point, the origin and destination airport needs to be included under 'detail'.

Next, use the 'makeline' function in a calculated field to give you the length of each journey, dragging this field onto map layers will make each line visible.

Dont get overwhelmed by your worksheet looking like a 6 year olds colouring book, dragging the necessary fields onto details will distinguish each route, providing more information about each journey. When including the 'distance' field, ensure that the average is calculated rather than the sum.

To look at all the destinations within a certain area, we need to use the buffer formula within a calculated field. In order to make this value change, we can make the buffer size dependent on a parameter.

Next, making the calculated field which gives you a radius around each airport. Once done, drag this onto map layers. By changing the opacity of the region and also the routes can help make the viz easier on your eyes.

Now we are ready to start looking at individual airports and all the flights from that destination by filtering out the airport we wish to view. Below we can see all the destinations flown from atlanta.

We can go one step further and filter out destinations outside of the buffer size parameter. Make a calculated field, 'within buffer', which has a boolean output whether the distance is less than or equal to the buffer parameter and move to the filter section.

As you can see below, we can see all of the airports within a 500 mile radius from atlanta airport.

Author:
Archie Boswell
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2024 The Information Lab