Icon

02_​Graph_​Creation_​and_​Visualisation_​using_​Networkx_​package

Graph Creation and Visualisation using Networkx package

This worklow demonstrates the usage of netwokx python package for graph creation and network visualisation.

The Python Script node uses the python package networkx for distance calculation. The conda environment propagation node makes sure the python environment required for the execution of the Python Script node is made available at the user's system.

The networkx package is not included in the Bundled environment that comes with the Python Script node, which is why we create a new environment with geopy package and ship this environment using the Conda Environment Propagation node.

Configure the Conda Environment Propogation node to export theselected environmentThe Conda Environmnet Propaation node propgates the selected environment witghrequired python packages to the users system, so that the Python Script node can beexcecuted succesfully Find below the steps to configureStep 1: Drag the Conda Propagation node to KNIME Analytics PlatformStep 2: Open the dialog and select the environment under the option "CondaEnvironment"Step 3: Include the python packages required for this workflow OR simply click "Includeonly explicitly installed" optionStep 4: Specify the "output variable name" and press "Ok" Read Tables and Join them Create Graph and Visualize Configure the Python Script node for using GeoPy package for distancecalculationThe Python Script node can be provide with input table or object and it can output a table,object or an image based on the user's selection of portsStep 1: Drag the Python Script node to KNIME Analytics PlatformStep 2: Open the dialog and select the "Executble Selection" tab and provide the flow variablefor the conda environment coming frm conda environment propagation node Step 3: Write your script in the "Script" tab and press "execute script" to understand if theexecution was successful. Route InfoUse Networkx to create Graphand visualize themFlight InfoSelect Python Envto propagateView the Image Table Creator Python Script Table Creator Joiner Conda EnvironmentPropagation Image Output Widget Configure the Conda Environment Propogation node to export theselected environmentThe Conda Environmnet Propaation node propgates the selected environment witghrequired python packages to the users system, so that the Python Script node can beexcecuted succesfully Find below the steps to configureStep 1: Drag the Conda Propagation node to KNIME Analytics PlatformStep 2: Open the dialog and select the environment under the option "CondaEnvironment"Step 3: Include the python packages required for this workflow OR simply click "Includeonly explicitly installed" optionStep 4: Specify the "output variable name" and press "Ok" Read Tables and Join them Create Graph and Visualize Configure the Python Script node for using GeoPy package for distancecalculationThe Python Script node can be provide with input table or object and it can output a table,object or an image based on the user's selection of portsStep 1: Drag the Python Script node to KNIME Analytics PlatformStep 2: Open the dialog and select the "Executble Selection" tab and provide the flow variablefor the conda environment coming frm conda environment propagation node Step 3: Write your script in the "Script" tab and press "execute script" to understand if theexecution was successful. Route InfoUse Networkx to create Graphand visualize themFlight InfoSelect Python Envto propagateView the Image Table Creator Python Script Table Creator Joiner Conda EnvironmentPropagation Image Output Widget

Nodes

Extensions

Links