The application of spatial tools in Alteryx could help you to find the nearest place or point of interest to a given location. For example, it helps users to find the closest gas station, restaurant, hospital, or any other point of interest based on their current location. In this blog, we will build an app for spatial data, i.e. to find the nearest schools within a specified driving distance. We will be using the ‘Find Nearest’ tool in Alteryx to help us locate schools within 20 minutes driving distance from a home address.

The steps are as follows:

  1. Connect the two files, of which one of them contains the home address and the other file contains a set of schools (named ‘NSW School Master Dataset’.
  2. Connect the Geocode tool to the Home Address to create a spatial point.
  3. Pull in the Create Spatial Point tool to the ‘NSW School Master Dataset’. In the configuration, select the Longitude and Latitude.

 

4. Connect the Geocode tool to the Find Nearest tool (U = Universe). From the Spatial Point tool, connect it to the Find Nearest tool (T = Target).   For the Target, select the Spatial Object Field = Centroid. For the Universe, the Spatial Object Field = SpatialObj. To find 10 schools within a proximity of 20 minutes drive from the home address, specify the nearest points as 10 and the maximum driving time is 20 minutes in the configuration.

 

5. In addition to this, lets create an app that allows the user to specify the type of schools. From the Find Nearest tool, connect a Filter tool. Within the Filter tool, specify the Level_of_school = “Primary School” as a placeholder for the app.

 

6. To complete the workflow for the app, connect a Drop Down interface tool. In the action configuration, ensure that it updates the operand-value = “Primary School” and check the box (Replace a specific string).

7. Finally, this is what the completed workflow should look like.

 

8. Click on the wand icon to run the app. The app will prompt the user to select the level of school type. The output will be exported into an Alteryx database named ‘School Output from App.yxdb’.

9. There you have it folks. The workflow generates a list of schools within 20 minutes driving time from the home address and we have created an app to allow the user to specify the school type. This is just an example of the numerous applications of spatial find nearest place analysis, demonstrating its significance in decision-making processes. I hope you enjoyed reading this blog.

Shaida Shamuri
Author: Shaida Shamuri