Alteryx started its history with map analysis, so it is expected to see spatial analysis tools to form a core part of Alteryx's toolkit. This blog series will builds from the Learn What The Data School Learns session I gave, where I tried introduce varies spatial tools through the exercises.
The solution workflow is given at the end of the post, people are free to download and have a lot it in details. For more lessons on the topics, check The Information Lab's Meetup or Eventbrite link for free public sessions.
All spatial information will be encoded as spatial object in Alteryx, they are Point, Line, Polygon, underlyingly the latter two spatial objects are made from points and all points objects are store as string in a special format for Alteryx to read.
Let's start with some data.
To create point in Alteryx, we will need latitude and longitude information, which is supplied above, and it is the desired input for Create Point tool.
Note: For postcode or address, then external tools or API is needed to convert them into latitude and longitude values.
If the column names contain the longitude and latitude, then Alteryx will pick them automatically, otherwise we will need to specify them through the drop down. The default setting as Floating Point should work fine in most of the cases.
We notice spatial information is presented as green (both icon and results) in the output, given it's special nature it is not displayed directly in the results pane. To view it, we need to attach a Brower tool in the output anchor to view in a separate area.
Similar step can be down on The Information Lab's office information.
Once we have the spatial objects created, we can start ask some questions, such as Find the nearest school to The Information Lab's office. To do so, we have a tool does just that.
Let's connect the workflow up first
The tool takes two inputs, Target and Universe, the way I try to remember is as follows:
For a given Target, we have a Universe (of points) try to match it.
Here is post describe Target and Universe and their relationship.
We see from the configuration pane, we try to find the nearest 3 schools with respect to The Information Lab's location, given a maximum search distance of 5km.
Note: Some spatial tools give a Select tool view in the configuration for deselect unused columns and rename new spatial objects that is created.
Notice the Find Nearest tool will create three new columns by default, FindNearestRank, DistanceKiometers, Direction. Depends on the usage, we can deselect them in the configuration stage.
We can see the closest school is about 215m away from The Information Lab's office. Let's view it on the map as well.
There you are, with just two tools and minimal setup, we can already perform some basic spatial analysis within Alteryx.
Follow the blog post updates for more examples on other spatial tools.
Looking for more guides, tips and tricks in Tableau or Alteryx? Go check out the other blog posts from the Data School.