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.
on 09-24-201512:21 PM - edited on 07-27-202111:46 PM by APIUserOpsDM
Alteryx has a full set of integrated predictive tools but even with developers working at full speed, it is hard to keep up with the R community. Sometimes users want to install and utilize their favorite R packages. Luckily, there is a solution for advanced users. This post will:
Show how to install/load an R package that is not already included with the Predictive Tools
Present an example of time series clustering using the R package "TSclust". (See the attached workflow, developed in v10.0)
Using an Additional R Package:
Can you adapt your code to use the integrated packages? This is the first thing to consider because using the existing packages gives you easier integration with the rest of the workflow and better compatibility. Here’s the list of included packages in Alteryx 10.1: Alteryx R Packages.
If you must use additional R packages, the best approach is to use the analytic app attached below to add the package in your local R library. Please note that there are two limitations here:
Even if you use additional R packages, Alteryx does not support showing GUI elements from these packages.
Apps running on the Alteryx Gallery will not support these additional packages.
If you still would like the package to be part of Alteryx Product, please post this request to the Ideas section of the community or star the post if someone else already asked for it.
Simply change the package name to the one you would like to test out. Change the configuration options to suit your requirements, and then click "Finish."
A cautionary note: As of the time of this writing (May 2016, newest version of Designer is 10.5), it's important to ensure that you only install packages that do not come with the Alteryx Predictive tools installation. You may end up installing a different version of a package that is used with the Predictive tools, and the conflicting versions can cause errors in these tools. We are currently working on an improvement that will solve this problem. The improvement should be available with the 10.6 Predictive release.
Use Case Example: Time Series Clustering
Alteryx implements many clustering algorithms. But what if the data you would like to cluster is a time series? For example, customer sales histories? Or sales histories at different locations? In this example we have booking data from different years. We would like to group the years based on two characteristics of the time series:
Magnitude: years with high total and average booking volume should be considered similar.
Temporal Patterns: for example, if in 2000 and 2002 sales were higher in the summer but lower in the winter, and then in 2001 and 2003 the trend was reversed, we want to group 2000 and 2002 together and 2001 and 2003 together.
We will accomplish this using the TSclust package, whose documentation is available online. The attached workflow demonstrates the process, with the following results:
For this data set, the grouping was mostly a function of magnitude, because most of the years had similar temporal patterns.
Check out the original discussion page (and authors who contributed R code!):