Hello! Welcome to the final lesson in our module on Applied Spatial Analytics.
Over the past few lessons, we have built a solid foundation by learning how to use individual spatial tools. We've created trade areas, calculated distances, performed spatial matches, and aggregated data within specific geographic regions. Now it's time to put all those pieces together.
Today's lesson focuses on synthesis. We will combine multiple spatial and standard Alteryx tools into a single, cohesive workflow to solve a common business problem from start to finish. This is a crucial skill for the Alteryx Advanced Certification, as it demonstrates not just knowledge of individual tools, but the ability to think strategically about a spatial problem.
Learning Outcome: Apply spatial analysis techniques to solve a business problem, such as site selection.
We will work through a detailed case study involving customer density analysis, which is a core component of many site selection or market analysis projects.
1. The Framework for Spatial Problem Solving
Most spatial analysis problems in a business context, including site selection, can be broken down into a logical sequence of steps. While the specific tools might change, the overall pattern is often the same:
- Define the Geography: Establish the key locations and areas for your analysis. This usually involves creating point objects for specific addresses (like stores or competitors) and then generating polygons (like trade areas or drive times) around them.
- Locate the Targets: Identify the points of interest you want to analyze in relation to your geography. These could be customers, households, assets, or events.
- Perform the Spatial Match: Determine the relationship between your geography and your targets. This is where you answer questions like, "Which customers are inside my trade area?" or "Which assets are closest to this location?"
- Aggregate and Analyze: Summarize the results of the spatial match to derive business insights. This could involve counting points within polygons, summing sales data, or, as we'll do today, calculating density.
The workflow below illustrates how these steps come together to solve a customer density problem. This is what we will build in today's lesson.

2. Case Study: Customer Density Analysis
Let's dive into our main task. We'll follow a case study that guides us through building the workflow you just saw.
Alteryx Designer: An Introduction to Spatial Analytics
This article from Billigence provides an excellent, step-by-step guide for a customer density analysis. We will use it as the foundation for our hands-on exercise. First, please read the introduction to the case study to understand the business problem and the data we'll be using.
Read the section titled 'Introduction to Spatial Tools - Case Study Example'. Pay close attention to the business goal and the two datasets we'll be working with (Store Location and Customer Location). You can download the datasets from the links in the article if you'd like to build the workflow on your own machine.
Now that you understand the goal—to find customer density in a 0-5 mile radius and a 5-8 mile band around an office—let's build the solution.
Task 1: Defining the Analysis Areas
Our first step is to translate the office location into spatial polygons representing our trade areas.
Alteryx Designer: An Introduction to Spatial Analytics
The article explains how to use the Create Points and Trade Area tools to accomplish this first task. Please read the following sections to see how it's done.
Read the sections under 'Task 1', which cover the 'Create Points Tool' and the 'Trade Area Tool'. Note how the coordinates are first turned into a point object, and then that point is used to generate the two ring polygons (0-5 and 5-8 miles).
To build this part of the workflow:
- Use a Text Input tool to enter the store's location data (or use the provided file).
- Connect a Create Points tool, configuring it to use the longitude (X-Field) and latitude (Y-Field) columns to generate a
SpatialObj. - Connect a Trade Area tool. In the configuration, specify the values
0-5, 5-8and ensure the units are set to Miles. This will create two concentric ring polygons.
Task 2: Matching Customers to Areas
With our trade areas defined, we now need to find which customers fall into each one. This requires creating points for all our customers and then using the Spatial Match tool.
Alteryx Designer: An Introduction to Spatial Analytics
Next, let's see how to use the Spatial Match tool to associate the customer location points with the trade area polygons we just created.
Read the section under 'Task 2', which covers the 'Spatial Match Tool'. Pay close attention to the concepts of 'Target' and 'Universe'. The customer points are the 'Targets' we are testing, and the trade area polygons are the 'Universe' they might fall into.
To build this part of the workflow:
- In a separate stream, use an Input Data tool for the customer location data.
- Add a Create Points tool to generate spatial points for each customer.
- Add a Spatial Match tool.
- Connect the customer points to the Target (T) input.
- Connect the trade area polygons (from the
Trade Areatool) to the Universe (U) input.
- Configure the tool to match where Target is Within Universe. The
Matched (M)output anchor will now contain only the customers who are located inside one of our trade areas, with appended data about which area they are in.
Task 3: Calculating Density
We have the raw matches, but our goal is to calculate density. The formula for density is:
To do this, we need to get the area of our polygons and the count of our customers and then combine them.
Alteryx Designer: An Introduction to Spatial Analytics
The final part of the article walks through the data aggregation and calculation steps using standard Alteryx tools.
Read the sections under 'Task 3'. This part uses multiple tools: 'Spatial Info' to get the area of the polygons, 'Summarize' to count the customers, 'Join' to bring the two datasets together, and 'Formula' to perform the final calculation.
Here is a summary of the steps to finish the workflow:
- Get Polygon Area: From your
Trade Areatool's output, connect a Spatial Info tool. Configure it to calculate the Area (Square Miles). - Count Customers: From the
Matched (M)output of yourSpatial Matchtool, connect a Summarize tool.- Group by the customer segment and the
RadiusSize(from the trade area). - Perform a Count on the customer ID field.
- Group by the customer segment and the
- Combine Data: Use a Join tool to combine the outputs of the
Spatial Infotool and theSummarizetool. Join on theRadiusSizefield. - Calculate Density: Connect a Formula tool to the
Join (J)output of theJointool. Create a new field,Customer Density, with the expression[Count]/[AreaSqMi].
You have now successfully built a workflow that applies multiple spatial techniques to solve a business problem.
3. A Different Application: Risk Analysis
The pattern of Create Points -> Trade Area -> Spatial Match -> Summarize is incredibly versatile. We used it for customer analysis, but it can be applied to many other scenarios.
For example, the article "Alteryx 101: How to Spatial Analytics" uses this exact pattern for a creative risk analysis problem: identifying which cities are most at risk from meteorite strikes.
- Define Geography: It uses a
Trade Areatool to create a 20-mile "danger zone" polygon around each city. - Locate Targets: It uses
Create Pointsto map the location of historical meteorite strikes. - Perform Spatial Match: It uses
Spatial Matchto find which strikes fall within each city's danger zone. - Aggregate and Analyze: It uses a
Summarizetool to count the number of strikes per city, identifying the highest-risk locations.
This demonstrates how mastering a spatial analysis pattern is more powerful than just memorizing what a single tool does.
Conclusion
In this lesson, we consolidated everything you've learned in the Applied Spatial Analytics module. You've seen how to structure a spatial analysis workflow and applied it to a practical site selection problem by combining spatial and standard Alteryx tools.
Key Takeaways:
- Solving spatial business problems involves a logical sequence: Define Geography, Locate Targets, Perform Spatial Match, and Aggregate/Analyze.
- A single workflow often requires a combination of tools from the Spatial, Join, Transform, and Preparation palettes.
- The pattern of creating points, generating polygons around them, and matching other points to those polygons is a fundamental and widely applicable technique in spatial analytics.
- Site selection and customer density analysis are classic use cases for spatial tools in Alteryx.
Preview of the Next Module:
This lesson concludes our exploration of spatial analytics. We've focused on answering "where" questions. In our next module, Fundamentals of Predictive Analytics, we will shift our focus to an entirely new set of questions, such as "what will happen next?" and "which group does this belong to?". We will begin by exploring the standard predictive modeling workflow and learning how to properly prepare data for building models.