community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

R Radial Dendrogram extract x and y values

Highlighted
Meteor

I've created a radial dendrogram in R using the networkD3 package, which I'd like to visualise in Tableau. My idea was to obtain the coordinates in Alteryx and create a shapefile to make it fully interactive. Now, I've read here that it's not as simple as that and that I'd need to embed an HTML file into Tableau, but I'd like to give it  try regardless.

I'm stuck on the R code to return the coordinates for the notes and edges. I tried

 

write.Alteryx(as.data.frame(coord$x),2)

write.Alteryx(as.data.frame(coord$x),3)

 

which return an error message. I've only started using R a couple of days ago so any help would be hugely appreciated!

Alteryx Partner

Cool project!

Bolide

Hi @Luisa_Bez,

 

What was the error message?

 

Could you share your workflow, or if not, your R code? I've been using both R and Alteryx for a long time and I will say that you can sometimes run the same code in both and Alteryx will throw and error while R proper will not. There could be a number of reasons why, but it's hard to tell without more information.

 

Best,

mmenth

Meteor

Hi mmenth,

 

I thought I attached the packaged workflow with the R code above. Was there an error when opening it? Anyway, here it is again :)

 

And here's the code separately:

 

ExceptII <- read.csv("ExceptII.csv", sep=";",header=TRUE, stringsAsFactors = FALSE)
head(ExceptII)
str(ExceptII)
library(data.tree)
ExceptII$pathString <- paste("ExceptII",ExceptII$Level1,ExceptII$Level2,ExceptII$Level3,ExceptII$Level4,ExceptII$Level5,ExceptII$Level6,ExceptII$level7,ExceptII$level8,ExceptII$Level9, sep= "|")
head(ExceptII)
ExceptIITree <- as.Node(ExceptII, pathDelimiter = "|")
ExceptIITree
ExceptIITreeList <- ToListExplicit(ExceptIITree, unname =TRUE)
library(networkD3)
radialNetwork(List= ExceptIITreeList, 
                fontSize = 13,
                fontFamily = "OpenSans-Light",
                nodeStroke = "orange",
                opacity = 0.9)

 

Thanks

Meteor

Update: I've managed to obtain the SVG coordinates for each node, but the values in Alteryx differ from the ones in the HTML code. Does anyone know why that might be? I don't have any translate values with 48 or 96 in my Alteryx dataset...

 

 

Labels