Skip to content

Instantly share code, notes, and snippets.

@senthilthyagarajan
Last active May 3, 2017 06:07
Show Gist options
  • Save senthilthyagarajan/3935718243e0d1c749e6bd92687c07d1 to your computer and use it in GitHub Desktop.
Save senthilthyagarajan/3935718243e0d1c749e6bd92687c07d1 to your computer and use it in GitHub Desktop.
Harry Potter
license: gpl-3.0
height: 900
{
"nodes": [{
"bio": "Brother of Sirius. Used to be a Death Eater but defected.",
"name": "Regulus Arcturus Black",
"group": 0,
"id": 0,
"count": 3
},
{
"bio": "Best friend of James Potter and godfather of Harry.",
"name": "Sirius Black",
"group": 0,
"id": 1,
"count": 23
},
{
"bio": "Killed by a werewolf. She was a gryffindor student who dated Ron.",
"name": "Lavender Brown",
"group": 0,
"id": 2,
"count": 3
},
{
"bio": "Ravenclaw student who dated Cedric Diggory and Harry Potter.",
"name": "Cho Chang",
"group": 0,
"id": 3,
"count": 7
},
{
"bio": "Father of Crabbe and death0eater who escaped Azkaban.",
"name": "Vincent Crabbe Sr.",
"group": 1,
"id": 4,
"count": 8
},
{
"bio": "Slytherin student who was best friends with Goyle and followed Draco.",
"name": "Vincent Crabbe",
"group": 1,
"id": 5,
"count": 7
},
{
"bio": "Head of the department of Internation Magical Cooperation. Killed by his son.",
"name": "Bartemius \"Barty\" Crouch Sr.",
"group": 0,
"id": 6,
"count": 4
},
{
"bio": "Death Eater who impersonated Alastor Moody.",
"name": "Bartemius \"Barty\" Crouch Jr.",
"group": 1,
"id": 7,
"count": 10
},
{
"bio": "Participated in the Triwizard tournament and married Bill Weasley.",
"name": "Fleur Delacour",
"group": 0,
"id": 8,
"count": 9
},
{
"bio": "Participated in the Triwizard tournament and got killed by Voldemort.",
"name": "Cedric Diggory",
"group": 0,
"id": 9,
"count": 3
},
{
"bio": "Albus' brother and owner of Hog's Head.",
"name": "Alberforth Dumbledore",
"group": 0,
"id": 10,
"count": 5
},
{
"bio": "Headmaster of Hogwards killed by Snape.",
"name": "Albus Dumbledore",
"group": 0,
"id": 11,
"count": 36
},
{
"bio": "Muggle son of Vernon and Petunia and first0cousin of Harry.",
"name": "Dudley Dursley",
"group": 0,
"id": 12,
"count": 4
},
{
"bio": "Harry's aunt and sister of Lily.",
"name": "Petunia Dursley",
"group": 0,
"id": 13,
"count": 5
},
{
"bio": "Harry's muggle uncle.",
"name": "Vernon Dursley",
"group": 0,
"id": 14,
"count": 4
},
{
"bio": "Squib caretake of Hogwards.",
"name": "Argus Filch",
"group": 0,
"id": 15,
"count": 11
},
{
"bio": "Harry's friend and member of Dumbledore's army.",
"name": "Seamus Finnigan",
"group": 0,
"id": 16,
"count": 8
},
{
"bio": "Creator of the Philosopher's Stone.",
"name": "Nicolas Flamel",
"group": 0,
"id": 17,
"count": 1
},
{
"bio": "Minister of Magic that was forced to resign.",
"name": "Cornelius Fudge",
"group": 0,
"id": 18,
"count": 7
},
{
"bio": "Death Eater and father of Gregory Goyle.",
"name": "Goyle Sr.",
"group": 1,
"id": 19,
"count": 3
},
{
"bio": "Best friend of Crabbe. Slytherin student and dies by falling into Fiendfyre.",
"name": "Gregory Goyle",
"group": 1,
"id": 20,
"count": 5
},
{
"bio": "One of Harry's best friend and marries Ron Weasley.",
"name": "Hermione Granger",
"group": 0,
"id": 21,
"count": 35
},
{
"bio": "Half0giant who loves Harry. He was the keeper of Keys and Grounds at Hogwards.",
"name": "Rubeus Hagrname",
"group": 0,
"id": 22,
"count": 12
},
{
"bio": "Highmaster of Durmstrang and reformed death0eater.",
"name": "Igor Karkaroff",
"group": 1,
"id": 23,
"count": 3
},
{
"bio": "Participant in the Triwizard tournament. Dated Hermione.",
"name": "Viktor Krum",
"group": 0,
"id": 24,
"count": 5
},
{
"bio": "Death Eater who was killed by Molly Weasley.",
"name": "Bellatrix Lestrange",
"group": 1,
"id": 25,
"count": 8
},
{
"bio": "Mother of Neville who was tortured by Bellatrix.",
"name": "Alice Longbottom",
"group": 0,
"id": 26,
"count": 3
},
{
"bio": "Father of Neville who was tortured by Bellatrix.",
"name": "Frank Longbottom",
"group": 0,
"id": 27,
"count": 3
},
{
"bio": "Gryffindor student who was a member of Dumbledore's army.",
"name": "Neville Longbottom",
"group": 0,
"id": 28,
"count": 11
},
{
"bio": "Ravenclaw student who was a member of Dumbledore's army.",
"name": "Luna Lovegood",
"group": 0,
"id": 29,
"count": 5
},
{
"bio": "Father of Luna and editor of The Quibbler.",
"name": "Xenophilius Lovegood",
"group": 0,
"id": 30,
"count": 1
},
{
"bio": "Friend of James Potter and werewolf. He married Nymphadora.",
"name": "Remus Lupin",
"group": 0,
"id": 31,
"count": 9
},
{
"bio": "Slytherin student who had many arguments with Harry.",
"name": "Draco Malfoy",
"group": 1,
"id": 32,
"count": 7
},
{
"bio": "Father of Draco and influential Death0Eater.",
"name": "Lucius Malfoy",
"group": 1,
"id": 33,
"count": 10
},
{
"bio": "Mother of Draco and sister of Bellatrix.",
"name": "Narcissa Malfoy",
"group": 1,
"id": 34,
"count": 4
},
{
"bio": "Half0giantess and headmistress of Beauxbatons.",
"name": "Olympe Maxime",
"group": 0,
"id": 35,
"count": 4
},
{
"bio": "Professor of Transfiguration and head of Gryffindor.",
"name": "Minerva McGonagall",
"group": 0,
"id": 36,
"count": 13
},
{
"bio": "Retired auror and member of the order of the Phoenix. Killed by Voldemort.",
"name": "Alastor \"Mad0Eye\" Moody",
"group": 0,
"id": 37,
"count": 11
},
{
"bio": "Betrays James and Lily Potter. Follower of Voldemort.",
"name": "Peter Pettigrew",
"group": 1,
"id": 38,
"count": 17
},
{
"bio": "The boy who lived. Main character of the series.",
"name": "Harry Potter",
"group": 2,
"id": 39,
"count": 47
},
{
"bio": "Father of Harry. Murdered by Voldemort.",
"name": "James Potter",
"group": 0,
"id": 40,
"count": 11
},
{
"bio": "Mother of Harry. Murdered by Voldemort.",
"name": "Lily Potter",
"group": 0,
"id": 41,
"count": 8
},
{
"bio": "Possessed by Voldemort. Defence against the Dark Arts professor.",
"name": "Quirinus Quirrell",
"group": 1,
"id": 42,
"count": 7
},
{
"bio": "Muggle father of Voldemort who was killed by him.",
"name": "Tom Rnamedle Sr.",
"group": 1,
"id": 43,
"count": 4
},
{
"bio": "Muggle mother of Voldemort who was killed by him.",
"name": "Mary Rnamedle",
"group": 1,
"id": 44,
"count": 2
},
{
"bio": "The antagonist of the series who murdered many.",
"name": "Lord Voldemort",
"group": 3,
"id": 45,
"count": 38
},
{
"bio": "Reporter at the Daily Prophet.",
"name": "Rita Skeeter",
"group": 1,
"id": 46,
"count": 3
},
{
"bio": "Head of the Slytherin house and saved Harry in many occasions.",
"name": "Severus Snape",
"group": 0,
"id": 47,
"count": 17
},
{
"bio": "Married Remus Lupin and was killed by Bellatrix.",
"name": "Nymphadora Tonks",
"group": 0,
"id": 48,
"count": 4
},
{
"bio": "Senior undersecretary to the Ministry of Magic. Eventually sent to Azkaban.",
"name": "Dolores Janes Umbrnamege",
"group": 1,
"id": 49,
"count": 12
},
{
"bio": "Father of the Weasleys and member of the Order of the Phoenix.",
"name": "Arthur Weasley",
"group": 0,
"id": 50,
"count": 20
},
{
"bio": "Oldest son of Arthur and Molly. Husband of Fleur.",
"name": "Bill Weasley",
"group": 0,
"id": 51,
"count": 17
},
{
"bio": "Second son of Arthur and Molly. Works with dragons in Romania.",
"name": "Charlie Weasley",
"group": 0,
"id": 52,
"count": 16
},
{
"bio": "nameentical twin with George and co0owner of Weasleys' Wizard Wheezes",
"name": "Fred Weasley",
"group": 0,
"id": 53,
"count": 17
},
{
"bio": "nameentical twin with Fred and co0owner of Weasleys' Wizard Wheezes",
"name": "George Weasley",
"group": 0,
"id": 54,
"count": 20
},
{
"bio": "Marries Harry Potter and only daughter of Molly and Arthur.",
"name": "Ginny Weasley",
"group": 0,
"id": 55,
"count": 18
},
{
"bio": "Wife of Arthur and mother of the Weasleys. Kills Bellatrix.",
"name": "Molly Weasley",
"group": 0,
"id": 56,
"count": 14
},
{
"bio": "Third son of Arthur and Molly. He is a Gryffindor prefect.",
"name": "Percy Weasley",
"group": 0,
"id": 57,
"count": 12
},
{
"bio": "Harry's best friend. Marries Hermione.",
"name": "Ron Weasley",
"group": 0,
"id": 58,
"count": 34
},
{
"bio": "House elf and friend of Harry. He is killed by Bellatrix.",
"name": "Dobby",
"group": 0,
"id": 59,
"count": 6
},
{
"bio": "Three0headed dog belonging to Rubeus Hagrname.",
"name": "Fluffy",
"group": 0,
"id": 60,
"count": 4
},
{
"bio": "Harry's owl.",
"name": "Hedwig",
"group": 0,
"id": 61,
"count": 1
},
{
"bio": "Ghost at Hogwards.",
"name": "Moaning Myrtle",
"group": 0,
"id": 62,
"count": 1
},
{
"bio": "Acromantula belonging to Rubeus Hagrname.",
"name": "Aragog",
"group": 0,
"id": 63,
"count": 5
},
{
"bio": "Giant0half brother of Hagrname.",
"name": "Grawp",
"group": 0,
"id": 64,
"count": 3
}
],
"links": [{
"source": 0,
"target": 1,
"value": "loss"
}, {
"source": 0,
"target": 25,
"value": "loss"
}, {
"source": 0,
"target": 45,
"value": "loss"
}, {
"source": 1,
"target": 0,
"value": "loss"
}, {
"source": 1,
"target": 11,
"value": "win"
}, {
"source": 1,
"target": 21,
"value": "win"
}, {
"source": 1,
"target": 25,
"value": "loss"
}, {
"source": 1,
"target": 31,
"value": "win"
}, {
"source": 1,
"target": 33,
"value": "loss"
}, {
"source": 1,
"target": 34,
"value": "loss"
}, {
"source": 1,
"target": 36,
"value": "win"
}, {
"source": 1,
"target": 37,
"value": "win"
}, {
"source": 1,
"target": 38,
"value": "loss"
}, {
"source": 1,
"target": 39,
"value": "win"
}, {
"source": 1,
"target": 40,
"value": "win"
}, {
"source": 1,
"target": 41,
"value": "win"
}, {
"source": 1,
"target": 45,
"value": "loss"
}, {
"source": 1,
"target": 47,
"value": "loss"
}, {
"source": 1,
"target": 48,
"value": "win"
}, {
"source": 1,
"target": 50,
"value": "win"
}, {
"source": 1,
"target": 53,
"value": "win"
}, {
"source": 1,
"target": 54,
"value": "win"
}, {
"source": 1,
"target": 55,
"value": "win"
}, {
"source": 1,
"target": 58,
"value": "win"
}, {
"source": 2,
"target": 21,
"value": "loss"
}, {
"source": 2,
"target": 28,
"value": "win"
}, {
"source": 2,
"target": 58,
"value": "win"
}, {
"source": 3,
"target": 9,
"value": "win"
}, {
"source": 3,
"target": 16,
"value": "win"
}, {
"source": 3,
"target": 21,
"value": "win"
}, {
"source": 3,
"target": 28,
"value": "win"
}, {
"source": 3,
"target": 39,
"value": "win"
}, {
"source": 3,
"target": 45,
"value": "loss"
}, {
"source": 3,
"target": 58,
"value": "win"
}, {
"source": 4,
"target": 0,
"value": "win"
}, {
"source": 4,
"target": 5,
"value": "win"
}, {
"source": 4,
"target": 6,
"value": "win"
}, {
"source": 4,
"target": 25,
"value": "win"
}, {
"source": 4,
"target": 33,
"value": "win"
}, {
"source": 4,
"target": 38,
"value": "win"
}, {
"source": 4,
"target": 45,
"value": "win"
}, {
"source": 4,
"target": 47,
"value": "win"
}, {
"source": 5,
"target": 4,
"value": "win"
}, {
"source": 5,
"target": 49,
"value": "win"
}, {
"source": 5,
"target": 20,
"value": "win"
}, {
"source": 5,
"target": 21,
"value": "loss"
}, {
"source": 5,
"target": 32,
"value": "win"
}, {
"source": 5,
"target": 39,
"value": "loss"
}, {
"source": 5,
"target": 58,
"value": "loss"
}, {
"source": 6,
"target": 4,
"value": "win"
}, {
"source": 6,
"target": 7,
"value": "loss"
}, {
"source": 6,
"target": 23,
"value": "win"
}, {
"source": 6,
"target": 57,
"value": "win"
}, {
"source": 7,
"target": 6,
"value": "loss"
}, {
"source": 7,
"target": 21,
"value": "loss"
}, {
"source": 7,
"target": 28,
"value": "win"
}, {
"source": 7,
"target": 36,
"value": "loss"
}, {
"source": 7,
"target": 37,
"value": "loss"
}, {
"source": 7,
"target": 39,
"value": "loss"
}, {
"source": 7,
"target": 45,
"value": "win"
}, {
"source": 7,
"target": 47,
"value": "loss"
}, {
"source": 7,
"target": 38,
"value": "win"
}, {
"source": 8,
"target": 21,
"value": "win"
}, {
"source": 8,
"target": 25,
"value": "loss"
}, {
"source": 8,
"target": 28,
"value": "win"
}, {
"source": 8,
"target": 37,
"value": "win"
}, {
"source": 8,
"target": 39,
"value": "win"
}, {
"source": 8,
"target": 51,
"value": "win"
}, {
"source": 8,
"target": 55,
"value": "win"
}, {
"source": 8,
"target": 56,
"value": "win"
}, {
"source": 8,
"target": 58,
"value": "win"
}, {
"source": 9,
"target": 3,
"value": "win"
}, {
"source": 9,
"target": 39,
"value": "win"
}, {
"source": 9,
"target": 45,
"value": "loss"
}, {
"source": 10,
"target": 11,
"value": "win"
}, {
"source": 10,
"target": 21,
"value": "win"
}, {
"source": 10,
"target": 39,
"value": "win"
}, {
"source": 10,
"target": 58,
"value": "win"
}, {
"source": 10,
"target": 59,
"value": "win"
}, {
"source": 11,
"target": 1,
"value": "win"
}, {
"source": 11,
"target": 10,
"value": "win"
}, {
"source": 11,
"target": 13,
"value": "loss"
}, {
"source": 11,
"target": 14,
"value": "loss"
}, {
"source": 11,
"target": 21,
"value": "win"
}, {
"source": 11,
"target": 22,
"value": "win"
}, {
"source": 11,
"target": 25,
"value": "loss"
}, {
"source": 11,
"target": 31,
"value": "win"
}, {
"source": 11,
"target": 36,
"value": "win"
}, {
"source": 11,
"target": 36,
"value": "win"
}, {
"source": 11,
"target": 37,
"value": "win"
}, {
"source": 11,
"target": 38,
"value": "loss"
}, {
"source": 11,
"target": 39,
"value": "win"
}, {
"source": 11,
"target": 40,
"value": "win"
}, {
"source": 11,
"target": 41,
"value": "win"
}, {
"source": 11,
"target": 42,
"value": "loss"
}, {
"source": 11,
"target": 45,
"value": "loss"
}, {
"source": 11,
"target": 46,
"value": "loss"
}, {
"source": 11,
"target": 47,
"value": "win"
}, {
"source": 11,
"target": 49,
"value": "loss"
}, {
"source": 11,
"target": 49,
"value": "loss"
}, {
"source": 11,
"target": 50,
"value": "win"
}, {
"source": 11,
"target": 51,
"value": "win"
}, {
"source": 11,
"target": 52,
"value": "win"
}, {
"source": 11,
"target": 53,
"value": "win"
}, {
"source": 11,
"target": 54,
"value": "win"
}, {
"source": 11,
"target": 55,
"value": "win"
}, {
"source": 11,
"target": 56,
"value": "win"
}, {
"source": 11,
"target": 57,
"value": "win"
}, {
"source": 11,
"target": 58,
"value": "win"
}, {
"source": 12,
"target": 12,
"value": "win"
}, {
"source": 12,
"target": 14,
"value": "win"
}, {
"source": 12,
"target": 39,
"value": "loss"
}, {
"source": 12,
"target": 22,
"value": "loss"
}, {
"source": 13,
"target": 11,
"value": "loss"
}, {
"source": 13,
"target": 12,
"value": "win"
}, {
"source": 13,
"target": 13,
"value": "win"
}, {
"source": 13,
"target": 39,
"value": "loss"
}, {
"source": 13,
"target": 41,
"value": "loss"
}, {
"source": 14,
"target": 11,
"value": "loss"
}, {
"source": 14,
"target": 12,
"value": "win"
}, {
"source": 14,
"target": 13,
"value": "win"
}, {
"source": 14,
"target": 39,
"value": "loss"
}, {
"source": 15,
"target": 1,
"value": "loss"
}, {
"source": 15,
"target": 11,
"value": "win"
}, {
"source": 15,
"target": 22,
"value": "loss"
}, {
"source": 15,
"target": 36,
"value": "loss"
}, {
"source": 15,
"target": 38,
"value": "loss"
}, {
"source": 15,
"target": 39,
"value": "loss"
}, {
"source": 15,
"target": 40,
"value": "loss"
}, {
"source": 15,
"target": 47,
"value": "win"
}, {
"source": 15,
"target": 49,
"value": "win"
}, {
"source": 15,
"target": 53,
"value": "loss"
}, {
"source": 15,
"target": 54,
"value": "loss"
}, {
"source": 16,
"target": 2,
"value": "win"
}, {
"source": 16,
"target": 3,
"value": "win"
}, {
"source": 16,
"target": 21,
"value": "win"
}, {
"source": 16,
"target": 28,
"value": "win"
}, {
"source": 16,
"target": 29,
"value": "win"
}, {
"source": 16,
"target": 39,
"value": "win"
}, {
"source": 16,
"target": 55,
"value": "win"
}, {
"source": 16,
"target": 58,
"value": "win"
}, {
"source": 17,
"target": 11,
"value": "win"
}, {
"source": 18,
"target": 11,
"value": "loss"
}, {
"source": 18,
"target": 33,
"value": "win"
}, {
"source": 18,
"target": 39,
"value": "loss"
}, {
"source": 18,
"target": 49,
"value": "win"
}, {
"source": 18,
"target": 50,
"value": "loss"
}, {
"source": 18,
"target": 57,
"value": "win"
}, {
"source": 19,
"target": 4,
"value": "win"
}, {
"source": 19,
"target": 20,
"value": "win"
}, {
"source": 19,
"target": 45,
"value": "win"
}, {
"source": 20,
"target": 19,
"value": "win"
}, {
"source": 20,
"target": 5,
"value": "win"
}, {
"source": 20,
"target": 32,
"value": "win"
}, {
"source": 20,
"target": 39,
"value": "loss"
}, {
"source": 20,
"target": 45,
"value": "win"
}, {
"source": 21,
"target": 39,
"value": "win"
}, {
"source": 21,
"target": 58,
"value": "win"
}, {
"source": 21,
"target": 54,
"value": "win"
}, {
"source": 21,
"target": 56,
"value": "win"
}, {
"source": 21,
"target": 47,
"value": "win"
}, {
"source": 21,
"target": 29,
"value": "win"
}, {
"source": 21,
"target": 28,
"value": "win"
}, {
"source": 21,
"target": 45,
"value": "loss"
}, {
"source": 21,
"target": 38,
"value": "loss"
}, {
"source": 21,
"target": 32,
"value": "loss"
}, {
"source": 21,
"target": 15,
"value": "loss"
}, {
"source": 21,
"target": 20,
"value": "loss"
}, {
"source": 22,
"target": 45,
"value": "loss"
}, {
"source": 22,
"target": 60,
"value": "win"
}, {
"source": 22,
"target": 63,
"value": "win"
}, {
"source": 22,
"target": 64,
"value": "win"
}, {
"source": 22,
"target": 58,
"value": "win"
}, {
"source": 22,
"target": 21,
"value": "win"
}, {
"source": 22,
"target": 47,
"value": "win"
}, {
"source": 22,
"target": 39,
"value": "win"
}, {
"source": 22,
"target": 28,
"value": "win"
}, {
"source": 22,
"target": 35,
"value": "win"
}, {
"source": 22,
"target": 36,
"value": "win"
}, {
"source": 22,
"target": 11,
"value": "win"
}, {
"source": 23,
"target": 45,
"value": "loss"
}, {
"source": 23,
"target": 24,
"value": "win"
}, {
"source": 24,
"target": 23,
"value": "win"
}, {
"source": 24,
"target": 39,
"value": "win"
}, {
"source": 24,
"target": 8,
"value": "win"
}, {
"source": 24,
"target": 9,
"value": "win"
}, {
"source": 24,
"target": 21,
"value": "win"
}, {
"source": 25,
"target": 45,
"value": "win"
}, {
"source": 25,
"target": 33,
"value": "win"
}, {
"source": 25,
"target": 34,
"value": "win"
}, {
"source": 25,
"target": 1,
"value": "loss"
}, {
"source": 25,
"target": 39,
"value": "loss"
}, {
"source": 25,
"target": 48,
"value": "loss"
}, {
"source": 25,
"target": 56,
"value": "loss"
}, {
"source": 25,
"target": 59,
"value": "loss"
}, {
"source": 26,
"target": 27,
"value": "win"
}, {
"source": 26,
"target": 27,
"value": "win"
}, {
"source": 26,
"target": 28,
"value": "win"
}, {
"source": 27,
"target": 26,
"value": "win"
}, {
"source": 27,
"target": 45,
"value": "loss"
}, {
"source": 27,
"target": 28,
"value": "win"
}, {
"source": 28,
"target": 39,
"value": "win"
}, {
"source": 28,
"target": 45,
"value": "loss"
}, {
"source": 28,
"target": 21,
"value": "win"
}, {
"source": 28,
"target": 58,
"value": "win"
}, {
"source": 28,
"target": 29,
"value": "win"
}, {
"source": 28,
"target": 32,
"value": "loss"
}, {
"source": 29,
"target": 28,
"value": "win"
}, {
"source": 29,
"target": 39,
"value": "win"
}, {
"source": 29,
"target": 21,
"value": "win"
}, {
"source": 29,
"target": 58,
"value": "win"
}, {
"source": 30,
"target": 29,
"value": "win"
}, {
"source": 31,
"target": 38,
"value": "loss"
}, {
"source": 31,
"target": 45,
"value": "loss"
}, {
"source": 31,
"target": 40,
"value": "win"
}, {
"source": 31,
"target": 1,
"value": "win"
}, {
"source": 31,
"target": 48,
"value": "win"
}, {
"source": 31,
"target": 39,
"value": "win"
}, {
"source": 31,
"target": 36,
"value": "win"
}, {
"source": 32,
"target": 5,
"value": "win"
}, {
"source": 32,
"target": 20,
"value": "win"
}, {
"source": 32,
"target": 33,
"value": "win"
}, {
"source": 32,
"target": 34,
"value": "win"
}, {
"source": 32,
"target": 39,
"value": "loss"
}, {
"source": 32,
"target": 21,
"value": "loss"
}, {
"source": 32,
"target": 58,
"value": "loss"
}, {
"source": 33,
"target": 32,
"value": "win"
}, {
"source": 33,
"target": 34,
"value": "win"
}, {
"source": 33,
"target": 45,
"value": "win"
}, {
"source": 33,
"target": 39,
"value": "loss"
}, {
"source": 33,
"target": 59,
"value": "loss"
}, {
"source": 34,
"target": 33,
"value": "win"
}, {
"source": 34,
"target": 45,
"value": "win"
}, {
"source": 34,
"target": 25,
"value": "win"
}, {
"source": 35,
"target": 22,
"value": "win"
}, {
"source": 35,
"target": 8,
"value": "win"
}, {
"source": 35,
"target": 11,
"value": "win"
}, {
"source": 35,
"target": 23,
"value": "win"
}, {
"source": 36,
"target": 15,
"value": "win"
}, {
"source": 36,
"target": 22,
"value": "win"
}, {
"source": 36,
"target": 49,
"value": "loss"
}, {
"source": 36,
"target": 45,
"value": "loss"
}, {
"source": 36,
"target": 11,
"value": "win"
}, {
"source": 36,
"target": 39,
"value": "win"
}, {
"source": 39,
"target": 36,
"value": "win"
}, {
"source": 36,
"target": 21,
"value": "win"
}, {
"source": 21,
"target": 36,
"value": "win"
}, {
"source": 36,
"target": 58,
"value": "win"
}, {
"source": 58,
"target": 36,
"value": "win"
}, {
"source": 36,
"target": 45,
"value": "loss"
}, {
"source": 45,
"target": 36,
"value": "loss"
}, {
"source": 36,
"target": 11,
"value": "win"
}, {
"source": 11,
"target": 36,
"value": "win"
}, {
"source": 37,
"target": 39,
"value": "win"
}, {
"source": 37,
"target": 50,
"value": "win"
}, {
"source": 37,
"target": 56,
"value": "win"
}, {
"source": 39,
"target": 37,
"value": "win"
}, {
"source": 39,
"target": 45,
"value": "loss"
}, {
"source": 37,
"target": 21,
"value": "win"
}, {
"source": 21,
"target": 37,
"value": "win"
}, {
"source": 37,
"target": 21,
"value": "win"
}, {
"source": 21,
"target": 37,
"value": "win"
}, {
"source": 37,
"target": 7,
"value": "loss"
}, {
"source": 7,
"target": 37,
"value": "loss"
}, {
"source": 37,
"target": 11,
"value": "win"
}, {
"source": 11,
"target": 37,
"value": "win"
}, {
"source": 37,
"target": 45,
"value": "loss"
}, {
"source": 45,
"target": 37,
"value": "loss"
}, {
"source": 38,
"target": 1,
"value": "loss"
}, {
"source": 1,
"target": 38,
"value": "loss"
}, {
"source": 38,
"target": 40,
"value": "loss"
}, {
"source": 40,
"target": 38,
"value": "loss"
}, {
"source": 38,
"target": 41,
"value": "loss"
}, {
"source": 41,
"target": 38,
"value": "loss"
}, {
"source": 41,
"target": 39,
"value": "win"
}, {
"source": 38,
"target": 45,
"value": "win"
}, {
"source": 45,
"target": 38,
"value": "win"
}, {
"source": 38,
"target": 39,
"value": "loss"
}, {
"source": 39,
"target": 38,
"value": "loss"
}, {
"source": 40,
"target": 39,
"value": "win"
}, {
"source": 39,
"target": 40,
"value": "win"
}, {
"source": 40,
"target": 31,
"value": "win"
}, {
"source": 31,
"target": 40,
"value": "win"
}, {
"source": 40,
"target": 1,
"value": "win"
}, {
"source": 1,
"target": 40,
"value": "win"
}, {
"source": 40,
"target": 38,
"value": "loss"
}, {
"source": 38,
"target": 40,
"value": "loss"
}, {
"source": 40,
"target": 45,
"value": "loss"
}, {
"source": 45,
"target": 40,
"value": "loss"
}, {
"source": 40,
"target": 41,
"value": "win"
}, {
"source": 41,
"target": 40,
"value": "win"
}, {
"source": 41,
"target": 45,
"value": "loss"
}, {
"source": 45,
"target": 41,
"value": "loss"
}, {
"source": 41,
"target": 47,
"value": "win"
}, {
"source": 47,
"target": 41,
"value": "win"
}, {
"source": 42,
"target": 39,
"value": "loss"
}, {
"source": 39,
"target": 42,
"value": "loss"
}, {
"source": 42,
"target": 21,
"value": "loss"
}, {
"source": 21,
"target": 42,
"value": "loss"
}, {
"source": 42,
"target": 21,
"value": "loss"
}, {
"source": 21,
"target": 42,
"value": "loss"
}, {
"source": 42,
"target": 11,
"value": "loss"
}, {
"source": 11,
"target": 42,
"value": "loss"
}, {
"source": 42,
"target": 45,
"value": "loss"
}, {
"source": 45,
"target": 42,
"value": "loss"
}, {
"source": 43,
"target": 45,
"value": "loss"
}, {
"source": 43,
"target": 43,
"value": "loss"
}, {
"source": 43,
"target": 44,
"value": "win"
}, {
"source": 44,
"target": 43,
"value": "win"
}, {
"source": 44,
"target": 45,
"value": "loss"
}, {
"source": 43,
"target": 45,
"value": "loss"
}, {
"source": 45,
"target": 43,
"value": "loss"
}, {
"source": 46,
"target": 39,
"value": "loss"
}, {
"source": 39,
"target": 46,
"value": "loss"
}, {
"source": 46,
"target": 11,
"value": "loss"
}, {
"source": 11,
"target": 46,
"value": "loss"
}, {
"source": 47,
"target": 39,
"value": "win"
}, {
"source": 39,
"target": 47,
"value": "win"
}, {
"source": 47,
"target": 21,
"value": "win"
}, {
"source": 21,
"target": 47,
"value": "win"
}, {
"source": 47,
"target": 21,
"value": "win"
}, {
"source": 21,
"target": 47,
"value": "win"
}, {
"source": 42,
"target": 11,
"value": "win"
}, {
"source": 11,
"target": 42,
"value": "win"
}, {
"source": 47,
"target": 41,
"value": "win"
}, {
"source": 41,
"target": 47,
"value": "win"
}, {
"source": 47,
"target": 45,
"value": "loss"
}, {
"source": 45,
"target": 47,
"value": "loss"
}, {
"source": 48,
"target": 31,
"value": "win"
}, {
"source": 48,
"target": 45,
"value": "loss"
}, {
"source": 31,
"target": 48,
"value": "win"
}, {
"source": 49,
"target": 39,
"value": "loss"
}, {
"source": 39,
"target": 49,
"value": "loss"
}, {
"source": 49,
"target": 21,
"value": "loss"
}, {
"source": 21,
"target": 49,
"value": "loss"
}, {
"source": 49,
"target": 21,
"value": "loss"
}, {
"source": 21,
"target": 49,
"value": "loss"
}, {
"source": 49,
"target": 11,
"value": "loss"
}, {
"source": 11,
"target": 49,
"value": "loss"
}, {
"source": 49,
"target": 18,
"value": "win"
}, {
"source": 18,
"target": 49,
"value": "win"
}, {
"source": 50,
"target": 21,
"value": "win"
}, {
"source": 50,
"target": 1,
"value": "win"
}, {
"source": 50,
"target": 11,
"value": "win"
}, {
"source": 50,
"target": 33,
"value": "loss"
}, {
"source": 50,
"target": 39,
"value": "win"
}, {
"source": 21,
"target": 50,
"value": "win"
}, {
"source": 50,
"target": 51,
"value": "win"
}, {
"source": 51,
"target": 50,
"value": "win"
}, {
"source": 50,
"target": 52,
"value": "win"
}, {
"source": 52,
"target": 50,
"value": "win"
}, {
"source": 50,
"target": 53,
"value": "win"
}, {
"source": 53,
"target": 50,
"value": "win"
}, {
"source": 50,
"target": 54,
"value": "win"
}, {
"source": 54,
"target": 50,
"value": "win"
}, {
"source": 50,
"target": 54,
"value": "win"
}, {
"source": 54,
"target": 50,
"value": "win"
}, {
"source": 50,
"target": 55,
"value": "win"
}, {
"source": 55,
"target": 50,
"value": "win"
}, {
"source": 50,
"target": 57,
"value": "win"
}, {
"source": 57,
"target": 50,
"value": "win"
}, {
"source": 51,
"target": 39,
"value": "win"
}, {
"source": 51,
"target": 45,
"value": "loss"
}, {
"source": 51,
"target": 21,
"value": "win"
}, {
"source": 21,
"target": 51,
"value": "win"
}, {
"source": 50,
"target": 51,
"value": "win"
}, {
"source": 51,
"target": 50,
"value": "win"
}, {
"source": 51,
"target": 52,
"value": "win"
}, {
"source": 52,
"target": 51,
"value": "win"
}, {
"source": 51,
"target": 53,
"value": "win"
}, {
"source": 53,
"target": 51,
"value": "win"
}, {
"source": 51,
"target": 54,
"value": "win"
}, {
"source": 54,
"target": 51,
"value": "win"
}, {
"source": 51,
"target": 54,
"value": "win"
}, {
"source": 54,
"target": 51,
"value": "win"
}, {
"source": 51,
"target": 55,
"value": "win"
}, {
"source": 55,
"target": 51,
"value": "win"
}, {
"source": 51,
"target": 57,
"value": "win"
}, {
"source": 57,
"target": 51,
"value": "win"
}, {
"source": 52,
"target": 21,
"value": "win"
}, {
"source": 52,
"target": 39,
"value": "win"
}, {
"source": 21,
"target": 52,
"value": "win"
}, {
"source": 50,
"target": 52,
"value": "win"
}, {
"source": 52,
"target": 50,
"value": "win"
}, {
"source": 52,
"target": 53,
"value": "win"
}, {
"source": 53,
"target": 52,
"value": "win"
}, {
"source": 52,
"target": 54,
"value": "win"
}, {
"source": 54,
"target": 52,
"value": "win"
}, {
"source": 52,
"target": 54,
"value": "win"
}, {
"source": 52,
"target": 45,
"value": "loss"
}, {
"source": 54,
"target": 52,
"value": "win"
}, {
"source": 52,
"target": 55,
"value": "win"
}, {
"source": 55,
"target": 52,
"value": "win"
}, {
"source": 52,
"target": 57,
"value": "win"
}, {
"source": 57,
"target": 52,
"value": "win"
}, {
"source": 53,
"target": 21,
"value": "win"
}, {
"source": 53,
"target": 31,
"value": "win"
}, {
"source": 53,
"target": 38,
"value": "loss"
}, {
"source": 53,
"target": 39,
"value": "win"
}, {
"source": 53,
"target": 45,
"value": "loss"
}, {
"source": 53,
"target": 47,
"value": "win"
}, {
"source": 53,
"target": 50,
"value": "win"
}, {
"source": 53,
"target": 51,
"value": "win"
}, {
"source": 53,
"target": 52,
"value": "win"
}, {
"source": 53,
"target": 54,
"value": "win"
}, {
"source": 53,
"target": 55,
"value": "win"
}, {
"source": 53,
"target": 56,
"value": "win"
}, {
"source": 53,
"target": 57,
"value": "win"
}, {
"source": 53,
"target": 58,
"value": "win"
}, {
"source": 54,
"target": 21,
"value": "win"
}, {
"source": 54,
"target": 31,
"value": "win"
}, {
"source": 54,
"target": 38,
"value": "loss"
}, {
"source": 54,
"target": 39,
"value": "win"
}, {
"source": 54,
"target": 45,
"value": "loss"
}, {
"source": 54,
"target": 47,
"value": "win"
}, {
"source": 54,
"target": 50,
"value": "win"
}, {
"source": 54,
"target": 51,
"value": "win"
}, {
"source": 54,
"target": 52,
"value": "win"
}, {
"source": 54,
"target": 53,
"value": "win"
}, {
"source": 54,
"target": 55,
"value": "win"
}, {
"source": 54,
"target": 56,
"value": "win"
}, {
"source": 54,
"target": 57,
"value": "win"
}, {
"source": 54,
"target": 58,
"value": "win"
}, {
"source": 55,
"target": 21,
"value": "win"
}, {
"source": 55,
"target": 31,
"value": "win"
}, {
"source": 55,
"target": 38,
"value": "loss"
}, {
"source": 55,
"target": 39,
"value": "win"
}, {
"source": 55,
"target": 45,
"value": "loss"
}, {
"source": 55,
"target": 47,
"value": "win"
}, {
"source": 55,
"target": 50,
"value": "win"
}, {
"source": 55,
"target": 51,
"value": "win"
}, {
"source": 55,
"target": 52,
"value": "win"
}, {
"source": 55,
"target": 54,
"value": "win"
}, {
"source": 55,
"target": 53,
"value": "win"
}, {
"source": 55,
"target": 56,
"value": "win"
}, {
"source": 55,
"target": 57,
"value": "win"
}, {
"source": 55,
"target": 57,
"value": "win"
}, {
"source": 55,
"target": 58,
"value": "win"
}, {
"source": 56,
"target": 1,
"value": "win"
}, {
"source": 56,
"target": 11,
"value": "win"
}, {
"source": 56,
"target": 21,
"value": "win"
}, {
"source": 56,
"target": 33,
"value": "loss"
}, {
"source": 56,
"target": 39,
"value": "win"
}, {
"source": 56,
"target": 45,
"value": "loss"
}, {
"source": 56,
"target": 50,
"value": "win"
}, {
"source": 56,
"target": 51,
"value": "win"
}, {
"source": 56,
"target": 52,
"value": "win"
}, {
"source": 56,
"target": 53,
"value": "win"
}, {
"source": 56,
"target": 54,
"value": "win"
}, {
"source": 56,
"target": 55,
"value": "win"
}, {
"source": 56,
"target": 57,
"value": "win"
}, {
"source": 56,
"target": 58,
"value": "win"
}, {
"source": 57,
"target": 50,
"value": "win"
}, {
"source": 57,
"target": 51,
"value": "win"
}, {
"source": 57,
"target": 52,
"value": "win"
}, {
"source": 57,
"target": 53,
"value": "win"
}, {
"source": 57,
"target": 54,
"value": "win"
}, {
"source": 57,
"target": 55,
"value": "win"
}, {
"source": 57,
"target": 56,
"value": "win"
}, {
"source": 57,
"target": 58,
"value": "win"
}, {
"source": 58,
"target": 1,
"value": "win"
}, {
"source": 58,
"target": 8,
"value": "win"
}, {
"source": 58,
"target": 11,
"value": "win"
}, {
"source": 58,
"target": 15,
"value": "loss"
}, {
"source": 58,
"target": 16,
"value": "win"
}, {
"source": 58,
"target": 20,
"value": "loss"
}, {
"source": 58,
"target": 21,
"value": "win"
}, {
"source": 58,
"target": 22,
"value": "win"
}, {
"source": 58,
"target": 25,
"value": "loss"
}, {
"source": 58,
"target": 28,
"value": "win"
}, {
"source": 58,
"target": 29,
"value": "win"
}, {
"source": 58,
"target": 31,
"value": "win"
}, {
"source": 58,
"target": 32,
"value": "loss"
}, {
"source": 58,
"target": 33,
"value": "loss"
}, {
"source": 58,
"target": 36,
"value": "win"
}, {
"source": 58,
"target": 37,
"value": "win"
}, {
"source": 58,
"target": 38,
"value": "loss"
}, {
"source": 58,
"target": 39,
"value": "win"
}, {
"source": 58,
"target": 45,
"value": "loss"
}, {
"source": 58,
"target": 47,
"value": "win"
}, {
"source": 58,
"target": 49,
"value": "loss"
}, {
"source": 58,
"target": 50,
"value": "win"
}, {
"source": 58,
"target": 51,
"value": "win"
}, {
"source": 58,
"target": 52,
"value": "win"
}, {
"source": 58,
"target": 53,
"value": "win"
}, {
"source": 58,
"target": 54,
"value": "win"
}, {
"source": 58,
"target": 55,
"value": "win"
}, {
"source": 58,
"target": 56,
"value": "win"
}, {
"source": 58,
"target": 57,
"value": "win"
}, {
"source": 58,
"target": 59,
"value": "win"
}, {
"source": 58,
"target": 60,
"value": "loss"
}, {
"source": 58,
"target": 63,
"value": "loss"
}, {
"source": 58,
"target": 64,
"value": "win"
}, {
"source": 59,
"target": 21,
"value": "win"
}, {
"source": 59,
"target": 25,
"value": "loss"
}, {
"source": 59,
"target": 32,
"value": "loss"
}, {
"source": 59,
"target": 33,
"value": "loss"
}, {
"source": 59,
"target": 39,
"value": "win"
}, {
"source": 59,
"target": 58,
"value": "win"
}, {
"source": 60,
"target": 21,
"value": "loss"
}, {
"source": 60,
"target": 22,
"value": "win"
}, {
"source": 60,
"target": 39,
"value": "loss"
}, {
"source": 60,
"target": 58,
"value": "loss"
}, {
"source": 61,
"target": 39,
"value": "win"
}, {
"source": 62,
"target": 39,
"value": "win"
}, {
"source": 63,
"target": 21,
"value": "loss"
}, {
"source": 63,
"target": 22,
"value": "win"
}, {
"source": 63,
"target": 39,
"value": "loss"
}, {
"source": 63,
"target": 58,
"value": "loss"
}, {
"source": 64,
"target": 21,
"value": "win"
}, {
"source": 64,
"target": 22,
"value": "win"
}, {
"source": 64,
"target": 39,
"value": "win"
}, {
"source": 63,
"target": 58,
"value": "win"
}]
}
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.link {
fill: none;
stroke-width: 0.5px;
}
.link.win{
stroke: #a6d96a;
}
.link.loss{
stroke: #ca0020;
}
.node text {
pointer-events: none;
font: 10px sans-serif;
}
</style>
<body>
<script src="https://d3js.org/d3.v3.min.js"></script><script>
//Constants for the SVG
var width = 900,
height = 900;
//Set up the colour scale
var color = d3.scale.category10();
//Set up the force layout
var force = d3.layout.force()
.charge(-620)
.linkDistance(200)
.size([width, height]);
//Append a SVG to the body of the html page. Assign this SVG as an object to svg
var svg = d3.select("body").append("svg")
.attr("width", width)
.attr("height", height);
//Read the data from the mis element
d3.json("hp.json", function(error, graph) {
if (error) throw error;
//Creates the graph data structure out of the json data
force.nodes(graph.nodes)
.links(graph.links)
.start();
//Create all the line svgs but without locations yet
var link = svg.selectAll(".link")
.data(graph.links)
.enter().append("line")
.attr("class", "link")
.style("stroke-width", function(d) {
return Math.sqrt(d.value);
});
//Do the same with the circles for the nodes - no
//Changed
var radiusScale = d3.scale.linear()
var node = svg.selectAll(".node")
.data(graph.nodes)
.enter().append("g")
.attr("class", "node")
.call(force.drag);
node.append("circle")
// .attr("r", 8)
.style("fill", function(d) {
return color(d.group)
})
.attr('r', function(d) {
d.radius = radiusScale(d.count);
return d.radius;
});
node.append("text")
.attr("dx", 10)
.attr("dy", ".35em")
.text(function(d) {
return d.name
});
//End changed
node.on("mouseover", function (d) {
var highlightedNodes = {};
link.style('stroke-width', function(l) {
if (d === l.source || d === l.target){
highlightedNodes[l.source.name] = 1;
highlightedNodes[l.target.name] = 1;
return 2;
}
return 0;
})
});
//Now we are giving the SVGs co-ordinates - the force layout is generating the co-ordinates which this code is using to update the attributes of the SVG elements
force.on("tick", function() {
link.attr("x1", function(d) {
return d.source.x;
})
.attr("y1", function(d) {
return d.source.y;
})
.attr("x2", function(d) {
return d.target.x;
})
.attr("y2", function(d) {
return d.target.y;
});
link.attr("class", function(d) { return "link "+ d.value});
//Changed
d3.selectAll("circle").attr("cx", function(d) {
return d.x;
})
.attr("cy", function(d) {
return d.y;
});
d3.selectAll("text").attr("x", function(d) {
return d.x;
})
.attr("y", function(d) {
return d.y;
});
//End Changed
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment