<jupyter_start><jupyter_text>Topics of Block Chain  Plot 1<jupyter_code>plot_1_nodes_df=pd.read_csv('plot_1_nodes.csv')
plot_1_nodes_df.loc[:,'group']=None
plot_1_nodes_df.loc[0,'group']=1
plot_1_nodes_df.loc[1:5,'group']=2
plot_1_nodes_df.loc[5:,'group']=3
for index,row in plot_1_nodes_df.iterrows():
    print('\t{{"id": "{0}", "group": {1}}},'.format(row.x, row.group))
plot_1_edges_df=pd.read_csv('plot_1_edges.csv')
for index,row in plot_1_edges_df.iterrows():
    print('\t{{"source": "{0}", "target": "{1}", "value": 1}},'.format(row['from'], row['to']))
num_of_people=1000
num_of_institutions=4
plot_2_nodes_df=pd.DataFrame([], index=range(num_of_people+num_of_institutions), columns=['size'])
plot_2_nodes_df.loc[:num_of_people, 'size']=1
plot_2_nodes_df.loc[num_of_people:, 'size']=2
with open('plot_2.json', 'w') as file:
    file.write('{\n')
    file.write('"nodes": [\n')
    for index,row in plot_2_nodes_df.iterrows():
        file.write('\t{{"id": "{0}", "size": {1}}},\n'.format(index, row.size))
    file.write('],\n')
    file.write('"links": [\n')
    for people_node in range(num_of_people):
        for institution_node in range(num_of_institutions):
            file.write('\t{{"source": "{0}", "target": "{1}", "value": 1}},\n'.format(people_node, institution_node))
    file.write(']\n')
    file.write('}\n')
file.close()
fig,ax=plt.subplots()

G = nx.DiGraph()
G.add_node(0)
for node in range(1,5):
    G.add_edge(node, 0)
# pos=nx.spring_layout(G) 
pos=graphviz_layout(G, prog='dot')
nx.draw_networkx_nodes(
    G, 
    nodelist=list(range(1,5)), 
    pos=pos, 
    node_shape='s',
    node_color='g',
)
nx.draw_networkx_nodes(
    G, 
    nodelist=[0], 
    pos=pos,
    node_shape='s',
    node_color='b',
)
nx.draw_networkx_edges(G, pos=pos)
ax.set_axis_off()
show(fig, 'plot_credit_score_encoding_01')
fig,ax=plt.subplots()

G = nx.DiGraph()
G.add_node(1)
G.add_node(0)
G.add_edge(1,0)
for node in range(2,6):
    G.add_edge(node, 1)
# pos=nx.spring_layout(G) 
pos=graphviz_layout(G, prog='dot')
nx.draw_networkx_nodes(
    G, 
    nodelist=list(range(2,6)), 
    pos=pos, 
    node_shape='s',
    node_color='g',
)
nx.draw_networkx_nodes(
    G, 
    nodelist=[1], 
    pos=pos,
    node_shape='s',
    node_color='r',
)
nx.draw_networkx_nodes(
    G, 
    nodelist=[0], 
    pos=pos,
    node_shape='s',
    node_color='b',
)
nx.draw_networkx_edges(G, pos=pos)
ax.set_axis_off()
show(fig, 'plot_credit_score_encoding_02')
fig,ax=plt.subplots()

G = nx.DiGraph()
G.add_node(1)
G.add_node(0)
G.add_edge(1,0)
for node in range(2,7):
    G.add_edge(node, 1)
# pos=nx.spring_layout(G) 
pos=graphviz_layout(G, prog='dot')
nx.draw_networkx_nodes(
    G, 
    nodelist=list(range(3,6)), 
    pos=pos, 
    node_shape='s',
    node_color='g',
)
nx.draw_networkx_nodes(
    G, 
    nodelist=[2], 
    pos=pos, 
    node_shape='s',
    node_color='grey',
)
nx.draw_networkx_nodes(
    G, 
    nodelist=[6], 
    pos=pos, 
    node_shape='s',
    node_color='c',
)
nx.draw_networkx_nodes(
    G, 
    nodelist=[1], 
    pos=pos,
    node_shape='s',
    node_color='r',
)
nx.draw_networkx_nodes(
    G, 
    nodelist=[0], 
    pos=pos,
    node_shape='s',
    node_color='b',
)
nx.draw_networkx_edges(G, pos=pos)
ax.set_axis_off()
show(fig, 'plot_credit_score_encoding_03')
fig,ax=plt.subplots(figsize=(20,10))

G = nx.DiGraph()
for node in range(0,4):
    G.add_edge(node+1, node)
# pos=nx.random_layout(G) 
# neato, dot, twopi, circo, fdp, nop, wc, acyclic, gvpr, gvcolor, ccomps, sccmap, tred, sfdp.
pos=graphviz_layout(G, prog='circo')
nx.draw_networkx_nodes(
    G, 
    nodelist=list(range(0,5)), 
    pos=pos, 
    node_shape='o',
    node_color='g',
)

nx.draw_networkx_edges(G, pos=pos)
ax.set_axis_off()
show(fig, 'plot_credit_score_encoding_04')
fig,ax=plt.subplots(figsize=(20,10))

G = nx.DiGraph()
for node in range(0,10):
    G.add_edge(node, node+1)
# pos=nx.random_layout(G) 
# neato, dot, twopi, circo, fdp, nop, wc, acyclic, gvpr, gvcolor, ccomps, sccmap, tred, sfdp.
pos=graphviz_layout(G, prog='circo')
nx.draw_networkx_nodes(
    G, 
    nodelist=list(range(0,11)), 
    pos=pos, 
    node_shape='o',
    node_color='g',
)

nx.draw_networkx_edges(G, pos=pos)
ax.set_axis_off()
show(fig, 'plot_credit_score_encoding_05')
fig,ax=plt.subplots(figsize=(20,10))

G = nx.DiGraph()
for node in range(0,10):
    G.add_edge(node, node+1)
# G.add_edge(5,4)
# G.add_edge(12,5)
pos=nx.circular_layout(G) 
# neato, dot, twopi, circo, fdp, nop, wc, acyclic, gvpr, gvcolor, ccomps, sccmap, tred, sfdp.
# pos=graphviz_layout(G, prog='neato')

G.add_edge(4,6)

nx.draw_networkx_nodes(
    G, 
    nodelist=list(range(0,11)), 
    pos=pos, 
    node_shape='o',
    node_color='g',
)

nx.draw_networkx_edges(G, pos=pos)
ax.set_axis_off()
show(fig, 'plot_credit_score_encoding_06')
pos<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18760330578512396, 'fraction_numerical': 0.025, 'mean_word_length': 4.695294117647059, 'pattern_counts': {'":': 12, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '135083', 'license': 'MIT', 'n_tokens_mistral': 2234, 'n_tokens_neox': 2137, 'n_words': 311, 'path': 'data_for_js.ipynb', 'repo_name': 'darpanbiswas/chain', 'size': '4840'}