-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph_date_project_as_cluster_AT4.py
716 lines (526 loc) · 24.4 KB
/
graph_date_project_as_cluster_AT4.py
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
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
#!/usr/bin/env python
# coding: utf-8
# In[1]:
from neo4j import GraphDatabase
from graphviz import Digraph
import graphviz
from datetime import datetime
import numpy as np
# In[2]:
### begin config
# connection to Neo4J database
driver = GraphDatabase.driver("bolt://localhost:7687", auth=("neo4j", "1234"))
# In[3]:
##### colors
#c81919 - dark red
#f9cccc - light red
#
#0333a3 - dark blue
#bbd1ff - light blue
#
#feb729 - yellow
#fed47f - light yellow
#
#178544 - dark green
#4ae087 - light green
#
#a034a8 - purple
#e7bdeb - light purple
#
#13857d - dark cyan
#19b1a7 - cyan
#93f0ea - light cyan
c2_cyan = "#318599"
c2_orange = "#ea700d"
c2_light_orange = "#f59d56"
c2_light_yellow = "#ffd965"
c3_light_blue = "#5b9bd5"
c3_red = "#ff0000"
c3_green = "#70ad47"
c3_yellow = "#ffc000"
c4_red = '#d7191c'
c4_orange = '#fdae61'
c4_yellow = '#ffffbf'
c4_light_blue = '#abd9e9'
c4_dark_blue = '#2c7bb6'
c_white = "#ffffff"
c_black = "#000000"
c5_red = '#d73027'
c5_orange = '#fc8d59'
c5_yellow = '#fee090'
c5_light_blue = '#e0f3f8'
c5_medium_blue = '#91bfdb'
c5_dark_blue = '#4575b4'
# In[4]:
# Crimson
c1 = "#DC143C"
# HotPink
c2 = "#FF69B4"
# DeepPink
c3 = "#FF1493"
# Pink
c4 = "#FFC0CB"
# MediumVioletRed
c5 = "#C71585"
# Orchid
c6 = "#DA70D6"
# Thistle
c7 = "#D8BFD8"
# plum
c8 = "#DDA0DD"
# Violet
c9 = "#EE82EE"
# Magenta
c10 = "#FF00FF"
# Fuchsia
c11 = "#FF00FF"
# DarkMagenta
c12 = "#8B008B"
# Purple
c13 = "#800080"
# MediumOrchid
c14 = "#BA55D3"
# DarkVoilet
c15 = "#9400D3"
# DarkOrchid
c16 = "#9932CC"
# Indigo
c17 = "#4B0082"
# BlueViolet
c18 = "#8A2BE2"
# RosyBrown
c19 = "#BC8F8F"
# IndianRed
c20 = "#CD5C5C"
# Red
c21 = "#FF0000"
# Brown
c22 = "#A52A2A"
# FireBrick
c23 = "#B22222"
# DarkRed
c24 = "#8B0000"
c2_cyan = "#318599"
c2_orange = "#ea700d"
c2_light_orange = "#f59d56"
c2_light_yellow = "#ffd965"
c3_light_blue = "#5b9bd5"
c3_red = "#ff0000"
c3_green = "#70ad47"
c3_yellow = "#ffc000"
c4_red = '#d7191c'
c4_orange = '#fdae61'
c4_yellow = '#ffffbf'
c4_light_blue = '#abd9e9'
c4_dark_blue = '#2c7bb6'
c_white = "#ffffff"
c_black = "#000000"
c5_red = '#d73027'
c5_orange = '#fc8d59'
c5_yellow = '#fee090'
c5_light_blue = '#e0f3f8'
c5_medium_blue = '#91bfdb'
c5_dark_blue = '#4575b4'
# Aqua
"#00FFFF"
# Baby Blue
C1 = "#89CFF0"
# Blue
C2 = "#0000FF"
# Blue Gray
C3 = "#7393B3"
# Blue Green
C4 = "#088F8F"
# Bright Blue
C5 = "#0096FF"
# Cadet Blue
C6 = "#5F9EA0"
# Cobalt Blue
C7 = "#0047AB"
# Cornflower Blue
C8 = "#6495ED"
# Cyan
C9 = "#00FFFF"
# Dark Blue
C10 = "#00008B"
# Denim
C11 = "#6F8FAF"
# Egyptian Blue
C12 = "#1434A4"
# Electric Blue
C13 = "#7DF9FF"
# Glaucous
C14 = "#6082B6"
# Jade
C15 = "#00A36C"
# Indigo
C16 = "#3F00FF"
# # Iris
C17 = "#5D3FD3"
# # Light Blue
C18 = "#ADD8E6"
# # Midnight Blue
C19 = "#191970"
# # Navy Blue
C20 = "#000080"
# # Neon Blue
C21 = "#1F51FF"
# Pastel Blue
C22 = "#A7C7E7"
# Periwinkle
C23 = "#CCCCFF"
# Powder Blue
C24 = "#B6D0E2"
# Robin Egg Blue
C25 = "#96DED1"
# Royal Blue
C26 = "#4169E1"
# Sapphire Blue
C27 = "#0F52BA"
# Seafoam Green
C28 = "#9FE2BF"
# Sky Blue
c29 = "#87CEEB"
# Steel Blue
#4682B4
# Teal
#008080
# Turquoise
#40E0D0
# Ultramarine
#0437F2
# Verdigris
#40B5AD
# Zaffre
#0818A8
# In[5]:
#date_person_as_cluster
holidays = [
"2016-03-25",
"2016-05-16" ,
"2017-04-14" ,
"2017-04-27" ,
"2017-05-25" ,
"2018-03-30" ,
"2018-04-02" ,
"2018-04-27" ,
"2018-05-10" ,
"2018-05-21" ,
"2019-04-19" ,
"2019-05-30" ,
"2019-06-09" ,
"2019-06-10" ,
"2020-04-10" ,
"2020-04-27" ,
"2020-05-05" ,
"2020-06-01" ,
"2021-04-02" ,
"2021-04-05" ]
# all activities
AT_selector = 'True'
# 9 randomly selected cases showing variety of behavior
# Projects = ['Project1','Project4']
Projects = ['Project1','Project2','Project3','Project4','Project5','Project6','Project7','Project8','Project9','Project10','Project11','Project12','Project13','Project14','Project15','Project16','Project17','Project19','Project25','Project26']
Pro_selector = "e1.Project in "+str(Projects)
Pro_selector_e2 = "e2.Project in "+str(Projects)
def getNodeLabel_Event(name):
return name[7:14]
# return name[:]
def getEventsDF(tx, dot, entity_type, color, fontcolor, edge_width):
q = f'''
MATCH (e1) -[r:DF2{{EntityType:"{entity_type}"}}]-> (e2:Event)
RETURN e1,r,e2
'''
print(q)
i = 0
for record in tx.run(q):
if record["e2"] != None:
e1_id = str(record['e1'].id)
e2_id = str(record['e2'].id)
e1_date = str(record["e1"]["Date"])
e1_name = str(record["e1"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
e2_date = str(record["e2"]["Date"])
e2_name = str(record["e2"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e2"]["Project"]))+' '+ getNodeLabel_Event(str(record["e2"]["Person"]))
e1_label = ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
e2_label = ' P' + getNodeLabel_Event(str(record["e2"]["Project"]))+' '+ getNodeLabel_Event(str(record["e2"]["Person"]))
days = np.busday_count(record['e1']['Date'], record['e2']['Date'], holidays = holidays)
if e1_date == e2_date:
edge_label = ""
with dot.subgraph(name='cluster' + e1_date) as c:
# with dot.subgraph(name='cluster' + e1_date ) as c:
# c.attr(fontcolor='white')
# c.attr('node', style='filled', fillcolor=color, fontcolor=fontcolor)
c.node(e1_date)
with c.subgraph (name='cluster' + e1_date + str(record['e1']['Project'])) as a:
a.attr(style='filled', color= color)
# a.node(e1_name,label = e1_label)
# a.node(e2_name,label = e2_label)
a.node(e1_name,style='filled',fillcolor="white", fontcolor=fontcolor,label = e1_label)
a.node(e2_name,style='filled',fillcolor="white", fontcolor=fontcolor,label = e2_label)
pen_width = str(edge_width)
edge_color = color
dot.edge(e1_name, e2_name,constraint = "false",color=edge_color,penwidth=pen_width,fontname="Helvetica", fontsize="8",fontcolor=edge_color)
else:
if days == 0 or days ==1:
edge_label = "P" + record["e1"]["Project"][7:9]
else:
edge_label = "P" + record["e1"]["Project"][7:9] +"__"+ str(int(days)-1) + ' days'
with dot.subgraph(name='cluster' + e1_date) as c:
c.attr(fontcolor='white')
c.node(e1_date)
with c.subgraph (name='cluster' + e1_date + str(record['e1']['Project'])) as a:
a.attr(style='filled', color= color)
# a.attr(style='filled', color= color)
# a.node(e1_name,label = e1_label)
a.node(e1_name,style='filled',fillcolor="white", fontcolor=fontcolor,label = e1_label)
with dot.subgraph(name='cluster' + e2_date) as c:
# c.attr(fontcolor='white')
c.node(e2_date)
with c.subgraph (name='cluster' + e2_date + str(record['e2']['Project'])) as a:
a.attr(style='filled', color= color)
# a.attr(style='filled', color= color)
# a.node(e2_name,label = e2_label)
a.node(e2_name,style='filled',fillcolor="white", fontcolor=fontcolor,label = e2_label)
pen_width = str(edge_width)
edge_color = color
dot.edge(e1_name, e2_name,xlabel=edge_label,color=edge_color,penwidth=pen_width,fontname="Helvetica", fontsize="8",fontcolor=edge_color)
dot.attr(rankdir="LR")
def getPersonDF(tx, dot, entity_type):
q = f'''
match (n:Entity {{EntityType:"{'Person'}"}}) <-[:CORR]- (e1:Event) -[r:DF5{{EntityType:'{entity_type}'}}]-> (e2:Event)
return e1,r,e2,n
'''
for record in tx.run(q):
if record["e2"] != None:
e1_date = str(record["e1"]["Date"])
e1_name = str(record["e1"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
e2_date = str(record["e2"]["Date"])
e2_name = str(record["e2"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e2"]["Project"]))+' '+ getNodeLabel_Event(str(record["e2"]["Person"]))
e1_person = str(record['e1']['Person'])
e2_person = str(record['e2']['Person'])
dot.edge(e1_name, e2_name, rank = "same",style = "invis")
dot.attr(rankdir = "LR")
def getResourcesDF(tx, dot, ID, color, fontcolor, edge_width):
q = f'''
match (n:Entity {{ID:"{ID}"}}) <-[:CORR]- (e1:Event) -[r:DF3{{EntityType:'AT_Person'}}]-> (e2:Event)
WHERE {Pro_selector} AND {Pro_selector_e2}
return e1,r,e2,n
'''
for record in tx.run(q):
if record["e2"] != None:
e1_date = str(record["e1"]["Date"])
e1_name = str(record["e1"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
e2_date = str(record["e2"]["Date"])
e2_name = str(record["e2"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e2"]["Project"]))+' '+ getNodeLabel_Event(str(record["e2"]["Person"]))
e1_person = str(record['e1']['Person'])
e2_person = str(record['e2']['Person'])
e1_label = ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
e2_label = ' P' + getNodeLabel_Event(str(record["e2"]["Project"]))+' '+ getNodeLabel_Event(str(record["e2"]["Person"]))
days = np.busday_count(record['e1']['Date'], record['e2']['Date'], holidays = holidays)
if e1_date == e2_date:
with dot.subgraph(name='cluster' + e1_date) as c:
# c.attr(fontcolor='white')
c.node(e1_date)
c.node(e1_name,style='filled',fillcolor=color,label = e1_label,fontcolor = fontcolor)
c.node(e2_name,style='filled',fillcolor=color,label = e2_label,fontcolor = fontcolor)
dot.edge(e1_name,e2_name,constraint = "false",color = color)
else:
dot.node(e1_name,style='filled',fillcolor=color,label = e1_label,fontcolor = fontcolor)
dot.node(e2_name,style='filled',fillcolor=color,label = e2_label,fontcolor = fontcolor)
if days == 0 or days == 1:
edge_label = "E"+ record["n"]["ID"][8:11]
else:
edge_label = "E"+ record["n"]["ID"][8:11] + "__"+str(int(days)-1) + ' days'
pen_width = str(edge_width)
dot.edge(e1_name,e2_name,constraint = "false",xlabel=edge_label,color=color,penwidth=pen_width,fontname="Helvetica", fontsize="8",fontcolor=color)
dot.attr(rankdir = "LR")
def getEntityForFirstEvent(tx,dot,entity_type,color,fontcolor):
q = f'''
MATCH (e1:Event) -[c:CORR]-> (n:Entity)
WHERE n.EntityType = "{entity_type}" AND NOT (:Event)-[:DF{{EntityType:n.EntityType}}]->(e1) AND {Pro_selector}
return e1,c,n
'''
print(q)
# dot.attr("node",shape="rectangle",fixedsize="false", width="0.4", height="0.4", fontname="Helvetica", fontsize="8", margin="0")
for record in tx.run(q):
e_date = str(record["e1"]['Date'])
e_name = str(record["e1"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
# e_name = getNodeLabel_Event(record["e"]["Activity"])
entity_type = record["n"]["EntityType"]
entity_id = record["n"]["ID"]
# entity_uid = record["n"]["id"]
entity_label = entity_type+'\n' +entity_id
dot.node(entity_id, entity_label,color=color, style="filled", fillcolor=color, fontcolor=fontcolor)
dot.edge(entity_id, e_name, style="dashed", arrowhead="none",color=color)
def getProjectForFirstEvent(tx,dot,ID,color,fontcolor):
q = f'''
MATCH (e1:Event) -[c:CORR]-> (n:Entity)
WHERE n.ID = "{ID}" AND NOT (:Event)-[:DF{{EntityType:n.EntityType}}]->(e1) AND {Pro_selector}
return e1,c,n
'''
print(q)
# dot.attr("node",shape="rectangle",fixedsize="false", width="0.4", height="0.4", fontname="Helvetica", fontsize="8", margin="0")
for record in tx.run(q):
e_date = str(record["e1"]['Date'])
e_name = str(record["e1"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
# e_name = getNodeLabel_Event(record["e"]["Activity"])
entity_type = record["n"]["EntityType"]
entity_id = record["n"]["ID"]
# entity_uid = record["n"]["id"]
entity_label = entity_type+'\n' +entity_id
dot.node(entity_id, entity_label,shape="rectangle",color=color ,fixedsize="false", width="0.4", height="0.4", style="filled", fillcolor=color, fontcolor=fontcolor)
dot.edge(entity_id, e_name, style="dashed", arrowhead="none",color=color)
def getPersonForFirstEvent(tx,dot,ID,color,fontcolor):
q = f'''
MATCH (e1:Event) -[c:CORR]-> (n:Entity)
WHERE n.ID = "{ID}" AND NOT (:Event)-[:DF{{EntityType:n.EntityType}}]->(e1) AND {Pro_selector}
return e1,c,n
'''
print(q)
# dot.attr("node",shape="rectangle",fixedsize="false", width="0.4", height="0.4", fontname="Helvetica", fontsize="8", margin="0")
for record in tx.run(q):
e_date = str(record["e1"]['Date'])
e_name = str(record["e1"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
# e_name = getNodeLabel_Event(record["e"]["Activity"])
entity_type = record["n"]["EntityType"]
entity_id = record["n"]["ID"]
# entity_uid = record["n"]["id"]
entity_label = entity_type+'\n' +entity_id
dot.node(entity_id, entity_label,shape="rectangle",fixedsize="false", width="0.4", height="0.4",color=color, style="filled", fillcolor=color, fontcolor=fontcolor)
dot.edge(entity_id, e_name, style="dashed", arrowhead="none",color=color)
def getActivityDF(tx, dot):
q = f'''
MATCH (e1:Event) -[r:DF3{{EntityType:'AT_Activity'}}]-> (e2:Event)
return e1,r,e2
'''
for record in tx.run(q):
if record["e2"] != None:
e1_date = str(record["e1"]["Date"])
e1_name = str(record["e1"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
e2_date = str(record["e2"]["Date"])
e2_name = str(record["e2"]["Date"])+ ' P' + getNodeLabel_Event(str(record["e2"]["Project"]))+' '+ getNodeLabel_Event(str(record["e2"]["Person"]))
e1_person = str(record['e1']['Person'])
e2_person = str(record['e2']['Person'])
e1_label = ' P' + getNodeLabel_Event(str(record["e1"]["Project"]))+' '+ getNodeLabel_Event(str(record["e1"]["Person"]))
e2_label = ' P' + getNodeLabel_Event(str(record["e2"]["Project"]))+' '+ getNodeLabel_Event(str(record["e2"]["Person"]))
# dot.node(e1_name, label = e1_label)
# dot.node(e2_name, label = e2_label)
if e1_date == e2_date:
dot.edge(e1_name,e2_name,style = "invis",constraint = "false")
else:
dot.edge(e1_name,e2_name,style = "invis")
dot.attr(rankdir = 'LR')
# In[6]:
dot = Digraph("G",comment='Query Result')
dot.attr("graph",margin="0")
with driver.session() as session:
session.read_transaction(getEventsDF, dot,"AT_Pro1" , c5_dark_blue, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro1_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project1",c5_dark_blue,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro4" , c5_medium_blue, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro4_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project4",c5_medium_blue,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro2" , C1, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro2_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project2",C1,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro3" , C3, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro3_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project3",C3,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro5" , C4, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro5_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project5",C4,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro6" , C6, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro6_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project6",C6,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro7" , C8, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro7_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project7",C8,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro8" , C11, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro8_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project8",C11,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro9" , C14, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro9_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project9",C14,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro10", C15, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro10_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project10",C15,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro11" , C16, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro11_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project11",C16,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro12" , C17, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro12_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project12",C17,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro13" , C18, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro13_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project13",C18,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro14" , C19, c_white, 3)
# session.read_transaction(getPersonDF,dot,"Pro14_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project14",C19,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro15" , C20, c_white, 3)
# session.read_transaction(getPersonDF,dot,"Pro15_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project15",C20,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro16" , C21, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro16_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project16",C21,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro17" , C22, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro17_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project17",C22,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro19" , C23, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro19_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project19",C23,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro25" , C24, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro25_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project25",C24,c_white)
session.read_transaction(getEventsDF, dot,"AT_Pro26" , C25, c_black, 3)
# session.read_transaction(getPersonDF,dot,"Pro26_Person")
session.read_transaction(getProjectForFirstEvent, dot, "Project26",C26,c_white)
session.read_transaction(getResourcesDF, dot, "Employee70", c1, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee70",c1,c_white)
session.read_transaction(getResourcesDF, dot, "Employee185", c2, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee185",c2,c_white)
session.read_transaction(getResourcesDF, dot, "Employee91", c16,c_black, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee91",c16,c_white)
session.read_transaction(getResourcesDF, dot, "Employee113", c3, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee113",c3,c_white)
session.read_transaction(getResourcesDF, dot, "Employee133", c5, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee133",c5,c_white)
session.read_transaction(getResourcesDF, dot, "Employee140", c6, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee140",c6,c_white)
session.read_transaction(getResourcesDF, dot, "Employee6", c17,c_white, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee6",c17,c_white)
session.read_transaction(getResourcesDF, dot, "Employee85", c8,c_black, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee85",c8,c_white)
session.read_transaction(getResourcesDF, dot, "Employee22", c9,c_black, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee22",c9,c_white)
session.read_transaction(getResourcesDF, dot, "Employee170", c10,c_black, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee170",c10,c_white)
session.read_transaction(getResourcesDF, dot, "Employee141", c11, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee141",c11,c_white)
session.read_transaction(getResourcesDF, dot, "Employee258", c12, c_white,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee258",c12,c_white)
session.read_transaction(getResourcesDF, dot, "Employee33", c13,c_white, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee33",c13,c_white)
session.read_transaction(getResourcesDF, dot, "Employee84", c14,c_black, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee84",c14,c_white)
session.read_transaction(getResourcesDF, dot, "Employee69", c15, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee69",c15,c_white)
session.read_transaction(getResourcesDF, dot, "Employee182", c19,c_black, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee182",c19,c_white)
session.read_transaction(getResourcesDF, dot, "Employee73", c20, c_black,3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee73",c20,c_white)
session.read_transaction(getResourcesDF, dot, "Employee111", c21,c_white, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee111",c21,c_white)
session.read_transaction(getResourcesDF, dot, "Employee158", c23,c_white, 3)
session.read_transaction(getPersonForFirstEvent, dot, "Employee158",c23,c_white)
session.read_transaction(getActivityDF, dot)
session.read_transaction(getEntityForFirstEvent, dot, "Activity",c5_orange,c_black)
# session.read_transaction(getEntityForFirstEvent, dot, "Project",c5_dark_blue,c_white)
# session.read_transaction(getEntityForFirstEvent, dot, "Person",c5_medium_blue,c_black)
file = open("activities.dot","w")
file.write(dot.source)
file.close()
dot.render('test-output/round-table.gv', view=True)
# In[ ]:
# In[ ]:
# In[ ]:
# In[ ]: