Skip to content

Instantly share code, notes, and snippets.

@bbengfort
Created October 16, 2013 13:27
Show Gist options
  • Save bbengfort/7007704 to your computer and use it in GitHub Desktop.
Save bbengfort/7007704 to your computer and use it in GitHub Desktop.
GraphSON and D3 JSON files for a Star Wars Graph
{
"nodes": [
{
"group": 5,
"type": "thing",
"name": "The Force"
},
{
"group": 1,
"type": "sith lord",
"name": "Darth Vader"
},
{
"group": 1,
"type": "princess",
"name": "Leia Organa"
},
{
"group": 1,
"type": "jedi",
"name": "Luke Skywalker"
},
{
"group": 1,
"name": "Obi Wan Kenobi",
"nickname": "Ben",
"type": "jedi"
},
{
"group": 1,
"name": "R2D2",
"type": "droid",
"specialization": "navigation"
},
{
"group": 1,
"name": "C3PO",
"type": "droid",
"specialization": "human cyborg relations"
},
{
"group": 1,
"type": "smuggler",
"name": "Han Solo"
},
{
"group": 1,
"type": "bounty hunter",
"name": "Greedo"
},
{
"group": 1,
"type": "crime lord",
"name": "Jabba the Hutt"
},
{
"group": 1,
"type": "smuggler",
"name": "Chewbacca"
},
{
"group": 1,
"type": "pilot",
"name": "Biggs Darklighter"
},
{
"group": 1,
"type": "pilot",
"name": "Jek Tono Porkins"
},
{
"group": 1,
"type": "pilot",
"name": "Wedge Antilles"
},
{
"group": 1,
"type": "imperial",
"name": "Grand Moff Tarkin"
},
{
"group": 4,
"type": "star fighter",
"name": "TIE Advanced x1"
},
{
"group": 4,
"type": "freighter",
"name": "Millenium Falcon"
},
{
"group": 4,
"type": "star fighter",
"name": "X-wing Fighter"
},
{
"group": 2,
"type": "group",
"name": "Rebel Alliance"
},
{
"group": 2,
"type": "group",
"name": "Galactic Empire"
},
{
"group": 2,
"type": "group",
"name": "Red Squadron"
},
{
"group": 3,
"type": "location",
"name": "Death Star"
},
{
"group": 3,
"type": "planet",
"name": "Alderaan"
},
{
"group": 3,
"type": "moon",
"name": "Yavin IV"
},
{
"group": 3,
"type": "planet",
"name": "Tatooine"
},
{
"group": 5,
"type": "thing",
"name": "Technical Schematics"
}
],
"links": [
{
"source": 1,
"target": 0,
"value": 1,
"label": "uses"
},
{
"source": 3,
"target": 0,
"value": 1,
"label": "uses"
},
{
"source": 4,
"target": 0,
"value": 1,
"label": "uses"
},
{
"source": 1,
"target": 4,
"value": 1,
"label": "kills"
},
{
"source": 2,
"target": 1,
"value": 1,
"label": "father"
},
{
"source": 3,
"target": 1,
"value": 1,
"label": "father"
},
{
"source": 1,
"target": 15,
"value": 1,
"label": "flies"
},
{
"source": 1,
"target": 19,
"value": 1,
"label": "member"
},
{
"source": 1,
"target": 21,
"value": 1,
"label": "stationed"
},
{
"source": 4,
"target": 1,
"value": 1,
"label": "trains"
},
{
"source": 21,
"target": 22,
"value": 1,
"label": "destroys"
},
{
"source": 14,
"target": 21,
"value": 1,
"label": "commands"
},
{
"source": 25,
"target": 21,
"value": 1,
"label": "describe"
},
{
"source": 3,
"target": 21,
"value": 1,
"label": "destroys"
},
{
"source": 2,
"target": 22,
"value": 1,
"label": "lives"
},
{
"source": 14,
"target": 22,
"reason": "to crush rebellion",
"value": 1,
"label": "harms"
},
{
"source": 14,
"target": 25,
"value": 1,
"label": "searching"
},
{
"source": 14,
"target": 19,
"value": 1,
"label": "member"
},
{
"source": 5,
"target": 25,
"value": 1,
"label": "stores"
},
{
"source": 2,
"target": 25,
"value": 1,
"label": "smuggling"
},
{
"source": 3,
"target": 25,
"method": "accidentally during droid cleaning",
"value": 1,
"label": "discovers"
},
{
"source": 2,
"target": 3,
"value": 1,
"label": "brother"
},
{
"source": 2,
"target": 7,
"reason": "smoldering chemistry",
"value": 1,
"label": "hates"
},
{
"source": 2,
"target": 18,
"value": 1,
"label": "member"
},
{
"source": 2,
"target": 5,
"reason": "message in a droid",
"value": 1,
"label": "uses"
},
{
"source": 5,
"target": 6,
"value": 1,
"label": "friends"
},
{
"source": 6,
"target": 5,
"value": 1,
"label": "friends"
},
{
"source": 3,
"target": 2,
"value": 1,
"label": "sister"
},
{
"source": 3,
"target": 5,
"value": 1,
"label": "owns"
},
{
"source": 3,
"target": 6,
"value": 1,
"label": "owns"
},
{
"source": 3,
"target": 18,
"value": 1,
"label": "member"
},
{
"source": 3,
"target": 20,
"value": 1,
"label": "member"
},
{
"source": 3,
"target": 11,
"value": 1,
"label": "friends"
},
{
"source": 3,
"target": 24,
"value": 1,
"label": "lives"
},
{
"source": 4,
"target": 3,
"value": 1,
"label": "trains"
},
{
"source": 4,
"target": 18,
"value": 1,
"label": "member"
},
{
"source": 4,
"target": 24,
"value": 1,
"label": "lives"
},
{
"source": 18,
"target": 23,
"value": 1,
"label": "based"
},
{
"source": 11,
"target": 3,
"value": 1,
"label": "friends"
},
{
"source": 11,
"target": 20,
"value": 1,
"label": "member"
},
{
"source": 11,
"target": 18,
"value": 1,
"label": "member"
},
{
"source": 12,
"target": 18,
"value": 1,
"label": "member"
},
{
"source": 12,
"target": 20,
"value": 1,
"label": "member"
},
{
"source": 13,
"target": 18,
"value": 1,
"label": "member"
},
{
"source": 13,
"target": 20,
"value": 1,
"label": "member"
},
{
"source": 20,
"target": 17,
"value": 1,
"label": "flies"
},
{
"source": 7,
"target": 2,
"reason": "smoldering chemistry",
"value": 1,
"label": "hates"
},
{
"source": 7,
"target": 15,
"value": 1,
"label": "damages"
},
{
"source": 7,
"target": 8,
"method": "shot first",
"value": 1,
"label": "kills"
},
{
"source": 7,
"target": 16,
"value": 1,
"label": "captains"
},
{
"source": 7,
"target": 10,
"value": 1,
"label": "friends"
},
{
"source": 9,
"target": 7,
"label": "wants",
"reason": "dumping cargo",
"value": 1,
"method": "bounty"
},
{
"source": 9,
"target": 24,
"value": 1,
"label": "lives"
},
{
"source": 10,
"target": 7,
"reason": "life debt",
"value": 1,
"label": "friends"
},
{
"source": 10,
"target": 16,
"value": 1,
"label": "flies"
}
]
}
{
"graph": {
"mode": "NORMAL",
"vertices": [
{"_id":1, "_type": "vertex", "name": "The Force", "type": "thing"},
{"_id":2, "_type": "vertex", "name": "Darth Vader", "type": "sith lord"},
{"_id":3, "_type": "vertex", "name": "Leia Organa", "type": "princess"},
{"_id":4, "_type": "vertex", "name": "Luke Skywalker", "type": "jedi"},
{"_id":5, "_type": "vertex", "name": "Obi Wan Kenobi", "type": "jedi", "nickname": "Ben"},
{"_id":6, "_type": "vertex", "name": "R2D2", "type": "droid", "specialization": "navigation"},
{"_id":7, "_type": "vertex", "name": "C3PO", "type": "droid", "specialization": "human cyborg relations"},
{"_id":8, "_type": "vertex", "name": "Han Solo", "type": "smuggler"},
{"_id":9, "_type": "vertex", "name": "Greedo", "type": "bounty hunter"},
{"_id":10, "_type": "vertex", "name": "Jabba the Hutt", "type": "crime lord"},
{"_id":11, "_type": "vertex", "name": "Chewbacca", "type": "smuggler"},
{"_id":12, "_type": "vertex", "name": "Biggs Darklighter", "type": "pilot"},
{"_id":13, "_type": "vertex", "name": "Jek Tono Porkins", "type": "pilot"},
{"_id":14, "_type": "vertex", "name": "Wedge Antilles", "type": "pilot"},
{"_id":15, "_type": "vertex", "name": "Grand Moff Tarkin", "type": "imperial"},
{"_id":16, "_type": "vertex", "name": "TIE Advanced x1", "type": "star fighter"},
{"_id":17, "_type": "vertex", "name": "Millenium Falcon", "type": "freighter"},
{"_id":18, "_type": "vertex", "name": "X-wing Fighter", "type": "star fighter"},
{"_id":19, "_type": "vertex", "name": "Rebel Alliance", "type": "group"},
{"_id":20, "_type": "vertex", "name": "Galactic Empire", "type": "group"},
{"_id":21, "_type": "vertex", "name": "Red Squadron", "type": "group"},
{"_id":22, "_type": "vertex", "name": "Death Star", "type": "location"},
{"_id":23, "_type": "vertex", "name": "Alderaan", "type": "planet"},
{"_id":24, "_type": "vertex", "name": "Yavin IV", "type": "moon"},
{"_id":25, "_type": "vertex", "name": "Tatooine", "type": "planet"},
{"_id":26, "_type": "vertex", "name": "Technical Schematics", "type": "thing"}
],
"edges": [
{"_id":101, "_type": "edge", "_outV":2, "_inV":1, "_label": "uses"},
{"_id":102, "_type": "edge", "_outV":4, "_inV":1, "_label": "uses"},
{"_id":103, "_type": "edge", "_outV":5, "_inV":1, "_label": "uses"},
{"_id":104, "_type": "edge", "_outV":2, "_inV":5, "_label": "kills"},
{"_id":105, "_type": "edge", "_outV":3, "_inV":2, "_label": "father"},
{"_id":106, "_type": "edge", "_outV":4, "_inV":2, "_label": "father"},
{"_id":107, "_type": "edge", "_outV":2, "_inV":16, "_label": "flies"},
{"_id":108, "_type": "edge", "_outV":2, "_inV":20, "_label": "member"},
{"_id":109, "_type": "edge", "_outV":2, "_inV":22, "_label": "stationed"},
{"_id":110, "_type": "edge", "_outV":5, "_inV":2, "_label": "trains"},
{"_id":111, "_type": "edge", "_outV":22, "_inV":23, "_label": "destroys"},
{"_id":112, "_type": "edge", "_outV":15, "_inV":22, "_label": "commands"},
{"_id":113, "_type": "edge", "_outV":26, "_inV":22, "_label": "describe"},
{"_id":114, "_type": "edge", "_outV":4, "_inV":22, "_label": "destroys"},
{"_id":115, "_type": "edge", "_outV":3, "_inV":23, "_label": "lives"},
{"_id":116, "_type": "edge", "_outV":15, "_inV":23, "_label": "harms", "reason":"to crush rebellion"},
{"_id":117, "_type": "edge", "_outV":15, "_inV":26, "_label": "searching"},
{"_id":118, "_type": "edge", "_outV":15, "_inV":20, "_label": "member"},
{"_id":119, "_type": "edge", "_outV":6, "_inV":26, "_label": "stores"},
{"_id":120, "_type": "edge", "_outV":3, "_inV":26, "_label": "smuggling"},
{"_id":121, "_type": "edge", "_outV":4, "_inV":26, "_label": "discovers", "method": "accidentally during droid cleaning"},
{"_id":122, "_type": "edge", "_outV":3, "_inV":4, "_label": "brother"},
{"_id":123, "_type": "edge", "_outV":3, "_inV":8, "_label": "hates", "reason": "smoldering chemistry"},
{"_id":124, "_type": "edge", "_outV":3, "_inV":19, "_label": "member"},
{"_id":125, "_type": "edge", "_outV":3, "_inV":6, "_label": "uses", "reason": "message in a droid"},
{"_id":126, "_type": "edge", "_outV":6, "_inV":7, "_label": "friends"},
{"_id":127, "_type": "edge", "_outV":7, "_inV":6, "_label": "friends"},
{"_id":128, "_type": "edge", "_outV":4, "_inV":3, "_label": "sister"},
{"_id":129, "_type": "edge", "_outV":4, "_inV":6, "_label": "owns"},
{"_id":130, "_type": "edge", "_outV":4, "_inV":7, "_label": "owns"},
{"_id":131, "_type": "edge", "_outV":4, "_inV":19, "_label": "member"},
{"_id":132, "_type": "edge", "_outV":4, "_inV":21, "_label": "member"},
{"_id":133, "_type": "edge", "_outV":4, "_inV":12, "_label": "friends"},
{"_id":134, "_type": "edge", "_outV":4, "_inV":25, "_label": "lives"},
{"_id":135, "_type": "edge", "_outV":5, "_inV":4, "_label": "trains"},
{"_id":136, "_type": "edge", "_outV":5, "_inV":19, "_label": "member"},
{"_id":137, "_type": "edge", "_outV":5, "_inV":25, "_label": "lives"},
{"_id":138, "_type": "edge", "_outV":19, "_inV":24, "_label": "based"},
{"_id":139, "_type": "edge", "_outV":12, "_inV":4, "_label": "friends"},
{"_id":140, "_type": "edge", "_outV":12, "_inV":21, "_label": "member"},
{"_id":141, "_type": "edge", "_outV":12, "_inV":19, "_label": "member"},
{"_id":142, "_type": "edge", "_outV":13, "_inV":19, "_label": "member"},
{"_id":143, "_type": "edge", "_outV":13, "_inV":21, "_label": "member"},
{"_id":144, "_type": "edge", "_outV":14, "_inV":19, "_label": "member"},
{"_id":145, "_type": "edge", "_outV":14, "_inV":21, "_label": "member"},
{"_id":146, "_type": "edge", "_outV":21, "_inV":18, "_label": "flies"},
{"_id":147, "_type": "edge", "_outV":8, "_inV":3, "_label": "hates", "reason": "smoldering chemistry"},
{"_id":148, "_type": "edge", "_outV":8, "_inV":16, "_label": "damages"},
{"_id":149, "_type": "edge", "_outV":8, "_inV":9, "_label": "kills", "method": "shot first"},
{"_id":150, "_type": "edge", "_outV":8, "_inV":17, "_label": "captains"},
{"_id":151, "_type": "edge", "_outV":8, "_inV":11, "_label": "friends"},
{"_id":152, "_type": "edge", "_outV":10, "_inV":8, "_label": "wants", "reason": "dumping cargo", "method": "bounty"},
{"_id":153, "_type": "edge", "_outV":10, "_inV":25, "_label": "lives"},
{"_id":154, "_type": "edge", "_outV":11, "_inV":8, "_label": "friends", "reason": "life debt"},
{"_id":155, "_type": "edge", "_outV":11, "_inV":17, "_label": "flies"}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment