Watch this Spatial!

Tableau is constantly adding new features with every update. As a beta member, was able to play around with the new buffer calculation in the 2020.1 release. In the Data School we have learnt how to use spatial tools in Alteryx to create trade areas or buffer zones.

This new feature in Tableau means that we can now create these buffer zones natively.

So what is buffering?

Buffering creates a radius around a point (centroid). We can use this spatial feature to show relationships. It is a simple method to view intersections between spatial data.

I wanted to show the relationship between two points in datasets. I downloaded an Airbnb dataset for NSW, Australia, and also used a dataset containing all the train station entry locations.

Creating the Buffer Zone

Using an Airbnb dataset that contained a centroid, I first wanted to show how the buffer calculation works and how it is represented on the map.

To create a buffer the following calculation was made:

BUFFER([Centroid AirBnB], 1, ‘km’)

TheĀ 1 represents the radius from the point, and the ‘km’ show the unit the distance is in.

Buffer points and points


The red shows the buffer radius of the points in the bottom map, and the point are shown in the top map in black. Converting this map into a dual-axis and overlaying the two shows the point in the middle and the 1 km radius around the Airbnb centroid.


Zoomed in view of buffer zone and centroids


Joining Spatial Data using Buffer

Now, we that we understand how the buffer calculation works we can start joining the Airbnb dataset with the train station data set.

The join calculation is going to be the same as the buffer calculation used above. The join will only show the points where the 1 km buffer zone intersects with the train station point.

This means, that we are narrowing down our search of apartments to show only those within 1 km of a train station.


An inner join is used, and the intersect feature is selected from the dropdown.
TheJoin calculation is:

BUFFER([Centroid AirBnB], 1, ‘km’)

The data now will only have the Airbnb apartments where the 1 km buffer zone radius intersects with a train station.

With some tidying up in Tableau the final product is user-friendly and practical for anyone looking to stay near a train station when travelling to Sydney.

Spatial join of host locations within 1 km radius of a train station.

Wrapping up

The buffer calculation makes it possible to stay in ‘flow’ when working with data in Tableau. It simplifies the process to bring in data and start drawing insights without needing to prep in Alteryx beforehand.

A caveat that I did notice is that the dataset must contain a centroid be able to use a spatial join. Latitude and longitude can’t be used to make a point using the MAKEPOINT calculation.

For example,
MAKEPOINT([Latitude], [Longitude]), [Buffer Radius], “km”
or in the Join Calculation,
BUFFER(MAKEPOINT([Latitude], [Longitude]), [Buffer Radius], “km”)

Surprisingly, the above calculations can’t be used in the lead up to create a spatial join calculation.

However, this feature in 2020.1 Beta is great for efficiency in the Tableau environment. Hoping that the buffer is included and that the issue with Makepoint is fixed when it is fully released.

Nicholas Hills
Author: Nicholas Hills