This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
# | |
# Sample LabCAS Download script | |
# | |
# To run this, you'll need Python 3 with the `requests` package. The easiest | |
# way to do this is with a "virtual environment" by running: | |
# | |
# $ python3 -m venv venv | |
# $ cd venv | |
# $ bin/pip install --quiet --upgrade pip requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import networkx as nx | |
import plotly.graph_objects as go | |
def plotly_DAG(nx_dag, node_description_dict): | |
""" | |
nx_dag: a networkX directed acyclic graph | |
node_description_dict: a nested dictionary that contains node attributes to show on hover | |
eg. { | |
'node_A':{'property_1':'value_A_1', 'property_2':'value_A_2'}, | |
'node_B':{'property_1':'value_B_1', 'property_2':'value_B_2'} |