sankeyNetwork not rendering image

This is my code to render a sankey graph

g1 <- sankeyNetwork(Links = mydata, Nodes = temp, Source = "C1",
Target = "C2", NodeID = "stage" , Value = "count", units = "")
g1

[note: mydata$count is the number of people in each node or intersection)
the data sources are:

head(mydata)
C1 C2 count
1 1 6 552
2 1 7 631
3 1 8 78
4 1 9 21
5 1 10 258
6 1 11 497

and

head(temp)
stage
1 Florida-North
2 Florida-South
3 Foot Print-Foot Print
4 Out of Foot Print-Out of Foot Print
5 Texas-Houston
6 Coral Springs

and I got nothing in return in the plot tab? :frowning:
Anyone that can help me figure out?

Hard to say without a reproducible example, but I’ll take a guess and say that you’re not using “zero-indexed” node ids in your nodes data frame since it appears to start with 1.

I found the error the two columns "C1" and C2" with the nodes needs to be an integer or a number not a character!!!!!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.