This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (a), (b), p = allShortestPaths((a)-[*..{{"Maximum path length":number:{"default": 4, "min": 1, "max": 10}}}]-(b)) | |
WHERE ALL (r IN relationships(p) | |
WHERE type(r)= 'IS_SHAREHOLDER' AND r.shares > 0.20) AND id(a) = {{"Source":node:"Person"}} AND id(b) = {{"Target":node:"Company"}} | |
RETURN p LIMIT {{"Maxiumum number of paths":number:{"default":5, "min": 1, "max": 50}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (n) | |
WHERE id(n) = {{"Suspicious Entity":node:["Person"]}} | |
SET n.suspicious = true | |
SET n.note = {{"Comment":string:{"placeholder":"Add a note..."}}} | |
RETURN n; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (b:BANK_ACCOUNT)-[e:HAS_TRANSFERED]->(a) | |
WHERE id(a) = {{"Bank":node:"BANK_ACCOUNT"}} and e.amount > {{"Amount":number:{"min":0}}} and e.date >= {{"Start date":date:"iso"}} and e.date < {{"End date":date:"iso"}} | |
return a, e, b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH p=(a:Company)-[rs:SELLS_TO*]->(c:Company) | |
WHERE a.country <> c.country | |
WITH p, a, c, rs, nodes(p) AS ns | |
WITH p, a, c, rs, filter(n IN ns WHERE n.epoch - 1383123473 < (90*60*60*24)) AS bs | |
WITH p, a, c, rs, head(bs) AS b | |
WHERE NOT b IS NULL | |
WITH p, a, b, c, head(rs) AS r1, last(rs) AS rn | |
WITH p, a, b, c, r1, rn, rn.epoch - r1.epoch AS d | |
WHERE d < (15*60*60*24) | |
RETURN a, b, c, d, r1, rn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1) match all disputed transactions | |
match (p:person)-[b:HAS_BOUGHT_AT {status: "Disputed"}]->(m:merchant) | |
with | |
collect(p) as disputer, // list of persons with disputed transactions | |
collect(b) as disputed, // list disputed transactions | |
collect(m) as merchants // list merchants with disputed transactions | |
// 2) match all undisputed transactions | |
match (p:person)-[b:HAS_BOUGHT_AT {status: "Undisputed"}]->(m:merchant) | |
where p in disputer // keep only transactions where the buyer is a disputer | |
with // group undisputed transactions by merchant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Load a node by node ID | |
/guest?populate=nodeId&item_id=123&key=a1b1c1 | |
# Load an edge and its source and target nodes by edge ID | |
/guest?populate=edgeId&item_id=123&key=a1b1c1 | |
# Load a node and its neighbors by node ID | |
/guest?populate=expandNodeId&item_id=123&key=a1b1c1 | |
# Load nodes (by search query) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create node events | |
load csv with headers from "file:///bdd.csv" as row | |
merge(e:Event {id: row.eventid}) | |
set e.nature=row.attacktype1_txt | |
set e.year=row.iyear | |
set e.month=row.imonth | |
set e.date=row.iday | |
Set e.latitude=row.latitude | |
Set e.longitude=row.longitude |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (c:PERSON)-[e1:HAS_BANK_ACCOUNT]->(cc:BANK_ACCOUNT)-[e2:HAS_RECEIVED]->(t:TRANSACTION) | |
WHERE ID(c) = {{"PERSON":node:"PERSON"}} | |
RETURN c, e1, cc, e2, t | |
ORDER BY t.amount DESC | |
LIMIT 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MATCH (c1:Customer)-[r*1..4]-(c2:Customer) | |
WHERE ID(c1) = {{"customer":node:"Customer"}} | |
return c1, r, c2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create the class with a low opacity value | |
ogma.createClass('faded', { | |
nodeAttributes: { opacity: 0.2 }, | |
edgeAttributes: { opacity: 0.2 } | |
}); | |
// Select the nodes and edges that must be faded | |
const nodesToFade = ogma.getNodes().filter(node => node.getData('type') === 'INVESTOR'); | |
const edgesToFade = nodesToFade.getAdjacentEdges(); |
NewerOlder