-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add examples #1
Comments
Hey @kenneditodd, could I ask you for your input on this? Can you install the package and recreate the examples? What else are you interested in? |
@SchmidtPaul Your examples page says 404 - page not when you click on the link from the main README. However, the link from this page works and I was able to replicate all the examples. Things off the top of my head is i need the nodes to almost repel eachother for a cleaner display. Also, when zooming and dragging nodes a reset button would be nice. Kinda like what you see with plotly graphs. |
Thanks for your input @kenneditodd !
library(sankeyD3plus)
library(tibble)
# Links table
links <- tribble(
~source, ~target, ~value, ~linkcolor,
0, 1, 3510683, "gray", # ccs to extract hifi
1, 2, 3089255, "gray", # extract hifi to lima passed
1, 3, 421428, "gray", # extract hifi to lima failed
2, 4, 3036889, "gray", # lima passed to refine passed
2, 5, 52366, "gray", # lima passed to refine fail
4, 6, 157826, "gray", # refine passed to cluster HQ
4, 7, 44, "gray", # refine passed to cluster LQ
6, 8, 57528, "gray", # cluster HQ to collapse
8, 9, 57528, "gray", # collapse to classify
9, 10, 40201, "gray", # classify to filter
6, 11, 157761, "gray", # cluster HQ to mapped
6, 12, 65, "gray", # cluster HQ to did not map
11, 13, 157761, "gray" # mapped to bambu
)
# Nodes table
nodes <- tribble(
~id, ~label, ~nodecolor, ~yorder,
0, "CCS", "skyblue", 1,
1, "Extract HiFi", "skyblue", 1,
2, "Lima Passed", "skyblue", 2, # changed
3, "Lima Failed", "black", 1, # changed
4, "Refine Passed", "skyblue", 2, # changed
5, "Refine Failed", "black", 1, # changed
6, "Cluster HQ", "skyblue", 2,
7, "Cluster LQ", "black", 1,
8, "Collapse", "red", 1,
9, "Classify", "red", 1,
10, "Filter", "red", 1,
11, "Mapped", "gold", 2,
12, "Did not map", "black", 3,
13, "Bambu", "gold", 2
)
# Plot
sankeyNetwork(
Links = links,
Source = "source",
Target = "target",
Value = "value",
linkColor = "linkcolor",
Nodes = nodes,
NodeID = "label",
NodeColor = "nodecolor",
NodePosY = "yorder",
numberFormat = ",.0f",
nodePadding = 50
) Created on 2023-08-04 with reprex v2.0.2 |
The Examples page should have examples for
The text was updated successfully, but these errors were encountered: