Skip to content

Commit 56d3234

Browse files
committed
Update to documentation.
1 parent f7e4e7b commit 56d3234

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Tools/graphMLVis/visualize_graphML.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
window = Tk()
1515

1616
# variables acquired through dialog box
17-
class Paths:
17+
class VSet:
1818
def __init__(self, graphml_path, node_type):
1919
self.graphml_path, self.node_type = graphml_path, node_type
2020

@@ -24,7 +24,7 @@ def changegraphml(self, path):
2424
def changenodetype(self):
2525
self.node_type = radio_var.get()
2626

27-
dVars = Paths(os.path.normpath("Tools\gis2graph\graph_files\King_county_NG911.graphml"), "EMS")
27+
dVars = VSet(os.path.normpath("Tools\gis2graph\graph_files\King_county_NG911.graphml"), "EMS")
2828

2929
# submit button logic
3030
def submit():
@@ -148,7 +148,7 @@ def buttonSelect():
148148
grid = gpd.GeoDataFrame({'geometry': squares}, crs=kc_psap.crs)
149149
kc_psap.plot()
150150

151-
#this code iterates through graph ML and finds nodes + adds thenm to graph
151+
# This code iterates through graph ML and finds nodes + adds them to graph
152152
for node in root.findall('.//{http://graphml.graphdrawing.org/xmlns}node'):
153153
type_element = node.find(f'.//{{{nsmap["xmlns"]}}}data[@key="{type_attribute_key}"]')
154154
if type_element is not None and type_element.text == 'PSAP':
@@ -168,7 +168,7 @@ def buttonSelect():
168168
node_positions[node_id] = (node_x, node_y)
169169
G.nodes[node_id]['pos'] = (node_x, node_y)
170170
G.nodes[node_id]['color'] = 'cyan'
171-
#change EMS with FIRE or LAW to see fire/police nodes
171+
# dVars.node_type used to change the type of node that is visualized
172172
elif type_element is not None and type_element.text == dVars.node_type:
173173
node_id = node.get('id')
174174

@@ -186,7 +186,7 @@ def buttonSelect():
186186

187187

188188

189-
#find the segments of caller regions and find average center to mark as point
189+
# Find the segments of caller regions and find average center to mark as point
190190
for node in root.findall('.//{http://graphml.graphdrawing.org/xmlns}node'):
191191
type_element = node.find(f'.//{{{nsmap["xmlns"]}}}data[@key="{type_attribute_key}"]')
192192
if type_element is not None and type_element.text == 'CALR':

0 commit comments

Comments
 (0)