How to Visualize File Data as a Network Graph Using Network Viewer Node?

I would like to visualize the contents of a file as a network graph using the Network Viewer node. I hope to achieve a style similar to the example shown in the image.
If there are other nodes that might be better suited for this purpose, I would greatly appreciate your suggestions.
Please find the image and the file attached below.
image

Thank you!
sp_relation_KNIME_display.xlsx (153.2 KB)

Not a trivial task in general, but definitely doable.

I used Network Mining Extension a while ago to try and predict the outcome of the last world cup - wrote a blog about it and made video on it.

This may help to get you started:

3 Likes

Here’s a very simple workflow you can play with. The Knime Network nodes don’t have much native formatting capability. You can try to feed the viewer nodes CSS script to change the format. That’s way above my pay grade. Good luck. I left out the edge descriptions since they don’t add much information and make the graph pretty messy. In the Network Viewer (local) node you can insert them as shown below.
Ica50666 Forum Network.knwf (409.8 KB)



5 Likes

Did my workflow help?

1 Like

I’ve done something similar in the past where I had heirarchical data in a table, where each row had an id and there was a column for the parent id.

eg

ID Name Parent ID
01 Tom
02 Dick 01
03 Sally 04
04 Harry 01

The other thing I found worked well was:

  1. using a recursive loop, add a column that shows the path from the root nodes down to the node in each row, similar to a file path.
ID Name Parent ID Path
01 Tom 01
02 Dick 01 01/02
03 Sally 04 01/04/03
04 Harry 01 01/04
  1. work out the depth of each node (count how many times the separator occurs in the path)
ID Name Parent ID Path Depth
01 Tom 01 0
02 Dick 01 01/02 1
03 Sally 04 01/04/03 2
04 Harry 01 01/04 1
  1. Using a pivot node, pivot on the depth, using the node name as a value. This puts the root nodes in column 0, the next level in column 1 and so on.
ID 0 1 2 Parent ID Path Depth
01 Tom 01 0
02 Dick 01 01/02 1
03 Sally 04 01/04/03 2
04 Harry 01 01/04 1
  1. Sort by path and you end up with each node under its parent, in the next column over.
ID 0 1 2 Parent ID Path Depth
01 Tom 01 0
02 Dick 01 01/02 1
04 Harry 01 01/04 1
03 Sally 04 01/04/03 2

This has the advantage of being able to retain the other columns when you use the pivot, so you can keep columns for word count, authors, topics etc.

1 Like

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