Skip to content

Instantly share code, notes, and snippets.

View jugf's full-sized avatar

Java User Group Frankfurt (JUGF) jugf

View GitHub Profile
@jugf
jugf / load_events_from_csv.cypher
Last active February 12, 2021 09:10
Visualizing Trust: Trustgraphs of CirclesUBI in Neo4j
// NOTE, check if statement is correct, it speeds up process dramatically (100-1000x)
CREATE CONSTRAINT ON (u:User) ASSERT u.address IS UNIQUE;
// Not necessary if 4G is available
// :auto USING PERIODIC COMMIT 500
LOAD CSV WITH HEADERS FROM 'file:///circles_hub_trust_events.csv' AS row
MERGE (u1:User {address: row.truster})
MERGE (u2:User {address: row.trustee})
MERGE (u1)-[r:TRUSTS]->(u2)