An Introduction to Spatial Analytics

Alteryx Designer: An Introduction to Spatial Analytics

Table of Contents
    Add a header to begin generating the table of contents

    Imagine this – you are a customer relations analyst provided with spatial data to analyse the customer density of your customers within an area. Working with spatial data and spatial analytics is known to be notoriously difficult, as spatial data varies widely in format, and could contain more than just location-specific data. Finding reliable software to help you analyse this data further complicates the process as not all applications are compatible with spatial data and those that are aren’t always created equal.

    In this post we’ll be showing you how you could use Alteryx Designer, one of our favourite spatial compatible softwares, to turn your spatial data into a visual report in just a few easy steps.

    The Essence of Spatial Data

    Spatial data is widely used in data analytics to add geographic context for a more complete picture of data events. Spatial data, also known as geospatial data, refers to information that describes objects or events with a location on or near the surface of the earth. It could be the location of a park, the distance between two workplaces or the boundaries of a state. When you integrate spatial data with analytics, you can explore deeper insights into your business questions.

    Spatial data takes various formats, like numeric values to represent the longitude or latitude of a coordinate, a string formatted as a GeoJSON that encodes geographic structures, or a spatial object like a point, line or polygon.

    Alteryx Designer offers a palette of spatial tools which could help users drive meaningful insights and information from spatial data through spatial analytics.

    What is Alteryx?

    Alteryx focuses on providing their users with self-service analytics which facilitates digital transformation across organisations. The Alteryx platform comes with four different tools:

    1. Alteryx Designer for Workflow creation
    2. Alteryx Server for automation and collaboration
    3. Alteryx Connect for data governance
    4. Alteryx Promote for model deployment

    Alteryx has been known to empower their users by providing value from your data as you prepare, blend and visualise all your data sources conveniently and effectively. This includes the ability to apply advanced predictive and spatial analytics without any coding.

    Within the industry, Alteryx was named a “Challenger” in Gartner’s 2021 Magic Quadrant for Data Science and Machine Learning platforms. It provides solutions that aim to deliver end-to-end automation of analytics, machine learning and data science processes.

    If have never used Alteryx and are interested in trying it out, you can download a 30 Day Free Trial below and try spatial analytics for yourself.

    Alteryx Data Preparation Tools

    Before we dive into the spatial tools Alteryx has to offer, let’s take a quick look on a few essential data preparation tools on Alteryx Designer which will be highlighted in this post. The tools fall below the following categories:

    • In/Out
    • Preparation
    • Join
    • Transform

    Do note that the tools highlighted within each section is not the exhaustive list of tools available. To find out more about the extensive list of tools available on Alteryx Designer, you could refer to the periodic table of tools below:

    Alteryx Periodic Table

    In / Out

    Inputdata Tool Icon Input Data Add data into your workflow by connecting it to a file or a database. The input data tool allows you to input data from your local files or databases like SQL and Oracle. Click on this box to learn more about the supported input file types.
    Browse Tool Browse Tool The Browse tool allows you to view data at a more detailed level. You can see data profile information for multiple columns at once in a single holistic view, or for a single column of data. You can view information on data type, number of records, data quality and a variety of statistics.
    Output Tool Alteryx Output Tool The Output Data tool allows you to write results of a workflow to supported file types or data sources.


    Filter Tool Alteryx Filter Tool The filter tool gives users the ability to select data using a condition. The tool also gives you the ability to view rows of data that meet the condition and does not meet the condition.
    Sort Tool Icon Sort Tool With the sort tool, users are able to arrange records in a table in alphanumeric order based on the values of the specified data fields.
    Formula Tool Formula Tool The formula tool allows users to create new columns, update columns and use one or more expressions to perform a variety of calculations and operations. You could perform conditional statements, format dates, or even cleanse string data using the formula tool.


    Join Tool Join Tool Use the join tool to combine two inputs based on common fields between the two tables. You also have the option of joining two data streams based on record position.


    Summarize Tool Summarise Tool The summarise tool offers various actions – functions and calculations on your data. The summarise tool could return the sum for a column of data, count the number of rows in a column or even group a column of data by identical values.

    Introduction to Spatial Tools - Case Study Example

    Tools under the Spatial category offer functionalities that could perform spatial data manipulation, processing and object editing. The spatial category includes tools like the Create Points tool, Distance tool, Find Nearest tool or Trade Area tool – just to name a few. In this post, we will be walking through how spatial data could be explored, to create enriched spatial analytics, through four different Spatial Tools.

    Let’s re-consider the scenario in further detail:

    “You are a customer relations analyst looking to build a customer density report. Your goal is to identify the number of customers per square mile in a 5-mile radius from your office, and in a band from 5-8 miles from your office. The densities should be grouped by distance and customer segment.“

    As best practice, we will first break down the list of requirements into bite sized parts:

    1. Identify the area within 5-miles radius and within a band of 5-8 miles from your office.
    2. Identify the customers found within that area.
    3. Calculate Customer Density grouped by distance and customer segment.

    We will be using two datasets for this analysis:

    1. Store Location dataset, containing latitude and longitude of the store location
    2. Customer Location dataset, containing the latitude and longitude of customers of varying categories.

    You can download the datasets above and work along with the case study scenario.

    Figure 1 Data Set
    Figure 1: Store Location Dataset
    Figure 2 Data Set
    Figure 2: Sample of Customer Location Dataset

    Task 1: Identify the area within 5-miles radius and within a band of 5-8 miles from your office.

    From the Office Location and Customer Location dataset, the latitude and longitude coordinates are provided respectively. Before we proceed to process any data for spatial processing, we will need to create a point for each row of data by using the Create Points Tool.

    Create Points Tool

    The Create Points tool identifies the latitude and longitude coordinates from a dataset and creates a point-type spatial object. This is usually done to prepare the input data for spatial processing using spatial tools like the Spatial Match, Distance or Trade Area tools.

    Under the configuration of the Create Points tool, we will select the corresponding X-Field (Longitude) input and Y-Field (Latitude) inputs from our data source. Since our dataset holds latitudinal and longitudinal coordinates, we will select the option to identify the fields as Latitude/Longitude Floating Points and run the flow. Other options include to identify the fields as integers or projected floating points.

    Connecting the Browse Tool to the Create Points tool will show you the resulting points created on a map.

    Create Points Tool

    Next, we will proceed to create the radius around the point to identify the 5-mile radius and 5-8 miles band from the office. The Trade Area tool will be our next tool to help us out with that.

    Trade Area Tool

    The Trade Area tool inputs the spatial point or object and creates a polygon area around a point based on the configured radius. The radius could be derived around a specified point or calculated by drivetime minutes.

    In order to identify the 5-mile radius and 5-8 miles band from the office, we will drag the Trade Area tool into our workflow and connect it to the Office Location point. We will input “0-5, 5-8” under the specified values section of the configuration pane and also ensure that the units has been selected as “Radius (Miles)” for our dataset.

    Trade Area Tool

    Running the browse tool here will present the area created surrounding our specified point.

    Tradearea Tool Output

    Task 2: Identity the customers found within a 5-mile radius and within a band of 5-8 miles from your office.

    Since our goal is to identify customers who lie within the office’s area, we will now use the Spatial Match tool to identify intersections between the two spatial objects.

    Spatial Match Tool

    The Spatial Match Tool establishes spatial relationships between two sets of spatial objects. These relationships include scenarios where spatial objects or points intersect, meet, touch or contain one another. The tool takes in two spatial objects from separate input connections and matches them based on the selected spatial relationship.

    In order to configure the tool, the spatial match tool takes in one input through the Target (T) anchor, and another input through the Universe (U) anchor. Spatial data in the Target and Universe anchor are then matched by the following calculations:

    Spatial-match Calculation

    Here, we will connect the Office Location area to the Universe anchor, and the Customer’s location points to the Target (T) anchor. We’ll ensure that the Universe anchor takes the trade area spatial object and configure the tool to select points where Target is Within Universe. The output result will select customers (targets) who are within the office area (universe).

    Spatial-match Tool

    The output of this tool comes out of two streams, the Matched (M) and Unmatched (U) records. Connecting a browse tool to the M anchor will reflect the records where Target records have a match against the Universe stream.

    Spatial-match Tool Output

    Task 3: Calculate Customer Density grouped by distance and customer segment.
    For this task, we are looking to calculate the customer density of each customer segment, grouped by the office trade area above. In order to calculate customer density, we will use the following formula:

    [Number of Customers] / [Trade Area]

    We’ll now need to produce the Number of Customers within each customer segment and the numeric value of each Trade Areas.

    Let’s begin by producing the value of the office’s trade area in Square Miles. Here, we’ll be using the Spatial Info tool.

    Spatial Info Tool

    Use the Spatial Info tool to extract tabular information about a spatial object. Outputs of this tool include the area, spatial object, number of parts, number of points, and centroid coordinates of your selected spatial object.

    From the Office Area data stream, we will select the “Area (Square Miles)” option within the Spatial Info tool. This will populate the column “AreaSqMi” in the results window.

    Spatial Info Tool

    The resulting area value will be shown in the Results window:

    Spatial Info Tool Output

    To find the Number of Customers within each Customer Segment, we will use the Summarize tool to retrieve this information. We will group the customers by customer segment and the radius size of the trade area they belong in. Lastly, we’ll count the number of customers.

    Summarize Tool

    Running this step will produce the following output:

    Summarize Tool Output

    Now that we have the information required, we will use the Join tool to combine the data streams before calculating the density. Taking a join tool, we will connect the two data streams into the L and R anchor of the join tool respectively. We’ll join the table by a specific field – RadiusSize and select the four columns below to include in our output:

    Join Tool

    The joined results will produce the following output:

    Now we could finally calculate the density. Using the Formula tool, we’ll create a new column, “Customer Density” and input the calculation “[Count]/[AreaSqMi]” to get the customer density within each Customer Segment & Trade Area.

    Formula Tool

    Now we have the Customer Density included in our output:

    Formula Tool Output Alteryx

    Lastly, we’ll use a Sort tool to clean the output by sorting the Radius Size in ascending order, and number of customers in descending order.

    Sort Tool

    Our final resulting output will look as below:

    Sort Tool Output

    And there we have it, the completed workflow after achieving the above steps:

    Alteryx Flow

    However, that’s not all. There are still many possibilities to be uncovered with Alteryx Designer. One of which, is shown below, where a single report can be easily generated by connecting to the tools from the Reporting Tool kit. The report can be in the format of a PDF, Image, PowerPoint document or HTML.

    Output Report

    Other Possibilities with Alteryx

    Other possibilities with Alteryx include:

    Customising Alteryx applications and tools

    Alteryx offers self-service analytics which allows for customisations to meet your organisation’s needs. With its app interface, it allows the end user to execute the workflow with parameter selection or ask the user to upload their own input data; without the need of understanding details of the workflow.  Furthermore, macros can be built in for repetitive workflows (e.g. looping for optimisation) or packing up workflows as a single tool for distribution across the organisation.  

    Connecting to pre-existing database and sharing workflows

    Alteryx has a holistic set of database connectors and functions, which can work with data from multiple databases or areas within a database. On top of these, the workflows allow users to effectively prep, query and combine data as they would commonly do in SQL or an ETL tool. Furthermore, with Alteryx Server, organisations can easily automate and share their workflows and insights across different business users, enhancing collaborations to make better business decisions.

    Conducting predictive and advanced statistical analysis

    Alteryx provides a variety of pre-built predictive models and other modelling tools such as Behavioural Analysis, Demographic Analysis and Time Series. It also allows statistical tools such as R or Python to be connected directly within a workflow. Some examples of the advanced statistical techniques available include: regression, decision trees, random forests, neural networks, support vector machines (SVMs). With these drag and drop modelling tools, Alteryx can provide ease and convenience to all users, even those with limited programming skills.


    Considering the growing value and popularity of spatial data and spatial analytics in the data industry, Alteryx Designer is a great option to help you and your organisation to venture into spatial analysis. Topped with the extensive tools offered in Alteryx, you are bound to make the most out of your data by producing better data insights and informed decisions efficiently and effectively.

    With the assistance of Alteryx certified consultants from Billigence, we can further explore the tools and solutions to cater to your organisation. Please feel free to submit an enquiry form below if you would like to get in touch to find out more about Alteryx  or spatial analytics and the potential for your organisation.

    Contact Us