import numpy as np
import pandas as pd
import clustergrammer_widget2
from clustergrammer import *
net = Network()
net.load_file('rc_two_cats.txt')
net.cluster()
net_json = net.export_viz_to_widget()
w = clustergrammer_widget2.ExampleWidget(network=net_json)
w
# # generate random matrix
# num_rows = 100
# num_cols = 450
# np.random.seed(seed=100)
# mat = np.random.rand(num_rows, num_cols)
# # make row and col labels
# rows = range(num_rows)
# cols = range(num_cols)
# rows = [str(i) for i in rows]
# cols = [str(i) for i in cols]
# # make dataframe
# df = pd.DataFrame(data=mat, columns=cols, index=rows)
# print(df.shape)
# net.load_df(df)
# net.cluster()
# net_json = net.export_viz_to_widget()
# w = clustergrammer_widget2.ExampleWidget(network=net_json)
# w
import ipywidgets
ipywidgets.__version__