Leveraging spatial functions
Tableau continues to add native support for spatial functions. At the time of writing, Tableau supports the following functions:
Makeline()
returns a line spatial object given two points.Makepoint()
returns a point spatial object given two coordinates.Distance()
returns the distance between two points in the desired units of measurement.Buffer()
creates a circle around a point with a radius of the given distance. You may specify the units of measurement.
We'll explore a few of these functions using the Hospital and Patients
dataset in the Chapter 12
workbook. The dataset reimagines the real estate data as a hospital surrounded by patients, indicated in the following view by the difference in Shape, Size, and Color:
Figure 12.10: A hospital (represented by the star) surrounded by patients
There are numerous analytical questions we might ask. Let's focus on these:
- How far is...