Today we worked on a WOW Challenge that I found very useful in applying spatial data. The challenge is simple, replicate the below image. More importantly, it makes a great use case of the buffer() function and demonstrates many practical implications. Moreover, in this post, I will highlight the 3 key components for completing this challenge.
1. Firstly, Data needs to be joined
A common mistake is to join the data by a common variable i.e ID or neighbourhood. However, in this challenge, you will need to create an intercept as the join. In summary, what this join is doing, is finding the pubs that reside within the hotel perimeter of 500m.
2. Next, recreate the points and buffer again as a calculated field.
This will allow the points to be quantified within Tableau, as they currently only exist as Latitude and Longitudes.
This will create a 500m buffer around the hotels.
And similarly, this will create pub points.
3. Finally, putting it all together!
All that is left is putting all the pieces together. To get the number in the circles, I used Count Distinct for Pubs within the 500m Buffer Marks card.
Once again this is a great challenge that demonstrates a strong use case for spatial data integration. Going beyond the challenge we can include distance(hotel, pub) to work out the exact distance between the points. For instance, we can further use this example to identify clients within 500m of a supermarket or even find the nearest dentist!