Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Hierarchy graph generation using DiagrammeR with R-Tool

David40a
5 - Atom

Hi Community,

I have a need to integrate the generation and output of a hierarchy graph into an Alteryx workflow.  I have an existing workflow which colates the information and prepares it for the graph into nodes, and edges.  I have created an R script that will create the hierarchy graph in R-Studio (I learnt R for this purpose so am still new to the language).  When I try to incorporate the script into Alteryx I cannot make the graph output and since I am still new to R, I am not sure if it is a bit of missing code or whether it is a compatibility issue with DiagrammeR and Alteryx.  I have followed the logical Alteryx specific output graph and can output a basic plot chart, but it doesn't work when change it to the graph commands from my R script.

 

I have done extensive research into how to resolve this myself but have not figured this one out.  I'm sure if someone more experienced in how R works in Alteryx has a look, they will find the solution very quickly.

 

I have attached a zip file with the graph component of the workflow, and some anonymised data for nodes and edges.  I have also attached the graph which is generated with R-Studio.

 

Graph from R-Studio.png

 

I appreciate if anyone can help me out on this one, and if it is not going to work, please offer other solutions which will work.  Ultimately, this workflow will integrate into an analytic app that will provide an excel output and the graph.  The analytic app will be hosted on the company's gallery.

3 REPLIES 3
damc
11 - Bolide

Hello @David40a 

 

I couldn´t figure out why this is happening either.

 

As an alternative, I´ve modified the code to save the graph as a PNG file and to output its file path in order to configure an Image tool to report it (workflow attached. Please remember to change the file path string before running it).

 

Hope it helps

 

Regards

David40a
5 - Atom

Hi @damc ,

 

Thank you for looking into this for me.  Your solution is very simple but very clever.

 

When I incorporate this solution into the workflow on the gallery, will it still work with the short output path of "./graph.png" within the R-Tool to output to the gallery output results page?

 

Thanks again, 

 

Really appreciate your help

damc
11 - Bolide

Hello @David40a 

 

I´m not sure how to handle the path on the gallery and, unfortunatelly, it´s not possible for me to test it. Sorry I can´t help any further.

 

Regards

Labels