This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
If you need more geographical information on a coordinate, try converting it into a spatial object and using the Find Nearest Tool to find coinciding Experian geographical data from an Allocate Input Tool.
Clustering analysis has a wide variety of use cases, including harnessing spatial data for grouping stores by location, performing customer segmentation or even insurance fraud detection. Clustering analysis groups individual observations in a way that each group (cluster) contains data that are more similar to one another than the data in other groups. Included with the Predictive Tools installation, the K-Centroids Cluster Analysis Tool allows you to perform cluster analysis on a data set with the option of using three different algorithms; K-Means , K-Medians , and Neural Gas . In this Tool Mastery, we will go through the configuration and outputs of the tool.
One of the perennial challenges of creating high-quality maps is working with data sets where the spatial data is too spread out to make a useful map. The general solution for this challenge is to create a Map Book. A Map Book is a series of maps that show a subset of the data at a more detailed resolution. This article demonstrates methods for creating a Map Book in Alteryx.
If you are un lucky while rendering a map in Alteryx with a Carto base map, you may encounter the error message Error: AGG error loading font (C:\WINDOWS\fonts\C:\Program). This article explains the cause of this error, and how to resolve it.
Imagine this – you’re on vacation. You’re on a sandy beach where the sun has been relentless all day. It’s hot and you need something to cool you off. Ice cream would be perfect! The Find Nearest tool can help!
You know what really stinks? Working with addresses that aren’t standardized or verified. Whether human-input, or one of the many address formatting standards in the U.S., being stuck with an address you can’t either (1) identify or (2) ensure it exists can be a real pain in the… well…
CASS is here to help!
Don’t know the area of your polygon? Need the length of your line? Do you want your spatial object’s X and Y coordinates? Don’t Panic! The Spatial Info tool can translate all that information and more!
Believe it or not, data can be beautiful. Take your black and white data points and add some color to them in visuals with the suite of tools found in the Reporting Category https://help.alteryx.com/current/index.htm#Getting_Started/AllTools.htm#Report_Presentation_Tools ! If you’re looking to create reports, presentations, images, or simply output data with a bang, you can use the Render Tool https://help.alteryx.com/current/PortfolioComposerRender.htm paired with other Reporting Tools to create HTML files (*.html), Composer files (*.pcxml), PDF documents (*.pdf), RTF documents (*.rtf), Word documents (*.docx), Excel documents (*.xlsx), MHTML files (*.mht), Power Point presentations (*.pptx), PNG images (*.html), and even Zip files (*.zip) – packed with formatting and visual aesthetic that’ll make any data-geek’s mouth water.
I have configured my map to zoom to a specific layer, but the map is not zooming as expected. I have confirmed that the 'Zoom to Layer' checkbox in the Layers tab of the Report Map tool is checked only for the layer in question.
When it comes to spatial analyses, few tools come up more than the Trade Area Tool . Whether you’re looking to pad polygons around your spatial objects in distance or drive time, you won’t need to make a trade-off - just the Trade Area Tool.
A common application in spatial analytics is to visualize and analyze data in multi-ring trade areas. This type of analysis is helpful for analyzing data in incrementally increasing distances from a spatial object. Such examples might include quantifying the number of customers with a 10, 20, and 30 minute drivetime, analyzing the demographics of a population within certain distances of a location, or visualizing the strength of a cell tower signal with increasing distance from the tower. Depending on the analysis to be done, the multiple Trade Areas may need to be configured as non-overlapping (separate rings) as opposed to nested as concentric circles. Using the Trade Area tool , both types of spatial objects can be created!
Creating Multiple Trade Areas (Overlapping)
To create multiple Trade Areas as nested concentric circles, select the option to specify the Trade Area radius as a 'Specific Value' and enter the radii for each Trade Area. A polygon output will be created for each specified Trade Area Radius. The sample configuration (Figure 1) creates three polygons (5 mile radius, 10 mile radius and 15 mile radius). Polygons are visualized in the order that they are listed. To create a "bullseye", list the radii for the Trade Areas in descending order. Note that the larger Trade Areas include the areas of the smaller Trade Areas (i.e., the 10 mile radius Trade Area includes the same area specified by the 5 mile Trade Area). To avoid "double counting" of area, consider creating non-overlapping trade areas (described below).
Figure 1: Create multiple Trade Areas around a point spatial object with the Trade Area tool. List the multiple radii (and specify the unit of miles, kilometers or DriveTime minutes), separating each with a comma.
Creating Non-Overlapping Trade Areas:
To create multiple non-overlapping Trade Areas ("doughnuts"), select the option to specify the distance ranges as 'Specific Values' and enter the distance ranges for each ring. Distance intervals should be specified as ranges (0-5 and 5-10), which each range separated by a comma (Figure 2). As a result, each ring is created as an individual polygon that begins at the distance specified by the minimum of the range and ends at the distance specified by the maximum of the range.
Figure 2: Each "doughnut" is specified as a distance range to create non-overlapping spatial objects. The highlighted "doughnut" below represents the second distance range (5-10 miles) from a point spatial object.
* For additional information on tool configuration, see the attached workflow (created in v10.6).
You are in charge of marketing for Joe’s Bike Shop, a Colorado-based chain of bicycle shops. A new list of potential customers (DemandLoc.yxdb) has come into the system and you want to be sure that the closest location of a Joe’s Bike Shop (ExistingLoc.yxdb) within a reasonable driving distance (in this case, 20 miles) be advertised to the Potential Customer.
As always with Alteryx, there are many ways to approach this problem. Since our files of Potential Customers and existing locations of Joe's Bike Shop contain spatial objects (points), we can take advantage of the Find Nearest Tool. Though a number of other spatial processes could be used to handle this analysis, this scenario is a great opportunity to use the Find Nearest Tool because it:
includes two anchors for data input, which removes the obstacle of complex data arranging;
Accepts a distance criteria (Joe's Bike Shop must be within 20 miles of our potential customer), which eliminates the need to create Trade Areas around my existing location of Joe’s Bike Shops;
Calculates distance (or Drivetime) and direction, metrics I’d normally use the Distance tool to obtain and;
Allows a user to specify the number of closest spatial objects to identify, making the ol’ Sort and Sample trick unnecessary!
Let’s get started!
We have two input data files, the locations of Potential Customers (DemandLoc.yxdb, 3294 records) and the existing locations of Joe’s Bike Shops (ExistingLoc.yxdb, 6 records). Since we want to find the closest (within 20 miles) Joe’s Bike Shop location to a Potential Customer, we’ll set the Potential Customers file as the Target Input and the Existing Locations as the Universe input:
Then, we’ll configure the Find Nearest Tool’s parameters. Select the Spatial Object field for the Target and Universe inputs. Determine the number of points to find and specify the maximum distance* between a Target and Universe point. Note that the Find Nearest Tool also allows us the opportunity to re-name and re-order fields from incoming data, as well as select/de-select new fields generated in the Find Nearest Tool (FindNearestRank, DistanceMiles, and Direction).
*Users with the Spatial Data Bundle may also select Drive Time or Distance and the TomTom dataset to calculate.
The Find Nearest Tool has two output anchors, one for matched (M) Target inputs and another for unmatched (U) Target inputs. According to our analysis, 2341 of our 3294 potential customers have a Joe’s Bike Shop location within 20 miles of their location. The remaining 953 Potential Customers are outside the 20 mile distance.
In the event that two Universe objects are the same distance from a Target object, the Find Nearest Tool will output multiple matches for a Target Object. Since we specified that one Joe’s Bike Shop should be found per Potential Customer, we’ll verify that a Potential Customer has not matched to more than one shop location using a Unique Tool (see attached workflow).
Looking to optimize your Find Nearest Workflow? Check out this article for tips!
A truck is scheduled to deliver shipments to warehouses along a route spanning from Denver, CO to Abilene, TX. Deliveries are scheduled for certain days, so the route must be followed in the specified order (1 – 15). To spatially analyze the delivery truck’s route and area served by this truck’s shipments, we want to map:
1) the truck’s end-to-end route, and
2) the truck’s daily scheduled route.
To create the spatial objects (polylines) associated with the truck's routes, we'll use the Poly-Build tool. Located in the Spatial tool palette, the Poly-Build tool uses two or more point spatial objects and creates sequenced polyline or polygon to represent that data. For this particular use case, we’ll utilize the “Sequence Polyline” Build Method to vizualize and analyze our data.
1) Map the truck's end-to-end route
To map the truck’s entire delivery route, we’ll use the PolyBuild tool to generate a polyline that connects stops 1 to 15 in order. To control the order in which the spatial point objects are connected, we’ll use the field ‘Trip Sequence’ as the Sequence Field in the tool’s configuration:
The result is a single polyline that represents the 1,925 mile long route that the delivery truck will cover on its scheduled route:
2) Map each of the four daily delivery routes:
After some data preparation*, we’ll use a Multi-Row Formula tool to first group the truck’s stops into four segments, one for each day of the shipment schedule. Then, we’ll use the Poly-Build tool to create polylines for each of the day’s routes. Again, we'll select Sequence Polyline as our Build Method and 'Trip Sequence' as the Sequence Field. To create multiple polylines, one for each day, we’ll also select to group our data by the field 'Group'.
*See attached workflow for steps taken to prepare data for daily truck route creation.
The result is four polylines that represent each of the four daily segments of the truck's scheduled delivery route.
The Create Points Tool is the ‘Bonnie’ to your Clyde of any spatial analyses. The Create Points Tool allows you to take your latitude and longitude, often the spatial fields included in datasets, and convert them to a format that can play with Alteryx Spatial toolset. If your dataset lacks the latitude and longitude fields needed there are numerous free websites, geocoders, or geocoding APIs where this information is available.
Have some Latitude/Longitude points and not much else? Working with Spatial Objects and need more information than a simple map point? Time to call in the Reverse Geocoding macro. Reverse Geocoding can give some robust information to help make important business decisions when working with spatial data. Case in point: Your “friend” has hacked the Pokémon Go APK and hands you a list of Pokémon with the associated Latitude/Longitude. You can’t make an informed decision on your next weekend Poke-session without first understanding more than just the location on a map!
The Site Selection App, which is part of the Geography Analysis Collection (GAC)*, allows a user to perform demographic and firmographic analyses on areas surrounding one or multiple sites of interest. The Site Selection App requires a spatial input to begin the site selection analysis. Like most other apps** in the GAC, this spatial input must be a point in the form of either an address or a pair of Latitude/Longitude coordinates. These points are user defined by one of three ways: Selecting a point on the map, entering a location’s address or intersection, or uploading a number of points and their associated spatial objects or geographic coordinates.
Selecting a Single Site for Analysis
Using the Interactive Map:
App users can select a single site for analysis using the Interactive Map. Although it is recommended that the site be labeled, this field (shown in the orange circle in Figure 1) does not necessarily need to be populated for a successful run.*** If no label is entered, the app will use the default “Site Selection” and latitude and longitude for the selected site in the report output.
Figure 1: Sites entered using the Interactive Map do not need to be named to run successfully, but it is recommended this field is populated for reporting purposes.
Entering an Address or Intersection
App users can also select a single site for analysis using an address of a location or a street intersection (Figure 2). The user’s input will be standardized “under the hood” of the app, as CASS address standardization is enabled as part of the app’s underlying geocoding processes. For addresses, the Address, City and State fields are required; a zip code is not necessary for a successful run. Examples of acceptable syntax for intersections are found in Table 1.
Figure 2: Addresses may be used to locate a single site for analysis.
Intersection Syntax - Successful
Intersection Syntax – Unsuccessful
Canyon & 16 th St
Canyon Rd and 16 th St
Canyon Rd, 16 th St
Uploading Multiple Locations
The Site Selection App can process multiple locations at one time, though the user is limited to 20 records. A separate report will be generated for each location. The Site Selection App accepts multiple locations in the forms of addresses, latitude/longitude coordinates, or point spatial objects (Figure 3). Addresses must include all the requested information, including zip codes. Address and coordinate information can be uploaded in the form of Excel Workbook (.xls, .xlsx) and Comma Separated Variable (.csv) files. The Site Selection App accepts spatial objects from ESRI shape (.shp), GoogleEarth (.kml) and Alteryx Database (.yxdb) files.
Figure 3: A user can identify the type of data (addresses, coordinates or spatial objects) that is being uploaded by selecting a radio button and then populating the necessary fields.
* The Geography Analysis Collection (GAC) is accessible to subscribers only. Contact firstname.lastname@example.org for more information.
**The Market Analysis App requires a polygon as its spatial input. Further information on spatial inputs to the Market Analysis App can be found here.
***Other apps in the GAC, such as the Market Analysis App, require that this field be populated to run successfully.
Suppose you have a datetime stamp in a dataset for the timezone where you are. This dataset includes data for locations in timezones other than the one you're in and you want to convert your datetime stamp to reflect the local timezones of the locatons in your data.
In the attached example, we'll pretend you're in the Eastern Standard Timezone and your datetime stamps are EST. Your data includes the following locations:
San Mateo, CA
Sydney, NSW, Australia
Toronto, Ontario, Canada
We'll convert your EST datetime stamp to the local timezones of these locations. This solution will use latitude / longitude coordinates to determine the local timezones. Your data will need have lat/long coordinates for each of your locations.
The solution will use a Google API to find the UTC time offsets. Depending on the date, this could include an adjustment for daylight savings as well. To read more about the API being used, visit https://developers.google.com/maps/documentation/timezone/intro#Introduction. This site will give you information about which parameters are used to make an API call, and what data is returned. This is informational since Alteryx handles the data call and data engineering.
The Google Maps Time Zone API application (and most API applications in general) require some form of authentication. This means you will need to get an API key. It’s free to get a key, but you are limited to the number of calls you can make per day (I believe it’s currently set at 5K. If you are going to have more than 5K lines of data, let me know; we may be able to come up with something else). Go to https://developers.google.com/maps/documentation/timezone/get-api-key#key and look for this:
Click on get a key. A new browser tab will open that looks like this:
Go ahead and click Continue. You’ll see a message in a black box that say ‘Creating a new project’. A new window looks like this:
You can give your key any name you want, but you will need to enter your IP address. To find your IP address, go to https://www.whatismyip.com/. Look for ‘Your IP Address Is:’ and copy/paste your IP. Click Create. It says it may take up to 5 minutes for settings to take effect.
Once you have your API key, copy and save it somewhere like NotePad. You’ll need to enter your API key in the macro configuration window. Once you enter your key and save the workflow, you shouldn’t have to reenter it again.
Your input data looks like this:
Where the DateTimeStamp is in EST. The goal is change EST to local of time of each location. Attach your input file to the 'UTC to Local Time Converter Example' macro.
Replace 'YOUR_API_KEY' with the API Key you acquired and pasted/saved in NotePad (from above):
The browser results show the results from the conversion:
NOTE: the attached example was developed on Alteryx Designer v10.1.7.1288
The UTC to Local Time Converter Example macro will make the appropriate daylight savings adjustment.
I remember vividly many years ago when I was tasked by my former boss at a previous company to create trade area maps for each one of our office supply stores. At the time, we had roughly 1,200 stores. I only had MapInfo to work with and no programming skills to fall back on. Needless to say, I was a little distraught.
It didn't take me long to realize that this feat, as far as I was concerned, could not and would not be completed manually. So, a crash course in MapBasic programming was in order. After a lot of studying, a fair amount of pain and hours upon hours of struggle, I was able to create a MapBasic program that would produce these maps in an automated fashion.
Fast forward 4 years and something amazing happened – I was introduced to Alteryx!
After significantly less studying, pain and struggling, I was able to create a workflow which could to do the same thing, except this time produce three map views for each store. Not only was I able to create the workflow without programming, saving me countless hours, Alteryx produced each map in significantly less time. So, I would run the workflow before leaving for the day and come back in the morning with the nearly 4,000 PDFs waiting for me! We then decided to produce two additional thematics for each store, so now we are talking nearly 12,000 maps. You can only imagine the time savings!
How is this done?
The attached workflow (shown below - created in 10.1) is the basis for doing just that. The Grouping function within the Report Map tool (also shown below) is all that is required to create this automation. In this workflow, I want to create a map for each store with each store’s 15 minute drive time and customers. I also want all of the competitors to show up no matter which store is shown.
In order to achieve this, I have simply configured the workflow so that the store number is in the Grouping Field for the first three layers previously mentioned, and left the Grouping Field blank for the competitors layer.
Want a separate file for each map?
In the Render Tool (illustration below):
Make sure to choose a specific output file type in the Output Mode
Choose a name and location for the files
Check the 'Group Data into Separate Reports' box
Select the field to group on (typically 'Group')
Choose how you want to modify the file name for each map
As a result, you will see a file created for each map:
Each layer must have a common field (Store Number in this case).
The Field type of the common field to group by must be the exact same (Int16 in this case) - No mixing of Int16 with Int64 or V_String with String, for instance.
Things to Consider:
Only one object from each of the layers that you are grouping by will show up on each map (unless you have multiple records with the same ID). So for example, other stores will not show up on the same map, even if they are within the map view. You can add these in as a seperate layer and not group it if you want those within the map view to show up on each map.
Zoom to layer – Select appropriate layer to zoom to in each map (drive time boundary in this case).
A field called ‘Group’ will flow through the workflow after the Report Map tool, which you can use for map titles, for example.
Please feel free to comment or ask questions, and thanks for reading!