Sankey diagram with KNIME

Dear Forum,

I am looking for a possibility to create a sankey diagram with KNIME - however, my attempts failed:

  • Looking at the old example(s) in the Forum, the R example failed completely for me, as I have no idea about R and the integration of KNIME.
  • The other option based on the legacy Generic Javascript Viewer also failed: I tried to modify the workflow to the actual version, but I get the error message that “d3.sankey is not a function”: sankey_d3_java_1_TEST.knwf (15.9 KB). I am not able to download the legacy version of the Generic Javascript Viewer … so I cannot tell if the older version would have worked for me.
  • Loading a newer version of d3 via Internet and the “require” statement is also not an option for me, as the workstation blocks all KNIME traffic. Loading the d3.js via file:// statement failed for me.

If anybody has a good hint for me, on how I could finally get my sankey diagram, I would be delighted.

Thanks & best regards

1 Like

Dear @linkm

Interesting question. I take the challenge :wink: !

Please find a solution implemented using the “Python View” node with a bit of Python code (based on MatPlotLib):

  1. The dummy data:

20210407_Pikairos_Data_Example_for_Seiken_Plot

  1. The Python code which uses MatPlotLib:

  1. The Plot Result:

  2. And the workflow:
    20210407_Pikairos_Seiken_Plot_Workflow

20210407_Pikairos_Sankei_Plot_Example.knwf (8.6 KB)

Hope this is of help for you :slight_smile:

Best regards,

Ael

8 Likes