from IPython import display
display.Image("Blueprint.jpg")
from IPython import display
display.Image("Graph.jpg")
from IPython import display
display.Image("Blueprint+Graph.jpg")
import networkx as nx
import pygraphviz as pgv
from nxpd import draw, nxpdParams
nxpdParams['show'] = 'ipynb'
G = nx.Graph()
G.add_edges_from([
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. DEWI SARTIKA (FIK)', {'weight':33, 'label': 33}),
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. YOS SUDARSO (FH)', {'weight':15, 'label': 15}),
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. SOETOMO (PERPUSTAKAAN)', {'weight':56, 'label': 56}),
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':65, 'label': 65}),
('GD. DEWI SARTIKA (FIK)', 'GD. SOETOMO (PERPUSTAKAAN)', {'weight':25, 'label': 25}),
('GD. SOETOMO (PERPUSTAKAAN)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':12, 'label': 12}),
('GD. SOETOMO (PERPUSTAKAAN)', 'GD. RA KARTIKA', {'weight':40, 'label': 40}),
('GD. YOS SUDARSO (FH)', 'GD. CIPTO MANGUNKUSUMO (FK)', {'weight':86, 'label': 86}),
('GD. YOS SUDARSO (FH)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':130, 'label': 130}),
('GD. YOS SUDARSO (FH)', 'GD. DR. ABDUL. RAHMAN', {'weight':88, 'label': 88}),
('GD. CIPTO MANGUNKUSUMO (FK)', 'GD. DR. ABDUL. RAHMAN', {'weight':140, 'label': 140}),
('GD. DR. ABDUL. RAHMAN', 'GD. DR. MOH. YAMIN (FISIP)', {'weight':102, 'label': 102}),
('GD. DR. ABDUL. RAHMAN', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':55, 'label': 55}),
('GD. DR. MOH. YAMIN (FISIP)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':130, 'label': 130}),
('GD. DR. MOH. YAMIN (FISIP)', 'GD. HUSNI TAMRIN (FEB)', {'weight':17, 'label': 17}),
('GD. HUSNI TAMRIN (FEB)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':140, 'label': 140}),
('GD. HUSNI TAMRIN (FEB)', 'GD. DR. SUPOMO (FEB)', {'weight':180, 'label': 180}),
('GD. DR. SUPOMO (FEB)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':45, 'label': 45}),
('GD. DR. SUPOMO (FEB)', 'GD. JEND. SUDIRMAN (AULA)', {'weight':110, 'label': 110}),
('GD. DR. SUPOMO (FEB)', 'GD. RA KARTIKA', {'weight':17, 'label': 17}),
#('GD. JEND. SUDIRMAN (AULA)', 'POSKO KESEHATAN', {'weight':53, 'label': 53}),
#('POSKO KESEHATAN', 'GD. RA KARTIKA', {'weight':66, 'label': 66}),
])
draw(G, layout='circo')
T = nx.minimum_spanning_tree(G)
for e in T.edges():
G[e[0]][e[1]]['color'] = 'blue'
draw(G, layout='circo')
from IPython import display
display.Image("Graph+Posko.jpg")
from IPython import display
display.Image("Blueprint+Graph+Posko.jpg")
import networkx as nx
import pygraphviz as pgv
from nxpd import draw, nxpdParams
nxpdParams['show'] = 'ipynb'
G = nx.Graph()
G.add_edges_from([
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. DEWI SARTIKA (FIK)', {'weight':33, 'label': 33}),
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. YOS SUDARSO (FH)', {'weight':15, 'label': 15}),
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. SOETOMO (PERPUSTAKAAN)', {'weight':56, 'label': 56}),
('GD. DR. KIHAJAR DEWANTORO (FIK)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':65, 'label': 65}),
('GD. DEWI SARTIKA (FIK)', 'GD. SOETOMO (PERPUSTAKAAN)', {'weight':25, 'label': 25}),
('GD. SOETOMO (PERPUSTAKAAN)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':12, 'label': 12}),
('GD. SOETOMO (PERPUSTAKAAN)', 'GD. RA KARTIKA', {'weight':40, 'label': 40}),
('GD. YOS SUDARSO (FH)', 'GD. CIPTO MANGUNKUSUMO (FK)', {'weight':86, 'label': 86}),
('GD. YOS SUDARSO (FH)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':130, 'label': 130}),
('GD. YOS SUDARSO (FH)', 'GD. DR. ABDUL. RAHMAN', {'weight':88, 'label': 88}),
('GD. CIPTO MANGUNKUSUMO (FK)', 'GD. DR. ABDUL. RAHMAN', {'weight':140, 'label': 140}),
('GD. DR. ABDUL. RAHMAN', 'GD. DR. MOH. YAMIN (FISIP)', {'weight':102, 'label': 102}),
('GD. DR. ABDUL. RAHMAN', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':55, 'label': 55}),
('GD. DR. MOH. YAMIN (FISIP)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':130, 'label': 130}),
('GD. DR. MOH. YAMIN (FISIP)', 'GD. HUSNI TAMRIN (FEB)', {'weight':17, 'label': 17}),
('GD. HUSNI TAMRIN (FEB)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':140, 'label': 140}),
('GD. HUSNI TAMRIN (FEB)', 'GD. DR. SUPOMO (FEB)', {'weight':180, 'label': 180}),
('GD. DR. SUPOMO (FEB)', 'GD. DR. WAHIDIN SUDIRO (FK)', {'weight':45, 'label': 45}),
('GD. DR. SUPOMO (FEB)', 'GD. JEND. SUDIRMAN (AULA)', {'weight':110, 'label': 110}),
('GD. DR. SUPOMO (FEB)', 'GD. RA KARTIKA', {'weight':17, 'label': 17}),
('GD. JEND. SUDIRMAN (AULA)', 'POSKO KESEHATAN', {'weight':53, 'label': 53}),
('POSKO KESEHATAN', 'GD. RA KARTIKA', {'weight':66, 'label': 66}),
])
draw(G, layout='circo')
T = nx.minimum_spanning_tree(G)
for e in T.edges():
G[e[0]][e[1]]['color'] = 'blue'
draw(G, layout='circo')