Last year, Tableau introduced three spatial functions: Makepoint and Makeline (2019.2) and then Distance (2019.3). Then the spatial buffer calculation was released with Tableau 2020.1 and allows us to calculate the distance around a point location. In addition, no need to have a spatial file to use it, latitude and longitude columns will be enough! The buffer function creates a spatial object that will look like a circle mark on a map.
The buffer calculation has 3 arguments
- A spatial point
- A radius (number)
- A unit for the radius (miles, km, m or ft)
As I said above you don’t need a spatial file if you have the latitude and longitude columns in your dataset, you can use the Makepoint function to create a spatial point.
My objective is to plan a visit to a museum and see how many Street Art there is in the area. I have a dataset which contains the latitude and the longitude of the museums and the Street Art spots of Brussels.
First I created the spatial points for the street art spot with the Makepoint function. Then the buffer around the museums with the buffer function.
I drag the buffer field into the view, then I duplicate the longitude dimension. In the second mark card, I remove the buffer, I drag the street art spatial points and I obtain this map below.
Next step is to transform this map into a dual axis to obtain the street art points overlapping the buffers of the museums.
I defined the size of my buffer to 200 meters. For more flexibility you can use a parameter instead. First step is to create a radius parameter like this one below and incorporate it into the buffer calculation.
If you are interested in Street Art and Brussels, have a look at this dashboard including the buffer calculation.