Skip to content

Instantly share code, notes, and snippets.

Avatar

Suellen Stringer-Hye suellenstringer-hye

  • Vanderbilt University Library
  • Nashville, TN
View GitHub Profile
View gist:ad1319cb6b2510dddd43dcd1ccfdad0f
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/SuellenStringer-Hye/VUIR-Data-Project/master/Divinity/Ability-rel.csv"
AS csvLine
MATCH (monster:Monster {id: csvLine.MnstID}),(ability:Ability { id: csvLine.Abid})
CREATE (monster)-[:HAS]->(ability)
MATCH (demon:Monster {name: "Demon"})-[:CAN_BE_KILLED_BY]->(weakness) RETURN demon,weakness
View gist:2dbdbeb82bcc367e7631e8a8f9a3e8a2
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/SuellenStringer-Hye/VUIR-Data-Project/master/Divinity/Ability-rel.csv"
AS csvLine
MATCH (monster:Monster {id: csvLine.MnstID}),(ability:Ability { id: csvLine.Abid})
CREATE (monster)-[:HAS]->(ability)
View Divinity
--------------------------------------------
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 })
@suellenstringer-hye
suellenstringer-hye / Cypher.txt
Last active Jan 24, 2018
Cypher code for Monsters
View Cypher.txt
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/SuellenStringer-Hye/VUIR-Data-Project/master/Divinity/monsters.csv" AS csvLine
CREATE (p:Monster { id: csvLine.MnstID, name: csvLine.Monster, desc: csvLine.Description })
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/SuellenStringer-Hye/VUIR-Data-Project/master/Divinity/weakness.csv" AS csvLine
CREATE (p:Weakness { id: csvLine.WkID, weakness: csvLine.Weakness, desc: csvLine.Description })
LOAD CSV WITH HEADERS FROM "https://raw.githubusercontent.com/SuellenStringer-Hye/VUIR-Data-Project/master/Divinity/ability.csv" AS csvLine
CREATE (p:Ability { id: csvLine.abID, ability: csvLine.Ability, desc: csvLine.Description })
View monsters.csv
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 2.
MonsterID,Name
6, "Ghost"
7,"Poltergeist"
8,"Demon"
9,"Genie"
10,"Siren"
11,"Werewolf"
12,"Sea Monster"
13,"Dragon"
14,"Big Foot"
View weakness.tsv
Weakness Name Weakness Description
1 Salt Salt thrown at monster or placed around victim
2 Holy Water Water blessed by Church
3 Amulet Item that wards off monsters
4 Drought Severe drought affecting major bodies of water
5 Silver Bullet Bullet made of silver through the heart
6 Sword Sharp sword that can fatally wound
7 Head Shot Shot through the head
8 Theseus Greek hero
9 Wooden Stake Stake of wood through the heart
View ability.tsv
AbilityID Ability Name Ability Description
1 Haunts Haunts victims, scaring them and possibly driving them insane
2 Telekinesis Ability to move items, usually for purposes of killing victims
3 Possession Possesses victim, making them do unwholesome things and often killing them
4 Magic Can use magic to various ends, usually injuring the victim in some way
5 Beautiful Song Song leads victims to their untimely death
6 Brute Strength Kills victims with brute strength
7 Enormous Size Similar to brute strength, the enormous size of a creature could be dangerous
8 Fire Breathing Burns victims by breathing fire
9 Enormous Size Similar to brute strength, the enormous size of a creature could be dangerous
View monsters.tsv
MonsterID Title Type Description
6 Ghost Supernatural Ethereal projection of a human
7 Poltergeist Supernatural Similar to ghosts, but torments humans
8 Demon Supernatural Unspeakably evil, possesses humans and may make them perform horrific acts
9 Genie/Jinn Supernatural From Islam, could be good or evil. Evil Jinns lead people into temptation
10 Siren Supernatural Song leads sailors off course causing them to wreck their ship
11 Werewolf Animal Every full moon, a human transforms into a werewolf that hunts and kills prey
12 Sea Monster Animal Roams bodies of waters looking for victims
13 Dragon Animal Breathes deadly firing on victims
14 Big Foot Animal Stalks in forests preying on wild animals and sometimes humans
View victims.tsv
VictimID Victim Name Victim Description Victim Gender
1 Male-Sailors Sexually frustrated sailors M
2 Young-Women Innocent, vulnerable, beautiful young women F
3 Sailors Sailors roaming various bodies of water B
4 Villagers Often the poor, defenseless targets of senseless violence B
5 Bwains Brains of zombie victims B
@suellenstringer-hye
suellenstringer-hye / monsters.txt
Created Jan 23, 2018
Cypher for loading monsters csv
View monsters.txt
LOAD CSV WITH HEADERS FROM "https://gist.githubusercontent.com/EdWarga/cc1c28bd4cea6f54ca2d/raw/228561253c6a8c900f151127828bf5f819a6dddd/authors.csv" AS csvLine
CREATE (p:Person { id: toInt(csvLine.authID), name: csvLine.author })
LOAD CSV WITH HEADERS FROM "https://gist.githubusercontent.com/EdWarga/afbab50905eb285a764e/raw/387e03f89ccce08361567075a26d2a31998dcc59/articles.csv" AS csvLine
CREATE (a:Article { id: toInt(csvLine.articleID), handle: csvLine.handle, title: csvLine.title, datePublished: csvLine.date, journal: csvLine.journal })
LOAD CSV WITH HEADERS FROM "https://gist.githubusercontent.com/EdWarga/d2f520e20ec9436da525/raw/b9d96ea1a86c39afc548779a71c4d02132079614/lcsh.csv" AS csvLine
CREATE (s:Subject { id: toInt(csvLine.subID), subject: csvLine.lcsh })