Qlik Community

Qlik Server Side Extensions Documents

Documents related to Server-Side Extensions and Advanced Analytics Integration.

AAI With R - Learning Exercises.pdf

Not applicable

AAI With R - Learning Exercises.pdf

This document contains step-by-step exercises designed to introduce the concept of building out Qlik Sense files that call out to R via the SSEtoRserve open source connector.

In order to do these exercises you must first have R installed and configured as per this document: Installing R with Qlik Sense.pdf.

Here are the data source files for use with these exercises:

And here are the finished example QVF files for the exercises:

Comments
vinaykacham
Explorer

Thanks Dan for the post very useful.. Can we have similar example with Python?

neha_shirsath
Valued Contributor

Is there any document for Qliksense and Python integration?

dinuwanbr
Contributor III

Very Useful. Thanks

0 Likes
huzefawit
New Contributor II

A python integration would be very helpful. If you guys know any tutorial about the same please point it out to me.

Thanks

Huzefa

0 Likes
simotrab
Contributor III

Hi deh,

great post. I have a question: in the Iris example, why does the graph crash if I use as a dimension a text variable ("iris species") rather than "observation"? Clearly I've decreased the number of cluster to 1.

Here the error in the SSEtoRServeclust.PNG

I decided to transplant the problem in R.

Here my code:

data <- read.table("yourpath\\Iris.csv",sep=",",header=TRUE)

head(data)

data <- data[,2:6]

head(data)

#  grouping

library(plyr)

data <- ddply(data,

        ~iris.species,

        summarise,

        sepal.length = mean(sepal.length),

        sepal.width = mean(sepal.width),

        petal.length = mean(petal.length),

        petal.width = mean(petal.width)

            )

# it does not work: the error is the same of the SSEtoRServe

kmeans(data,1)

# it works!

kmeans(data[,2:5],1)

So it seems that R use also the iris species in the kmeans, if you  do not remove it.

This imply this question: is it possible that in your script that colours the point in Qlik, the function takes also the numbers of the observation as a variable used for the kmeans? Clearly this is terrible, also because it takes it implicitly.

Also, how could you make it work?

EDIT: working on data in R without using the observation as measure (like in Qlik Sense), the result is the same.

clusteR.PNG

The question is: how can I make it work with the species as dimension? I cannot understand why it does not work.

Thanks in advance.

0 Likes
rmbsrichard
New Contributor II

Found this article to be very useful

0 Likes
seb-custics
New Contributor II

Very usefull !

Thanks Dan

0 Likes
gmk
New Contributor II

Hi all, First of all, great job and thanks for sharing :smileyhappy:
Just a "little detail" in the R code for Air application that turns big in terms of model quality and statistical analysis...
The air time series are MULTIPLICATIVE, not ADDITIVE ! Means the variability around trend expands with time... which is visually quite obvious :robotwink:

Two solutions to fix the original ts R modelling in the expressions of each measure :

  • specify (*,type="multi") in decompose function
  • get the log of the whole ts instead of the ts itself : log(ts(...))

I updated the *.qvf application with these two modifications to show the result in a few different ways, but I seem unable to upload it here ?

0 Likes
gmk
New Contributor II

You can see in the screen below that in the multiplicative model for Air_passengers, random (residuals) stay much lower, meaning that TREND + SEASON explain the data much better.
(correction : type="multi" + 2nd axe for seasonal and random)

Air_example_correction.png

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎07-10-2017 10:59 AM
Updated by: