From the course: Complete Guide to Tableau for Data Scientists

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Create lines to connect locations on a map

Create lines to connect locations on a map - Tableau Tutorial

From the course: Complete Guide to Tableau for Data Scientists

Create lines to connect locations on a map

- [Instructor] Tableau's spatial calculations let us change latitudes and longitudes into spatial objects, join them together with lines, and even calculate distances between them. So let's have a look at this data set that we've got here. So this is showing stores in the LA region. Now each of these data points belongs to a particular store, and I've got the latitude and longitude of the destination, which is the store itself, but I also have this origin latitude in my data pane. Now this origin latitude is the lat and long of the LA store. Now what I want to do is show how far away all of the regional stores are to the main store. Now, to do that, we can use the distance calculation that Tableau has, but also we can join the outer stores to the central store using lines. So to do that, first we're going to open up the calculation editor. We're going to create an origin point, a destination point, then a line, and then the distance. We're going to have four calculations in total. So…

Contents