-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenerateNetworkGraphs.fmx
414 lines (412 loc) · 87.2 KB
/
GenerateNetworkGraphs.fmx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
#! <?xml version="1.0" encoding="UTF-8" ?>
#! <TRANSFORMER
# TRANSFORMER_BEGIN GenerateNetworkGraphs,1,,e0e9a87b-598e-4657-acd1-cdf686a811e6,"Linked by Default",No,NO_PARALLELISM,,No,21812,YES,No,,No,
#
# TRANSFORMER_END
#! ARCGIS_COMPATIBILITY="ARCGIS_AUTO"
#! ATTR_TYPE_ENCODING="SDF"
#! BLOCKED_LOOPING="No"
#! CATEGORY=""
#! DESCRIPTION=""
#! DOC_EXTENTS="4093.38 97.126"
#! DOC_TOP_LEFT="-529.974 -336.003"
#! EXPLICIT_BOOKMARK_ORDER="false"
#! FME_BUILD_NUM="21812"
#! FME_DOCUMENT_GUID="e0e9a87b-598e-4657-acd1-cdf686a811e6"
#! FME_DOCUMENT_PRIORGUID="7d2b80b7-ae0a-484f-a2a7-9e7756a034df"
#! FME_LINKED_TRANSFORMER_VERSION="1"
#! FME_NAMES_ENCODING="windows-1252"
#! FME_PROCESS_COUNT="NO_PARALLELISM"
#! FME_PROCESS_GROUPS_ORDERED="No"
#! FME_PROCESS_GROUP_BY=""
#! FME_PROCESS_PRESERVE_GROUP_ATTR="No"
#! FME_SERVER_SERVICES=""
#! FMX_ATTRIBUTE_PROPOGATION_MODE="AUTO"
#! FMX_INSERT_MODE="Linked by Default"
#! HISTORY=""
#! ITERATION_COUNT_ATTR=""
#! LAST_SAVE_BUILD="FME(R) 2021.2.3.0 (20220131 - Build 21812 - WIN64)"
#! LAST_SAVE_DATE="2022-05-28T13:23:49"
#! MARKDOWN_DESCRIPTION=""
#! MARKDOWN_USAGE=""
#! MAX_LOOP_ITERATIONS=""
#! PASSWORD=""
#! PYTHON_COMPATIBILITY=""
#! REPLACED_BY=""
#! SHOW_ANNOTATIONS="true"
#! SHOW_INFO_NODES="true"
#! TITLE="GenerateNetworkGraphs"
#! USAGE=""
#! USE_MARKDOWN="NO"
#! VIEW_POSITION="-1487.51 306.253"
#! WARN_INVALID_XFORM_PARAM="Yes"
#! WORKSPACE_VERSION="1"
#! XFORM_DEPRECATED="No"
#! ZOOM_SCALE="100"
#! >
#! <DATASETS>
#! </DATASETS>
#! <DATA_TYPES>
#! </DATA_TYPES>
#! <GEOM_TYPES>
#! </GEOM_TYPES>
#! <FEATURE_TYPES>
#! </FEATURE_TYPES>
#! <FMESERVER>
#! </FMESERVER>
#! <GLOBAL_PARAMETERS>
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI ATTR pJson "" JSON Attribute"
#! DEFAULT_VALUE=""
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI OPTIONAL NAMEDGROUP pNodeOptions pDefaultNodeColor%pNodeSizeMultiplier%pLabelFontSize%pNodeColorMessage Node Options"
#! DEFAULT_VALUE=""
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI STRING_OR_ATTR pDefaultNodeColor Default Node Color"
#! DEFAULT_VALUE="purple"
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI RANGE_SLIDER_OR_ATTR pNodeSizeMultiplier RANGE:[1,2]%ON Node Size Multiplier"
#! DEFAULT_VALUE="1.2"
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI RANGE_SLIDER_OR_ATTR pLabelFontSize RANGE:[8,20]%PRECISION:0%ON%INCR,1 Node label font Size"
#! DEFAULT_VALUE="12"
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI OPTIONAL NAMEDMESSAGE pNodeColorMessage * For View and Table Node Colors to be set appropriately, the attribute values must be "VIEW" and "USER_TABLE". Otherwise, Node Color will be set to Default."
#! DEFAULT_VALUE=""
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI ATTR pPageHeading "" Page Heading"
#! DEFAULT_VALUE=""
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI OPTIONAL NAMEDGROUP pPhysics pPhysicsEnabled%pPhysicsMinVelocity%pPhysicsAvoidOverlap%pPhysicsSolver Physics Options"
#! DEFAULT_VALUE=""
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI OPTIONAL CHECKBOX_OR_ATTR pPhysicsEnabled true%false Enable Physics?"
#! DEFAULT_VALUE="true"
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI RANGE_SLIDER_OR_ATTR pPhysicsMinVelocity RANGE:[0,10]%ON%INCR,1 Physics - Minimum Velocity"
#! DEFAULT_VALUE="3"
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI RANGE_SLIDER_OR_ATTR pPhysicsAvoidOverlap RANGE:[0,1]%ON Physics - Avoid Overlap"
#! DEFAULT_VALUE="0.5"
#! IS_STAND_ALONE="true"
#! />
#! <GLOBAL_PARAMETER
#! GUI_LINE="GUI CHOICE_OR_ATTR pPhysicsSolver barnesHut%forceAtlas2Based Physics solver"
#! DEFAULT_VALUE="forceAtlas2Based"
#! IS_STAND_ALONE="true"
#! />
#! </GLOBAL_PARAMETERS>
#! <USER_PARAMETERS
#! FORM="eyJwYXJhbWV0ZXJzIjpbeyJjaG9pY2VTZXR0aW5ncyI6eyJjaG9pY2VTZXQiOiJhdHRyaWJ1dGVOYW1lcyJ9LCJuYW1lIjoicEpzb24iLCJwcm9tcHQiOiJKU09OIEF0dHJpYnV0ZSIsInJlcXVpcmVkIjp0cnVlLCJ0eXBlIjoiZHJvcGRvd24iLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7Im5hbWUiOiJwTm9kZU9wdGlvbnMiLCJwYXJhbWV0ZXJzIjpbeyJkZWZhdWx0VmFsdWUiOiJwdXJwbGUiLCJlZGl0b3IiOiJwbGFpbnRleHQiLCJuYW1lIjoicERlZmF1bHROb2RlQ29sb3IiLCJwcm9tcHQiOiJEZWZhdWx0IE5vZGUgQ29sb3IiLCJyZXF1aXJlZCI6dHJ1ZSwic2hvd0VkaXRCdXR0b24iOmZhbHNlLCJzdXBwb3J0ZWRWYWx1ZVR5cGVzIjpb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IiwidmFsdWVUeXBlIjoic3RyaW5nIn0seyJkZWZhdWx0VmFsdWUiOiIwLjUiLCJtYXhpbXVtIjoxLCJtaW5pbXVtIjowLCJuYW1lIjoicFBoeXNpY3NBdm9pZE92ZXJsYXAiLCJwcm9tcHQiOiJQaHlzaWNzIC0gQXZvaWQgT3ZlcmxhcCIsInJlcXVpcmVkIjp0cnVlLCJzaG93U2xpZGVyIjp0cnVlLCJzdXBwb3J0ZWRWYWx1ZVR5cGVzIjpbImV4cHJlc3Npb24iLCJnbG9iYWxQYXJhbWV0ZXIiXSwidHlwZSI6Im51bWJlciIsInZhbHVlVHlwZSI6InN0cmluZyJ9LHsiY2hvaWNlcyI6W3siZGlzcGxheSI6ImJhcm5lc0h1dCIsInZhbHVlIjoiYmFybmVzSHV0In0seyJkaXNwbGF5IjoiZm9yY2VBdGxhczJCYXNlZCIsInZhbHVlIjoiZm9yY2VBdGxhczJCYXNlZCJ9XSwiZGVmYXVsdFZhbHVlIjoiZm9yY2VBdGxhczJCYXNlZCIsIm5hbWUiOiJwUGh5c2ljc1NvbHZlciIsInByb21wdCI6IlBoeXNpY3Mgc29sdmVyIiwicmVxdWlyZWQiOnRydWUsInN1cHBvcnRlZFZhbHVlVHlwZXMiOlsiZXhwcmVzc2lvbiIsImdsb2JhbFBhcmFtZXRlciJdLCJ0eXBlIjoiZHJvcGRvd24iLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifV0sInByb21wdCI6IlBoeXNpY3MgT3B0aW9ucyIsInJlcXVpcmVkIjpmYWxzZSwidHlwZSI6Imdyb3VwIiwidmFsdWVUeXBlIjoic3RyaW5nIn1dfQ=="
#! >
#! <PARAMETER_INFO>
#! <INFO NAME="pDefaultNodeColor" IS_STAND_ALONE="true" />
#! <INFO NAME="pJson" IS_STAND_ALONE="true" />
#! <INFO NAME="pLabelFontSize" IS_STAND_ALONE="true" />
#! <INFO NAME="pNodeColorMessage" IS_STAND_ALONE="true" />
#! <INFO NAME="pNodeOptions" IS_STAND_ALONE="true" />
#! <INFO NAME="pNodeSizeMultiplier" IS_STAND_ALONE="true" />
#! <INFO NAME="pPageHeading" IS_STAND_ALONE="true" />
#! <INFO NAME="pPhysics" IS_STAND_ALONE="true" />
#! <INFO NAME="pPhysicsAvoidOverlap" IS_STAND_ALONE="true" />
#! <INFO NAME="pPhysicsEnabled" IS_STAND_ALONE="true" />
#! <INFO NAME="pPhysicsMinVelocity" IS_STAND_ALONE="true" />
#! <INFO NAME="pPhysicsSolver" IS_STAND_ALONE="true" />
#! </PARAMETER_INFO>
#! </USER_PARAMETERS>
#! <COMMENTS>
#! </COMMENTS>
#! <CONSTANTS>
#! </CONSTANTS>
#! <BOOKMARKS>
#! </BOOKMARKS>
#! <TRANSFORMERS>
#! <TRANSFORMER
#! IDENTIFIER="7"
#! TYPE="AttributeCreator"
#! VERSION="9"
#! POSITION="490.20772121498555 -238.87679281242271"
#! BOUNDING_RECT="490.20772121498555 -238.87679281242271 454 71"
#! ORDER="500000000000023"
#! PARMS_EDITED="true"
#! ENABLED="true"
#! LAST_PARM_EDIT="21812"
#! >
#! <OUTPUT_FEAT NAME="OUTPUT"/>
#! <FEAT_COLLAPSED COLLAPSED="0"/>
#! <XFORM_ATTR ATTR_NAME="Heading" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="JSON" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="LabelFontSize" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="NodeSizeMultiplier" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsSolver" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsEnabled" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsMinimumVelocity" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsAvoidOverlap" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="ViewNodeColor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="TableNodeColor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="DefaultNodecolor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_PARM PARM_NAME="ATTRIBUTE_GRP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="ATTRIBUTE_HANDLING" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="ATTR_TABLE" PARM_VALUE=""" Heading SET_TO <at>Value<openparen>$(pPageHeading)<closeparen> JSON SET_TO <at>Value<openparen>$(pJson)<closeparen> LabelFontSize SET_TO $(pLabelFontSize) NodeSizeMultiplier SET_TO $(pNodeSizeMultiplier) PhysicsSolver SET_TO $(pPhysicsSolver) PhysicsEnabled SET_TO $(pPhysicsEnabled) PhysicsMinimumVelocity SET_TO $(pPhysicsMinVelocity) PhysicsAvoidOverlap SET_TO $(pPhysicsAvoidOverlap) ViewNodeColor SET_TO blue TableNodeColor SET_TO red DefaultNodecolor SET_TO $(pDefaultNodeColor)"/>
#! <XFORM_PARM PARM_NAME="MULTI_FEATURE_MODE" PARM_VALUE="NO"/>
#! <XFORM_PARM PARM_NAME="NULL_ATTR_MODE_DISPLAY" PARM_VALUE="No Substitution"/>
#! <XFORM_PARM PARM_NAME="NULL_ATTR_VALUE" PARM_VALUE="<Unused>"/>
#! <XFORM_PARM PARM_NAME="NUM_PRIOR_FEATURES" PARM_VALUE="<Unused>"/>
#! <XFORM_PARM PARM_NAME="NUM_SUBSEQUENT_FEATURES" PARM_VALUE="<Unused>"/>
#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="AttributeCreator"/>
#! </TRANSFORMER>
#! <TRANSFORMER
#! IDENTIFIER="13"
#! TYPE="PythonCaller"
#! VERSION="4"
#! POSITION="1178.2612945224312 -238.87679281242271"
#! BOUNDING_RECT="1178.2612945224312 -238.87679281242271 444.09999999999997 71"
#! ORDER="500000000000015"
#! PARMS_EDITED="true"
#! ENABLED="true"
#! LAST_PARM_EDIT="21812"
#! >
#! <OUTPUT_FEAT NAME="OUTPUT"/>
#! <FEAT_COLLAPSED COLLAPSED="0"/>
#! <XFORM_ATTR ATTR_NAME="Heading" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="JSON" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="LabelFontSize" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="NodeSizeMultiplier" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsSolver" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsEnabled" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsMinimumVelocity" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsAvoidOverlap" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="ViewNodeColor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="TableNodeColor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="DefaultNodecolor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_PARM PARM_NAME="ADVANCED_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="GROUP_BY" PARM_VALUE="<Unused>"/>
#! <XFORM_PARM PARM_NAME="GROUP_BY_MODE" PARM_VALUE="<Unused>"/>
#! <XFORM_PARM PARM_NAME="GROUP_PROCESSING_GROUP" PARM_VALUE="NO"/>
#! <XFORM_PARM PARM_NAME="HIDE_ATTRIBUTES" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="LIST_ATTRS" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="NEW_ATTRIBUTES" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="PYTHONSOURCE" PARM_VALUE="import<space>fme<lf>import<space>fmeobjects<lf>import<space>os<lf>import<space>pandas<space>as<space>pd<lf>import<space>networkx<space>as<space>nx<lf>import<space>matplotlib<lf>matplotlib.use<openparen><apos>agg<apos><closeparen><lf>import<space>matplotlib.pyplot<space>as<space>plt<lf>from<space>pyvis.network<space>import<space>Network<lf>outputFiles<space>=<space><openbracket><closebracket><lf><lf><lf><lf><lf>class<space>FeatureProcessor<openparen>object<closeparen>:<lf><space><space><space><space><quote><quote><quote>Template<space>Class<space>Interface:<lf><space><space><space><space>When<space>using<space>this<space>class<comma><space>make<space>sure<space>its<space>name<space>is<space>set<space>as<space>the<space>value<space>of<space>the<space><apos>Class<lf><space><space><space><space>to<space>Process<space>Features<apos><space>transformer<space>parameter.<lf><space><space><space><space><quote><quote><quote><lf><lf><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space>def<space>__init__<openparen>self<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>Base<space>constructor<space>for<space>class<space>members.<quote><quote><quote><lf><space><space><space><space><space><space><space><space>pass<lf><lf><space><space><space><space>def<space>input<openparen>self<comma><space>feature<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>This<space>method<space>is<space>called<space>for<space>each<space>FME<space>Feature<space>entering<space>the<space><lf><space><space><space><space><space><space><space><space>PythonCaller.<space>If<space>knowledge<space>of<space>all<space>input<space>Features<space>is<space>not<space>required<space>for<space><lf><space><space><space><space><space><space><space><space>processing<comma><space>then<space>the<space>processed<space>Feature<space>can<space>be<space>emitted<space>from<space>this<space>method<space><lf><space><space><space><space><space><space><space><space>through<space>self.pyoutput<openparen><closeparen>.<space>Otherwise<comma><space>the<space>input<space>FME<space>Feature<space>should<space>be<space><lf><space><space><space><space><space><space><space><space>cached<space>to<space>a<space>list<space>class<space>member<space>and<space>processed<space>in<space>process_group<openparen><closeparen><space>when<space><lf><space><space><space><space><space><space><space><space><apos>Group<space>by<apos><space>attributes<openparen>s<closeparen><space>are<space>specified<comma><space>or<space>the<space>close<openparen><closeparen><space>method.<lf><lf><space><space><space><space><space><space><space><space>:param<space>fmeobjects.FMEFeature<space>feature:<space>FME<space>Feature<space>entering<space>the<space><lf><space><space><space><space><space><space><space><space><space><space><space><space>transformer.<lf><space><space><space><space><space><space><space><space><quote><quote><quote><lf><lf><space><space><space><space><space><space><space><space>heading<space>=<space>feature.getAttribute<openparen><apos>Heading<apos><closeparen><lf><space><space><space><space><space><space><space><space>outputPath<space>=<space>FME_MacroValues<openbracket><apos>FME_MF_DIR<apos><closebracket><lf><space><space><space><space><space><space><space><space>outputFileName<space>=<space>f<apos><opencurly>heading<closecurly>.html<apos><lf><space><space><space><space><space><space><space><space>outputFile<space>=<space>os.path.join<openparen>outputPath<comma><space>outputFileName<closeparen><lf><space><space><space><space><space><space><space><space>labelFontSize<space>=<space>str<openparen>feature.getAttribute<openparen><apos>LabelFontSize<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space>nodeSizeMultiplier<space>=<space>float<openparen>feature.getAttribute<openparen><apos>NodeSizeMultiplier<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space>defaultNodeColor<space>=<space>feature.getAttribute<openparen><apos>DefaultNodecolor<apos><closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>json<space>=<space>feature.getAttribute<openparen><apos>JSON<apos><closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>physicsSolver<space>=<space>feature.getAttribute<openparen><apos>PhysicsSolver<apos><closeparen><lf><space><space><space><space><space><space><space><space>enablePhysics<space>=<space>feature.getAttribute<openparen><apos>PhysicsEnabled<apos><closeparen><lf><space><space><space><space><space><space><space><space>physicsMinVelocity<space>=<space>str<openparen>feature.getAttribute<openparen><apos>PhysicsMinimumVelocity<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space>physicsAvoidOverlap<space>=<space>str<openparen>feature.getAttribute<openparen><apos>PhysicsAvoidOverlap<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Create<space>new<space>Network<space>with<space>100%<space>height<space>and<space>width<lf><space><space><space><space><space><space><space><space>net<space>=<space>Network<openparen>height=<apos>94%<apos><comma><space>width=<apos>100%<apos><comma><space>heading=heading<closeparen><lf><lf><space><space><space><space><space><space><space><space>#load<space>JSON<space>into<space>pandas<space>dataframe<lf><space><space><space><space><space><space><space><space>df<space>=<space>pd.read_json<openparen>json<comma><space>orient=<apos>records<apos><closeparen><lf><space><space><space><space><space><space><space><space>print<openparen>df.head<closeparen><lf><lf><space><space><space><space><space><space><space><space>#Create<space>new<space>networkx<space>graph<space>from<space>pandas<space>edgelist<lf><space><space><space><space><space><space><space><space>G<space>=<space>nx.from_pandas_edgelist<openparen>df<comma><space>source=<quote>source<quote><comma><space>target=<quote>destination<quote><closeparen><lf><lf><space><space><space><space><space><space><space><space>#Create<space>pyvis<space>network<space>from<space>networkx<space>graph<lf><space><space><space><space><space><space><space><space>net.from_nx<openparen>G<closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Adjust<space>Node<space>Size<space><amp><space>Color<lf><space><space><space><space><space><space><space><space>nodeSize<space>=<space><opencurly><closecurly><lf><space><space><space><space><space><space><space><space>nodeColor<space>=<space><opencurly><closecurly><lf><lf><space><space><space><space><space><space><space><space>#Build<space>size<space>and<space>Color<space>Dicts<lf><space><space><space><space><space><space><space><space>for<space>index<comma><space>row<space>in<space>df.iterrows<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space>source<space>=<space>row<openbracket><apos>source<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>destination<space>=<space>row<openbracket><apos>destination<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>sourceColor<space>=<space>row<openbracket><apos>sourceColor<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>destinationColor<space>=<space>row<openbracket><apos>destinationColor<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space><space><space><space><space><space><space><space><space>#Size<space>Dict<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>source<space>not<space>in<space>nodeSize.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>source<closebracket><space>=<space>10<lf><space><space><space><space><space><space><space><space><space><space><space><space>else:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>source<closebracket><space>*=<space>nodeSizeMultiplier<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>destination<space>not<space>in<space>nodeSize.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>destination<closebracket><space>=<space>10<lf><space><space><space><space><space><space><space><space><space><space><space><space>else:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>destination<closebracket><space>*=<space>nodeSizeMultiplier<lf><lf><space><space><space><space><space><space><space><space><space><space><space><space>#Color<space>Dict<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>destination<space>not<space>in<space>nodeColor.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeColor<openbracket>destination<closebracket><space>=<space>destinationColor<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>source<space>not<space>in<space>nodeColor.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeColor<openbracket>source<closebracket><space>=<space>sourceColor<lf><lf><space><space><space><space><space><space><space><space>#Set<space>node<space>Size<lf><space><space><space><space><space><space><space><space>for<space>n<space>in<space>net.nodes:<lf><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>size<apos><closebracket><space>=<space>nodeSize<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><lf><lf><space><space><space><space><space><space><space><space>#Set<space>node<space>Color<lf><space><space><space><space><space><space><space><space>for<space>n<space>in<space>net.nodes:<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>nodeColor<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><space>!=<space><quote><quote><space>and<space>nodeColor<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><space>is<space>not<space>None:<space><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>color<apos><closebracket><space>=<space>nodeColor<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>else:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>color<apos><closebracket><space>=<space>defaultNodeColor<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Set<space>node<space>title<lf><space><space><space><space><space><space><space><space>neighbor_map<space>=<space>net.get_adj_list<openparen><closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>for<space>n<space>in<space>net.nodes:<lf><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>title<apos><closebracket><space>=<space><apos><space>Neighbors:<apos><space>+<space><apos><space><space>|<space><space><apos>.join<openparen>neighbor_map<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Set<space>edge<space>color<lf><space><space><space><space><space><space><space><space>for<space>e<space>in<space>net.edges:<lf><space><space><space><space><space><space><space><space><space><space><space><space>e<openbracket><apos>color<apos><closebracket><space>=<space><apos>black<apos><lf><lf><space><space><space><space><space><space><space><space>#Set<space>pyvis<space>network<space>options<lf><space><space><space><space><space><space><space><space>net.set_options<openparen><quote><quote><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space>const<space>options<space>=<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>nodes<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>color<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>highlight<quote><space>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>border<quote><space>:<space><quote>rgba<openparen>129<comma>11<comma>233<comma>1<closeparen><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>font<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>size<quote>:<quote><quote><quote><space>+<space>labelFontSize<space>+<space><quote><quote><quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>face<quote>:<space><quote>verdana<quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>strokeWidth<quote>:<space>2<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>shadow<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>enabled<quote>:<space>true<comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>size<quote>:<space>9<comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>x<quote>:<space>6<comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>y<quote>:<space>7<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>shapeProperties<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>borderRadius<quote>:<space>3<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>size<quote>:<space>null<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>physics<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>enabled<quote><space>:<quote><quote><quote><space>+<space>enablePhysics<space>+<space><quote><quote><quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote><quote><quote><space>+<space><quote><backslash><quote><quote><space>+<space>physicsSolver<space>+<space><quote><backslash><quote><quote><space>+<space><quote><quote><quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>avoidOverlap<quote>:<space><quote><quote><quote><space>+<space>physicsAvoidOverlap<space>+<space><quote><quote><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>minVelocity<quote>:<space><quote><quote><quote><space>+<space>physicsMinVelocity<space>+<space><quote><quote><quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>solver<quote>:<space><quote><quote><quote><space>+<space><quote><backslash><quote><quote><space>+<space>physicsSolver<space>+<space><quote><backslash><quote><quote><space>+<space><quote><quote><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><quote><quote><quote><closeparen><lf><lf><space><space><space><space><space><space><space><space>#Show<space>network<lf><space><space><space><space><space><space><space><space>net.show<openparen>outputFile<closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>outputFiles.append<openparen>outputFile<closeparen><lf><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space>def<space>close<openparen>self<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>This<space>method<space>is<space>called<space>once<space>all<space>the<space>FME<space>Features<space>have<space>been<space>processed<lf><space><space><space><space><space><space><space><space>from<space>input<openparen><closeparen>.<lf><space><space><space><space><space><space><space><space><quote><quote><quote><lf><space><space><space><space><space><space><space><space>print<openparen>outputFiles<closeparen><lf><space><space><space><space><space><space><space><space>for<space>f<space>in<space>outputFiles:<lf><space><space><space><space><space><space><space><space><space><space><space><space>newFeature<space>=<space>fmeobjects.FMEFeature<openparen><closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space>newFeature.setAttribute<openparen><apos>file_path<apos><comma><space>f<closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space>self.pyoutput<openparen>newFeature<closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space>def<space>process_group<openparen>self<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>When<space><apos>Group<space>By<apos><space>attribute<openparen>s<closeparen><space>are<space>specified<comma><space>this<space>method<space>is<space>called<space><lf><space><space><space><space><space><space><space><space>once<space>all<space>the<space>FME<space>Features<space>in<space>a<space>current<space>group<space>have<space>been<space>sent<space>to<space>input<openparen><closeparen>.<lf><lf><space><space><space><space><space><space><space><space>FME<space>Features<space>sent<space>to<space>input<openparen><closeparen><space>should<space>generally<space>be<space>cached<space>for<space>group-by<space><lf><space><space><space><space><space><space><space><space>processing<space>in<space>this<space>method<space>when<space>knowledge<space>of<space>all<space>Features<space>is<space>required.<space><lf><space><space><space><space><space><space><space><space>The<space>resulting<space>Feature<openparen>s<closeparen><space>from<space>the<space>group-by<space>processing<space>should<space>be<space>emitted<space><lf><space><space><space><space><space><space><space><space>through<space>self.pyoutput<openparen><closeparen>.<lf><lf><space><space><space><space><space><space><space><space>FME<space>will<space>continue<space>calling<space>input<openparen><closeparen><space>a<space>number<space>of<space>times<space>followed<lf><space><space><space><space><space><space><space><space>by<space>process_group<openparen><closeparen><space>for<space>each<space><apos>Group<space>By<apos><space>attribute<comma><space>so<space>this<space><lf><space><space><space><space><space><space><space><space>implementation<space>should<space>reset<space>any<space>class<space>members<space>for<space>the<space>next<space>group.<lf><space><space><space><space><space><space><space><space><quote><quote><quote><lf><space><space><space><space><space><space><space><space>pass<lf>"/>
#! <XFORM_PARM PARM_NAME="PYTHONSYMBOL" PARM_VALUE="FeatureProcessor"/>
#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="BuildNetworkGraphs"/>
#! </TRANSFORMER>
#! <TRANSFORMER
#! IDENTIFIER="10"
#! TYPE="AttributeKeeper"
#! VERSION="3"
#! POSITION="2462.5246252462525 -238.87679281242271"
#! BOUNDING_RECT="2462.5246252462525 -238.87679281242271 454 71"
#! ORDER="500000000000026"
#! PARMS_EDITED="true"
#! ENABLED="true"
#! LAST_PARM_EDIT="21812"
#! >
#! <OUTPUT_FEAT NAME="OUTPUT"/>
#! <FEAT_COLLAPSED COLLAPSED="0"/>
#! <XFORM_ATTR ATTR_NAME="file_path" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_PARM PARM_NAME="CREATE_BULK_MODE_FEATURES" PARM_VALUE="NO"/>
#! <XFORM_PARM PARM_NAME="KEEP_ATTRS" PARM_VALUE="file_path"/>
#! <XFORM_PARM PARM_NAME="KEEP_LIST" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="OUTPUT_ON_ATTRIBUTE_CHANGE" PARM_VALUE="<Unused>"/>
#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="AttributeKeeper"/>
#! </TRANSFORMER>
#! <TRANSFORMER
#! IDENTIFIER="11"
#! TYPE="AttributeExposer"
#! VERSION="1"
#! POSITION="1879.5128751287511 -238.87679281242271"
#! BOUNDING_RECT="1879.5128751287511 -238.87679281242271 454 71"
#! ORDER="500000000000027"
#! PARMS_EDITED="true"
#! ENABLED="true"
#! LAST_PARM_EDIT="21812"
#! >
#! <OUTPUT_FEAT NAME="OUTPUT"/>
#! <FEAT_COLLAPSED COLLAPSED="0"/>
#! <XFORM_ATTR ATTR_NAME="Heading" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="JSON" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="LabelFontSize" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="NodeSizeMultiplier" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsSolver" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsEnabled" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsMinimumVelocity" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="PhysicsAvoidOverlap" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="ViewNodeColor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="TableNodeColor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="DefaultNodecolor" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_ATTR ATTR_NAME="file_path" IS_USER_CREATED="false" FEAT_INDEX="0" />
#! <XFORM_PARM PARM_NAME="ATTR_LIST" PARM_VALUE="file_path"/>
#! <XFORM_PARM PARM_NAME="ATTR_LIST_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/>
#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="AttributeExposer"/>
#! </TRANSFORMER>
#! </TRANSFORMERS>
#! <SUBDOCUMENT_IOS>
#! <SUBDOCUMENT_IO
#! IDENTIFIER="4"
#! NAME="BuildNetworkGraphs_Input"
#! POSITION="-529.97390146346743 -265.00275002750027"
#! BOUNDING_RECT="-529.97390146346743 -265.00275002750027 654.10000000000002 71"
#! COLLAPSED="true"
#! PUBLISHED="true"
#! IS_SOURCE="true"
#! ATTR_MODE="0"
#! >
#! </SUBDOCUMENT_IO>
#! <SUBDOCUMENT_IO
#! IDENTIFIER="6"
#! NAME="HTMLFiles"
#! POSITION="3109.4060940609393 -238.87679281242271"
#! BOUNDING_RECT="3109.4060940609393 -238.87679281242271 454 71"
#! COLLAPSED="true"
#! IS_SOURCE="false"
#! ATTR_MODE="0"
#! >
#! </SUBDOCUMENT_IO>
#! </SUBDOCUMENT_IOS>
#! <FEAT_LINKS>
#! <FEAT_LINK
#! IDENTIFIER="9"
#! SOURCE_NODE="4"
#! TARGET_NODE="7"
#! SOURCE_PORT_DESC="0"
#! TARGET_PORT_DESC="fi 0 "
#! ENABLED="true"
#! EXECUTION_IDX="0"
#! HIDDEN="false"
#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1"
#! PEN_WIDTH="4"
#! PEN_STYLE="1"
#! LINK_STYLE_NAME="<Default>"
#! EXTRA_POINTS=""
#! />
#! <FEAT_LINK
#! IDENTIFIER="12"
#! SOURCE_NODE="7"
#! TARGET_NODE="13"
#! SOURCE_PORT_DESC="fo 0 OUTPUT"
#! TARGET_PORT_DESC="fi 0 "
#! ENABLED="true"
#! EXECUTION_IDX="0"
#! HIDDEN="false"
#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1"
#! PEN_WIDTH="4"
#! PEN_STYLE="1"
#! LINK_STYLE_NAME="<Default>"
#! EXTRA_POINTS=""
#! />
#! <FEAT_LINK
#! IDENTIFIER="17"
#! SOURCE_NODE="10"
#! TARGET_NODE="6"
#! SOURCE_PORT_DESC="fo 0 OUTPUT"
#! TARGET_PORT_DESC="0"
#! ENABLED="true"
#! EXECUTION_IDX="0"
#! HIDDEN="false"
#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1"
#! PEN_WIDTH="4"
#! PEN_STYLE="1"
#! LINK_STYLE_NAME="<Default>"
#! EXTRA_POINTS=""
#! />
#! <FEAT_LINK
#! IDENTIFIER="14"
#! SOURCE_NODE="11"
#! TARGET_NODE="10"
#! SOURCE_PORT_DESC="fo 0 OUTPUT"
#! TARGET_PORT_DESC="fi 0 "
#! ENABLED="true"
#! EXECUTION_IDX="0"
#! HIDDEN="false"
#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1"
#! PEN_WIDTH="4"
#! PEN_STYLE="1"
#! LINK_STYLE_NAME="<Default>"
#! EXTRA_POINTS=""
#! />
#! <FEAT_LINK
#! IDENTIFIER="15"
#! SOURCE_NODE="13"
#! TARGET_NODE="11"
#! SOURCE_PORT_DESC="fo 0 OUTPUT"
#! TARGET_PORT_DESC="fi 0 "
#! ENABLED="true"
#! EXECUTION_IDX="0"
#! HIDDEN="false"
#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1"
#! PEN_WIDTH="4"
#! PEN_STYLE="1"
#! LINK_STYLE_NAME="<Default>"
#! EXTRA_POINTS=""
#! />
#! </FEAT_LINKS>
#! <BREAKPOINTS>
#! </BREAKPOINTS>
#! <ATTR_LINKS>
#! </ATTR_LINKS>
#! <SUBDOCUMENTS>
#! </SUBDOCUMENTS>
#! <LOOKUP_TABLES>
#! </LOOKUP_TABLES>
#! </TRANSFORMER>
FME_PYTHON_VERSION
# ============================================================================
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pJson
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pNodeOptions
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pDefaultNodeColor purple
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pNodeSizeMultiplier 1.2
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pLabelFontSize 12
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pNodeColorMessage
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pPageHeading
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysics
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsEnabled true
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsMinVelocity 3
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsAvoidOverlap 0.5
DEFAULT_MACRO $(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsSolver forceAtlas2Based
# ============================================================================
# ============================================================================
USER_PARAMETERS eyJwYXJhbWV0ZXJzIjpbeyJjaG9pY2VTZXR0aW5ncyI6eyJjaG9pY2VTZXQiOiJhdHRyaWJ1dGVOYW1lcyJ9LCJuYW1lIjoicEpzb24iLCJwcm9tcHQiOiJKU09OIEF0dHJpYnV0ZSIsInJlcXVpcmVkIjp0cnVlLCJ0eXBlIjoiZHJvcGRvd24iLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7Im5h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0aW9ucyIsInJlcXVpcmVkIjpmYWxzZSwidHlwZSI6Imdyb3VwIiwidmFsdWVUeXBlIjoic3RyaW5nIn1dfQ==
# ============================================================================
#! START_HEADER
#! END_HEADER
DEFAULT_MACRO WB_CURRENT_CONTEXT
DEFAULT_MACRO GenerateNetworkGraphs_WORKSPACE_NAME ""
INCLUDE [puts {MACRO WB_OLD_CONTEXT_$(GenerateNetworkGraphs_WORKSPACE_NAME) $(WB_CURRENT_CONTEXT)}; puts {MACRO WB_CURRENT_CONTEXT $(GenerateNetworkGraphs_WORKSPACE_NAME)}]
FACTORY_DEF * TeeFactory FACTORY_NAME "$(GenerateNetworkGraphs_WORKSPACE_NAME)_BuildNetworkGraphs_Input1653769429 Input Splitter" INPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_BuildNetworkGraphs_Input" OUTPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_BuildNetworkGraphs_Input"
# -------------------------------------------------------------------------
FACTORY_DEF {*} AttrSetFactory FACTORY_NAME { $(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeCreator } COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_BuildNetworkGraphs_Input" MULTI_FEATURE_MODE { NO } NULL_ATTR_MODE { NO_OP } ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "Heading" "SET_TO" "<at>Value<openparen>$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pPageHeading$encode)<closeparen>" } ATTR_ACTION { "" "JSON" "SET_TO" "<at>Value<openparen>$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pJson$encode)<closeparen>" } ATTR_ACTION { "" "LabelFontSize" "SET_TO" "$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pLabelFontSize$encode)" } ATTR_ACTION { "" "NodeSizeMultiplier" "SET_TO" "$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pNodeSizeMultiplier$encode)" } ATTR_ACTION { "" "PhysicsSolver" "SET_TO" "$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsSolver$encode)" } ATTR_ACTION { "" "PhysicsEnabled" "SET_TO" "$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsEnabled$encode)" } ATTR_ACTION { "" "PhysicsMinimumVelocity" "SET_TO" "$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsMinVelocity$encode)" } ATTR_ACTION { "" "PhysicsAvoidOverlap" "SET_TO" "$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pPhysicsAvoidOverlap$encode)" } ATTR_ACTION { "" "ViewNodeColor" "SET_TO" "blue" } ATTR_ACTION { "" "TableNodeColor" "SET_TO" "red" } ATTR_ACTION { "" "DefaultNodecolor" "SET_TO" "$($(GenerateNetworkGraphs_WORKSPACE_NAME)_pDefaultNodeColor$encode)" } OUTPUT { OUTPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeCreator_OUTPUT" }
# -------------------------------------------------------------------------
FME_PYTHON_PATH "$(FME_MF_DIR)"
FACTORY_DEF {*} PythonFactory FACTORY_NAME { $(GenerateNetworkGraphs_WORKSPACE_NAME)_BuildNetworkGraphs } FLUSH_WHEN_GROUPS_CHANGE { <Unused> } INPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeCreator_OUTPUT" SYMBOL_NAME { FeatureProcessor } PYTHON_NAMESPACE FMEOBJECTS SOURCE_CODE { import<space>fme<lf>import<space>fmeobjects<lf>import<space>os<lf>import<space>pandas<space>as<space>pd<lf>import<space>networkx<space>as<space>nx<lf>import<space>matplotlib<lf>matplotlib.use<openparen><apos>agg<apos><closeparen><lf>import<space>matplotlib.pyplot<space>as<space>plt<lf>from<space>pyvis.network<space>import<space>Network<lf>outputFiles<space>=<space><openbracket><closebracket><lf><lf><lf><lf><lf>class<space>FeatureProcessor<openparen>object<closeparen>:<lf><space><space><space><space><quote><quote><quote>Template<space>Class<space>Interface:<lf><space><space><space><space>When<space>using<space>this<space>class<comma><space>make<space>sure<space>its<space>name<space>is<space>set<space>as<space>the<space>value<space>of<space>the<space><apos>Class<lf><space><space><space><space>to<space>Process<space>Features<apos><space>transformer<space>parameter.<lf><space><space><space><space><quote><quote><quote><lf><lf><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space>def<space>__init__<openparen>self<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>Base<space>constructor<space>for<space>class<space>members.<quote><quote><quote><lf><space><space><space><space><space><space><space><space>pass<lf><lf><space><space><space><space>def<space>input<openparen>self<comma><space>feature<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>This<space>method<space>is<space>called<space>for<space>each<space>FME<space>Feature<space>entering<space>the<space><lf><space><space><space><space><space><space><space><space>PythonCaller.<space>If<space>knowledge<space>of<space>all<space>input<space>Features<space>is<space>not<space>required<space>for<space><lf><space><space><space><space><space><space><space><space>processing<comma><space>then<space>the<space>processed<space>Feature<space>can<space>be<space>emitted<space>from<space>this<space>method<space><lf><space><space><space><space><space><space><space><space>through<space>self.pyoutput<openparen><closeparen>.<space>Otherwise<comma><space>the<space>input<space>FME<space>Feature<space>should<space>be<space><lf><space><space><space><space><space><space><space><space>cached<space>to<space>a<space>list<space>class<space>member<space>and<space>processed<space>in<space>process_group<openparen><closeparen><space>when<space><lf><space><space><space><space><space><space><space><space><apos>Group<space>by<apos><space>attributes<openparen>s<closeparen><space>are<space>specified<comma><space>or<space>the<space>close<openparen><closeparen><space>method.<lf><lf><space><space><space><space><space><space><space><space>:param<space>fmeobjects.FMEFeature<space>feature:<space>FME<space>Feature<space>entering<space>the<space><lf><space><space><space><space><space><space><space><space><space><space><space><space>transformer.<lf><space><space><space><space><space><space><space><space><quote><quote><quote><lf><lf><space><space><space><space><space><space><space><space>heading<space>=<space>feature.getAttribute<openparen><apos>Heading<apos><closeparen><lf><space><space><space><space><space><space><space><space>outputPath<space>=<space>FME_MacroValues<openbracket><apos>FME_MF_DIR<apos><closebracket><lf><space><space><space><space><space><space><space><space>outputFileName<space>=<space>f<apos><opencurly>heading<closecurly>.html<apos><lf><space><space><space><space><space><space><space><space>outputFile<space>=<space>os.path.join<openparen>outputPath<comma><space>outputFileName<closeparen><lf><space><space><space><space><space><space><space><space>labelFontSize<space>=<space>str<openparen>feature.getAttribute<openparen><apos>LabelFontSize<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space>nodeSizeMultiplier<space>=<space>float<openparen>feature.getAttribute<openparen><apos>NodeSizeMultiplier<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space>defaultNodeColor<space>=<space>feature.getAttribute<openparen><apos>DefaultNodecolor<apos><closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>json<space>=<space>feature.getAttribute<openparen><apos>JSON<apos><closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>physicsSolver<space>=<space>feature.getAttribute<openparen><apos>PhysicsSolver<apos><closeparen><lf><space><space><space><space><space><space><space><space>enablePhysics<space>=<space>feature.getAttribute<openparen><apos>PhysicsEnabled<apos><closeparen><lf><space><space><space><space><space><space><space><space>physicsMinVelocity<space>=<space>str<openparen>feature.getAttribute<openparen><apos>PhysicsMinimumVelocity<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space>physicsAvoidOverlap<space>=<space>str<openparen>feature.getAttribute<openparen><apos>PhysicsAvoidOverlap<apos><closeparen><closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Create<space>new<space>Network<space>with<space>100%<space>height<space>and<space>width<lf><space><space><space><space><space><space><space><space>net<space>=<space>Network<openparen>height=<apos>94%<apos><comma><space>width=<apos>100%<apos><comma><space>heading=heading<closeparen><lf><lf><space><space><space><space><space><space><space><space>#load<space>JSON<space>into<space>pandas<space>dataframe<lf><space><space><space><space><space><space><space><space>df<space>=<space>pd.read_json<openparen>json<comma><space>orient=<apos>records<apos><closeparen><lf><space><space><space><space><space><space><space><space>print<openparen>df.head<closeparen><lf><lf><space><space><space><space><space><space><space><space>#Create<space>new<space>networkx<space>graph<space>from<space>pandas<space>edgelist<lf><space><space><space><space><space><space><space><space>G<space>=<space>nx.from_pandas_edgelist<openparen>df<comma><space>source=<quote>source<quote><comma><space>target=<quote>destination<quote><closeparen><lf><lf><space><space><space><space><space><space><space><space>#Create<space>pyvis<space>network<space>from<space>networkx<space>graph<lf><space><space><space><space><space><space><space><space>net.from_nx<openparen>G<closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Adjust<space>Node<space>Size<space><amp><space>Color<lf><space><space><space><space><space><space><space><space>nodeSize<space>=<space><opencurly><closecurly><lf><space><space><space><space><space><space><space><space>nodeColor<space>=<space><opencurly><closecurly><lf><lf><space><space><space><space><space><space><space><space>#Build<space>size<space>and<space>Color<space>Dicts<lf><space><space><space><space><space><space><space><space>for<space>index<comma><space>row<space>in<space>df.iterrows<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space>source<space>=<space>row<openbracket><apos>source<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>destination<space>=<space>row<openbracket><apos>destination<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>sourceColor<space>=<space>row<openbracket><apos>sourceColor<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>destinationColor<space>=<space>row<openbracket><apos>destinationColor<apos><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space><space><space><space><space><space><space><space><space>#Size<space>Dict<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>source<space>not<space>in<space>nodeSize.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>source<closebracket><space>=<space>10<lf><space><space><space><space><space><space><space><space><space><space><space><space>else:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>source<closebracket><space>*=<space>nodeSizeMultiplier<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>destination<space>not<space>in<space>nodeSize.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>destination<closebracket><space>=<space>10<lf><space><space><space><space><space><space><space><space><space><space><space><space>else:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeSize<openbracket>destination<closebracket><space>*=<space>nodeSizeMultiplier<lf><lf><space><space><space><space><space><space><space><space><space><space><space><space>#Color<space>Dict<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>destination<space>not<space>in<space>nodeColor.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeColor<openbracket>destination<closebracket><space>=<space>destinationColor<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>source<space>not<space>in<space>nodeColor.keys<openparen><closeparen>:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>nodeColor<openbracket>source<closebracket><space>=<space>sourceColor<lf><lf><space><space><space><space><space><space><space><space>#Set<space>node<space>Size<lf><space><space><space><space><space><space><space><space>for<space>n<space>in<space>net.nodes:<lf><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>size<apos><closebracket><space>=<space>nodeSize<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><lf><lf><space><space><space><space><space><space><space><space>#Set<space>node<space>Color<lf><space><space><space><space><space><space><space><space>for<space>n<space>in<space>net.nodes:<lf><space><space><space><space><space><space><space><space><space><space><space><space>if<space>nodeColor<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><space>!=<space><quote><quote><space>and<space>nodeColor<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><space>is<space>not<space>None:<space><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>color<apos><closebracket><space>=<space>nodeColor<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><lf><space><space><space><space><space><space><space><space><space><space><space><space>else:<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>color<apos><closebracket><space>=<space>defaultNodeColor<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Set<space>node<space>title<lf><space><space><space><space><space><space><space><space>neighbor_map<space>=<space>net.get_adj_list<openparen><closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>for<space>n<space>in<space>net.nodes:<lf><space><space><space><space><space><space><space><space><space><space><space><space>n<openbracket><apos>title<apos><closebracket><space>=<space><apos><space>Neighbors:<apos><space>+<space><apos><space><space>|<space><space><apos>.join<openparen>neighbor_map<openbracket>n<openbracket><apos>id<apos><closebracket><closebracket><closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>#Set<space>edge<space>color<lf><space><space><space><space><space><space><space><space>for<space>e<space>in<space>net.edges:<lf><space><space><space><space><space><space><space><space><space><space><space><space>e<openbracket><apos>color<apos><closebracket><space>=<space><apos>black<apos><lf><lf><space><space><space><space><space><space><space><space>#Set<space>pyvis<space>network<space>options<lf><space><space><space><space><space><space><space><space>net.set_options<openparen><quote><quote><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space>const<space>options<space>=<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>nodes<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>color<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>highlight<quote><space>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>border<quote><space>:<space><quote>rgba<openparen>129<comma>11<comma>233<comma>1<closeparen><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>font<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>size<quote>:<quote><quote><quote><space>+<space>labelFontSize<space>+<space><quote><quote><quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>face<quote>:<space><quote>verdana<quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>strokeWidth<quote>:<space>2<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>shadow<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>enabled<quote>:<space>true<comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>size<quote>:<space>9<comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>x<quote>:<space>6<comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>y<quote>:<space>7<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>shapeProperties<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>borderRadius<quote>:<space>3<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>size<quote>:<space>null<lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>physics<quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>enabled<quote><space>:<quote><quote><quote><space>+<space>enablePhysics<space>+<space><quote><quote><quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote><quote><quote><space>+<space><quote><backslash><quote><quote><space>+<space>physicsSolver<space>+<space><quote><backslash><quote><quote><space>+<space><quote><quote><quote>:<space><opencurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>avoidOverlap<quote>:<space><quote><quote><quote><space>+<space>physicsAvoidOverlap<space>+<space><quote><quote><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>minVelocity<quote>:<space><quote><quote><quote><space>+<space>physicsMinVelocity<space>+<space><quote><quote><quote><comma><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><space><quote>solver<quote>:<space><quote><quote><quote><space>+<space><quote><backslash><quote><quote><space>+<space>physicsSolver<space>+<space><quote><backslash><quote><quote><space>+<space><quote><quote><quote><lf><space><space><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><closecurly><lf><space><space><space><space><space><space><space><space><space><space><space><space><quote><quote><quote><closeparen><lf><lf><space><space><space><space><space><space><space><space>#Show<space>network<lf><space><space><space><space><space><space><space><space>net.show<openparen>outputFile<closeparen><lf><space><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space>outputFiles.append<openparen>outputFile<closeparen><lf><space><space><space><space><space><space><space><lf><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space>def<space>close<openparen>self<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>This<space>method<space>is<space>called<space>once<space>all<space>the<space>FME<space>Features<space>have<space>been<space>processed<lf><space><space><space><space><space><space><space><space>from<space>input<openparen><closeparen>.<lf><space><space><space><space><space><space><space><space><quote><quote><quote><lf><space><space><space><space><space><space><space><space>print<openparen>outputFiles<closeparen><lf><space><space><space><space><space><space><space><space>for<space>f<space>in<space>outputFiles:<lf><space><space><space><space><space><space><space><space><space><space><space><space>newFeature<space>=<space>fmeobjects.FMEFeature<openparen><closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space>newFeature.setAttribute<openparen><apos>file_path<apos><comma><space>f<closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space>self.pyoutput<openparen>newFeature<closeparen><lf><space><space><space><space><space><space><space><space><space><space><space><space><lf><lf><space><space><space><space>def<space>process_group<openparen>self<closeparen>:<lf><space><space><space><space><space><space><space><space><quote><quote><quote>When<space><apos>Group<space>By<apos><space>attribute<openparen>s<closeparen><space>are<space>specified<comma><space>this<space>method<space>is<space>called<space><lf><space><space><space><space><space><space><space><space>once<space>all<space>the<space>FME<space>Features<space>in<space>a<space>current<space>group<space>have<space>been<space>sent<space>to<space>input<openparen><closeparen>.<lf><lf><space><space><space><space><space><space><space><space>FME<space>Features<space>sent<space>to<space>input<openparen><closeparen><space>should<space>generally<space>be<space>cached<space>for<space>group-by<space><lf><space><space><space><space><space><space><space><space>processing<space>in<space>this<space>method<space>when<space>knowledge<space>of<space>all<space>Features<space>is<space>required.<space><lf><space><space><space><space><space><space><space><space>The<space>resulting<space>Feature<openparen>s<closeparen><space>from<space>the<space>group-by<space>processing<space>should<space>be<space>emitted<space><lf><space><space><space><space><space><space><space><space>through<space>self.pyoutput<openparen><closeparen>.<lf><lf><space><space><space><space><space><space><space><space>FME<space>will<space>continue<space>calling<space>input<openparen><closeparen><space>a<space>number<space>of<space>times<space>followed<lf><space><space><space><space><space><space><space><space>by<space>process_group<openparen><closeparen><space>for<space>each<space><apos>Group<space>By<apos><space>attribute<comma><space>so<space>this<space><lf><space><space><space><space><space><space><space><space>implementation<space>should<space>reset<space>any<space>class<space>members<space>for<space>the<space>next<space>group.<lf><space><space><space><space><space><space><space><space><quote><quote><quote><lf><space><space><space><space><space><space><space><space>pass<lf> } OUTPUT { PYOUTPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_BuildNetworkGraphs_OUTPUT" }
# -------------------------------------------------------------------------
FACTORY_DEF {*} TeeFactory FACTORY_NAME { $(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeExposer } INPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_BuildNetworkGraphs_OUTPUT" OUTPUT { FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeExposer_OUTPUT" }
# -------------------------------------------------------------------------
FACTORY_DEF {*} AttributeKeeperFactory FACTORY_NAME { $(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeKeeper } INPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeExposer_OUTPUT" KEEP_ATTRS { file_path } KEEP_LISTS { } KEEP_FME_ATTRIBUTES Yes BUILD_FEATURE_TABLES { NO } OUTPUT_ON_ATTRIBUTE_CHANGE { <Unused> } OUTPUT { OUTPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeKeeper_OUTPUT" }
FACTORY_DEF * TeeFactory FACTORY_NAME "$(GenerateNetworkGraphs_WORKSPACE_NAME)_HTMLFiles1653769429 Output Collector" INPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_AttributeKeeper_OUTPUT" OUTPUT FEATURE_TYPE "$(GenerateNetworkGraphs_WORKSPACE_NAME)_HTMLFiles"
INCLUDE [puts {MACRO WB_CURRENT_CONTEXT $(WB_OLD_CONTEXT_$(GenerateNetworkGraphs_WORKSPACE_NAME))}]