Spatial Tools in Alteryx: Part 2 — Planning the Perfect Golf Tour with Find Nearest

In Part 1, we prepared our hotel and golf course data by creating spatial points in Alteryx. Now, we’re going to use one of the most practical spatial tools for real-world analysis: Find Nearest.

Our question:
If you’re staying in East Lothian, which golf courses are closest to your hotel? And if you’re planning a 4-round golf tour, which four courses should you play based on proximity?


Step 1: What the Find Nearest Tool Does

The Find Nearest Tool compares two sets of spatial objects and works out which objects in one dataset are geographically closest to each object in the other.

In this case:

  • Target (T): Hotels — we’re finding nearest golf courses for each hotel.
  • Universe (U): Golf courses — the pool of locations to search through.

The tool outputs:

  1. The nearest object(s) for each target.
  2. The distance to each matched object.
  3. A rank, so you can see which is first, second, third closest, and so on.

Step 2: Find the Single Closest Golf Course for Each Hotel

  1. Drag the Find Nearest Tool into your workflow.
  2. Connect:
    • T input → Hotels spatial dataset.
    • U input → Golf courses spatial dataset.
  3. In the configuration panel:
    • Select your spatial object fields (from the Create Points Tool).
    • Set "How many nearest points to find?" to 1.
    • Pick your distance units (miles or kilometres).
  4. Run the workflow.

You’ll now have a table showing each hotel and its nearest golf course, plus the distance between them.

Attach a Browse Tool to visualise each hotel and it's nearest golf course


Step 3: Expanding to Find the Closest 4 Golf Courses

What if you’re staying for a few days and want to play four different courses?

You don’t need a new tool — just adjust one setting.

  1. In the same Find Nearest Tool, change "How many nearest points to find?" from 1 to 4.
  2. Run the workflow again.

Now, for each hotel, you’ll get four rows in the output:

  • One row per golf course (ranked 1 to 4 by proximity).
  • Distance to each course.

This makes it easy to plan a multi-course golf tour starting from any hotel.


Step 4: Find the Best Hotel on Average (Across 4 Courses)

Once you’ve run the Find Nearest Tool (with 4 nearest courses selected):

  1. Add a Summarize Tool to the output.
  2. Configure it to:
    • Group By → Hotel Name.
    • Average → Distance Field (distances to the 4 courses).
  3. Sort the results in ascending order to see which hotel has the lowest average distance.

The hotel with the smallest average distance is the best base for playing four different courses with minimal travel. We've turned our proximity analysis into an actionable insight (perfect for planning a golf trip)


Next Up

In Part 3, we’ll look at Trade Area Analysis in order to find the best hotel for course coverage

Author:
Ollie Ross Russell
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab