Are you tired of spending your time at a barbecue place wondering where the nearest toilet is? With the help of Alteryx spatial and analytical apps, finding the closest restrooms has never been easier. Alteryx’s powerful location intelligence capabilities can analyze the spatial data of your barbecue place and provide you with the shortest possible path to the nearest restrooms. In this blog, I will walk you through the steps required to create an Alteryx workflow that utilises spatial data and location intelligence techniques to identify closet restrooms.

Step 1: Create a Trade Area of 0.5km for BBQ Locations and Centroid for toilets

we have two files, one is a .yxdb containing a SpatialObj Type for all the bbq locations.

bbq locations

 

 

To obtain the trade areas of the BBQ, we can use the Trade Area tool to configure the SpatialObj to 0.5 in units of Radius (Kilometers). Therefore, we have a new field, SpatialTrade Area.

 

because in the analytic app, we want to dynamically select the radius for the public toilet proximity, we can use a Numeric Up Down to choose the range.

Connecting the hourglass with the lightning bulb and configure the tool with the following parameters.

 

the other file is a .xlsx file containing the latitude and longtitude for all the toilet locations, to narrow down the location, we firstly use the filter tool to filter the state as “Victoria”.

To get the point for all the toilets, we need to use a spatial tool to create points for these locations

Step 2: Use the Spatial Matching tool to find the toilets within 500m of a bbq

We firstly drag the Spatial Matching tool and connect the Target with BBQ and the Universe with Toilets.

In the configuration, we choose the SpatialOject_TradeArea we just created for the Target Spatial Object Field. In the Universe, we choose the Centroid for all the toilets locations. Select “Where Target Contains Universe”.

You can do this in the other way around depending on how you define your Target and Universe. For example, if your Target is Toilets whereas Universe is BBQs, simply choose “Where Target within Universe”

Step 3: Narrow down the Suburb to St Kilda

We use a filter tool to filtering out the suburb and now it is almost close to what we want to get.

To Update the Value for the Suburb in the Interface Designer, we can use Type in and update the Operand – value = “St Kilda”

Step 4: Use the Report Map tool to format your report. 

Because the Report Map tool requires multiple input, we need to use the Select tool for the BBQs for the first layer and adding another layer to the Report Map tool.

For the Report Map, we need to connect the data with the BBQs and Toilets like so:

We can also format the icons for both by adding the points layers

Step 5: Export the report using the Render tool

save it as .yxwz we now can get an analytical app tool allows us to select the locations for both bbqs and toilets

 

 

 

 

The Data School
Author: The Data School