Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
--------------------------------------------
DIVINITY
LOAD NODES:
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Article-node.csv" AS csvLine
CREATE (a:Article { id: csvLine.ArtID, title: csvLine.Title, year: toInt(csvLine.PubYear) })
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Author-node.csv" AS csvLine
CREATE (p:Person { id: csvLine.AutID, name: csvLine.Author })
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Journal-node.csv" AS csvLine
CREATE (j:Journal { id: csvLine.JID, journal: csvLine.Journal, ISSN: csvLine.ISSN })
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Topic-node.csv" AS csvLine
CREATE (t:Topic { id: csvLine.TpcID, topic: csvLine.Topic })
---------------------------------------------------------------------------
LOAD RELATIONSHIPS:
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Author-rel.csv" AS csvLine
MATCH (person:Person {id: csvLine.AutID}),(article:Article { id: csvLine.ArtID})
CREATE person-[:WROTE]->article
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Journal-rel.csv" AS csvLine
MATCH (article:Article { id: csvLine.ArtID}),(journal:Journal { id: csvLine.JID})
CREATE article-[:PUBLISHEDIN]->journal
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/EdWarga/VUIR-Data-Project/master/Divinity/Topic-rel.csv" AS csvLine
MATCH (article:Article {id: csvLine.ArtID}),(topic:Topic {id: csvLine.TpcID})
CREATE article-[:ISABOUT]->topic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment