To execute a Motif, execute the following command:
motifs = (
graphSmall
.find("(a)-[ab]->(b); (b)-[bc]->(c)")
.filter("""
(b.id = 'SFO')
and (ab.delay > 500 or bc.delay > 500)
and bc.tripid > ab.tripid
and bc.tripid < ab.tripid + 10000
""")
)
display(motifs)
The result of this query can be seen as follows:
Output of the motif query