r - Reframe the data input for Sankey diagrams using sankeyPlot() in networkD3 package -
i trying plot sankey diagrams using sankeyplot() in networkd3 package. visualization works great on sample data such this
nodes
node 1124107186 1124132760 1124119016 20150517 /matte-low-dome-49354 /accounts/account-order-list.html /stepp and links
source target value 0 3 5 1 3 9 2 3 1 3 4 6 3 5 12 3 6 8 but difficult prepare link table csv file in format
uri date_key time_key guid_key /matte-low-dome-49354 20150517 145755 1124107186 /matte-low-dome-49355 20150517 145755 1124107186 /accounts/account-order-list.html 20150517 143857 1124132760 /accounts/account-order-list.html 20150517 143857 1124132760 /stepp 20150517 143416 1124119016 /stepp 20150517 143415 1124119016 /platinum-47184 20150517 145637 1124107186 is there reproducible way prepare source, target row numbers such dataset?
i figured out way in excel using vlookup , pivot. assigned row numbers each unique variable entry using row()
variable row 20150517 1 20150518 2 /platinum-47184 3 and did vlookup name in table hence getting source , target in form of sequence numbers. ran pivot count of each unique combination of variables, this,
source target value /matte-low-dome-49354 20150517 12 /matte-low-dome-49355 20150517 6 i able use input making sankey plot.
this not programmable way of doing serves purpose.
Comments
Post a Comment