Skip to content

Instantly share code, notes, and snippets.

@emeeks
Last active October 3, 2015 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save emeeks/2432083 to your computer and use it in GitHub Desktop.
Save emeeks/2432083 to your computer and use it in GitHub Desktop.
Force-Directed Layout with Append on Double-Click
function viz01() {
w = 960;
h = 600;
nodeHash = new Array();
var force = d3.layout.force()
.gravity(.05)
.distance(100)
.charge(-100)
.size([w, h]);
var nodes = force.nodes(),
links = force.links();
var vis = d3.select("div#viz01_main").append("svg:svg")
.attr("width", w)
.attr("height", h);
force.on("tick", function() {
vis.selectAll("g.node")
.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
vis.selectAll("line.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; });
});
function restart() {
var link = vis.selectAll("line.link")
.data(links, function(d) { return d.source.id + "-" + d.target.id; });
link.enter().insert("svg:line", "g.node")
.attr("class", "link")
.attr("fill", "none")
.attr("stroke", function(d) { return (d.relation == "spouseOf") ? "YellowGreen" : "SkyBlue"})
.style("stroke-width", 4)
;
link.exit().remove();
var node = vis.selectAll("g.node")
.data(nodes, function(d) { return d.id;});
var nodeEnter = node.enter().append("svg:g")
.attr("class", "node")
.call(force.drag)
.on("dblclick", step3);
node.append("svg:circle")
.attr("class", "circle")
.attr("r", 8);
node.append("svg:image")
.attr("class", "circle")
.attr("xlink:href", function(d) { return (d.gender == "M") ? "male.svg" : "female.svg" })
.attr("x", -8)
.attr("y", -8)
.attr("width", 16)
.attr("height", 16);
nodeEnter.append("svg:text")
.attr("class", "nodetext")
.attr("dx", 12)
.attr("dy", ".35em")
.text(function(d) { return d.id });
node.exit().remove();
force.start();
}
function step1() {
d3.json("darwin.json", function(json) {
for ( x = 0; x < json.nodes.length; x++ ) {
nodes.push(json.nodes[x]);
nodeHash[json.nodes[x].id] = x;
}
for ( x = 0; x < json.links.length; x++ ) {
links.push({source: json.nodes[json.links[x].source], target: json.nodes[json.links[x].target], "relation": json.links[x].relation, "id": json.links[x].id });
}
restart();
}
)
}
function step2() {
nodes.splice(1, 1); // remove b
links.shift(); // remove a-b
links.pop(); // remove b-c
restart();
}
function step3(d, i) {
var pathClick = "erasmus.json";
d3.json(pathClick, function(json) {
for ( x = 0; x < json.nodes.length; x++ ) {
var found = false;
for ( y = 0; y < nodes.length; y++ ) {
if (nodes[y].id == json.nodes[x].id) {
found = true;
}
}
if (found == false) {
nodes.push(json.nodes[x]);
nodeHash[json.nodes[x].id] = nodes.length - 1;
}
}
for ( x = 0; x < json.links.length; x++ ) {
var found = false;
for ( y = 0; y < links.length; y++ ) {
if (links[y].id == json.links[x].id) {
found = true;
break;
}
}
if (found == false) {
links.push({source: nodes[nodeHash[json.links[x].sid]], target: nodes[nodeHash[json.links[x].tid]], "relation": json.links[x].relation, "id": json.links[x].id });
}
}
restart();
})
}
restart();
setTimeout(step1, 500);
} //end viz01()
{
"nodes": [
{
"id": "I7771",
"gender": "F",
"name": "[Margaret] Elizabeth Darwin",
"group": 0
},
{
"id": "I12888",
"gender": "M",
"name": "Richard Buckley Litchfield",
"group": 0
},
{
"id": "I7502",
"gender": "F",
"name": "Elizabeth Darwin",
"group": 0
},
{
"id": "I7498",
"gender": "F",
"name": "Anne Elizabeth Darwin",
"group": 0
},
{
"id": "I7511",
"gender": "F",
"name": "Emily Catherine Darwin",
"group": 0
},
{
"id": "I7657",
"gender": "F",
"name": "Florence Henrietta Fisher",
"group": 0
},
{
"id": "I7503",
"gender": "M",
"name": "Francis Darwin FRS",
"group": 0
},
{
"id": "I7506",
"gender": "M",
"name": "Charles Waring Darwin",
"group": 0
},
{
"id": "I7493",
"gender": "M",
"name": "Josiah Wedgwood FRS FSA FSEAMC",
"group": 0
},
{
"id": "I7682",
"gender": "F",
"name": "Elizabeth Frances Fraser",
"group": 0
},
{
"id": "I7497",
"gender": "M",
"name": "William Erasmus Darwin",
"group": 0
},
{
"id": "I7656",
"gender": "F",
"name": "Ellen Wordsworth Crofts",
"group": 0
},
{
"id": "I7653",
"gender": "F",
"name": "Maud du Puy",
"group": 0
},
{
"id": "I7463",
"gender": "F",
"name": "Emma Wedgwood",
"group": 0
},
{
"id": "I7461",
"gender": "F",
"name": "Susannah Wedgwood",
"group": 0
},
{
"id": "I7508",
"gender": "F",
"name": "Caroline Sarah Darwin",
"group": 0
},
{
"id": "I7500",
"gender": "F",
"name": "Henrietta Emma Darwin",
"group": 0
},
{
"id": "I7494",
"gender": "F",
"name": "Sarah Wedgwood",
"group": 0
},
{
"id": "I7496",
"gender": "F",
"name": "Elizabeth Allen",
"group": 0
},
{
"id": "I7652",
"gender": "F",
"name": "Sara Price Ashburner Sedgwick",
"group": 0
},
{
"id": "I7707",
"gender": "F",
"name": "Ruth Francis Darwin CBE",
"group": 0
},
{
"id": "I7923",
"gender": "F",
"name": "Frances Crofts Darwin",
"group": 0
},
{
"id": "I7455",
"gender": "F",
"name": "Mary Howard",
"group": 0
},
{
"id": "I7499",
"gender": "F",
"name": "Mary Eleanor Darwin",
"group": 0
},
{
"id": "I7706",
"gender": "F",
"name": "[Emma] Nora Darwin",
"group": 0
},
{
"id": "I7683",
"gender": "F",
"name": "[Charlotte] Mildred Massingberd",
"group": 0
},
{
"id": "I7841",
"gender": "M",
"name": "William Robert Darwin",
"group": 0
},
{
"id": "I7504",
"gender": "M",
"name": "Leonard Darwin",
"group": 0
},
{
"id": "I7705",
"gender": "M",
"name": "2nd Lieut. Erasmus Darwin",
"group": 0
},
{
"id": "I7761",
"gender": "M",
"name": "Charles Galton Darwin KBE MC FRS",
"group": 0
},
{
"id": "I7654",
"gender": "F",
"name": "Amy Ruck",
"group": 0
},
{
"id": "I7507",
"gender": "F",
"name": "Marianne Darwin",
"group": 0
},
{
"id": "I7727",
"gender": "F",
"name": "Gwendoline Mary Darwin",
"group": 0
},
{
"id": "I7460",
"gender": "M",
"name": "Robert Waring Darwin MD FRS",
"group": 0
},
{
"id": "I7655",
"gender": "M",
"name": "Bernard Richard Meirion Darwin",
"group": 0
},
{
"id": "I7510",
"gender": "M",
"name": "Erasmus Alvey Darwin",
"group": 0
},
{
"id": "I7509",
"gender": "F",
"name": "Susan Elizabeth Darwin",
"group": 0
},
{
"id": "I5906",
"gender": "M",
"name": "Erasmus Darwin",
"group": 0
},
{
"id": "I7495",
"gender": "M",
"name": "Josiah Wedgwood II",
"group": 0
},
{
"id": "I7501",
"gender": "M",
"name": "George Howard Darwin FRS KCB",
"group": 0
},
{
"id": "I7462",
"gender": "M",
"name": "Charles Robert Darwin FRS",
"group": 0
},
{
"id": "I7505",
"gender": "M",
"name": "Horace Darwin JP KBE FRS",
"group": 0
},
{
"id": "I7691",
"gender": "F",
"name": "Hon. Emma Cecilia Farrer",
"group": 0
}
],
"links": [
{
"source": 1,
"target": 16,
"sid": "I12888",
"tid": "I7500",
"value": 5,
"relation": "spouseOf",
"id": "7519"
},
{
"source": 41,
"target": 42,
"sid": "I7505",
"tid": "I7691",
"value": 5,
"relation": "spouseOf",
"id": "15854"
},
{
"source": 28,
"target": 41,
"sid": "I7705",
"tid": "I7505",
"value": 5,
"relation": "childOf",
"id": "15855"
},
{
"source": 20,
"target": 41,
"sid": "I7707",
"tid": "I7505",
"value": 5,
"relation": "childOf",
"id": "15857"
},
{
"source": 24,
"target": 41,
"sid": "I7706",
"tid": "I7505",
"value": 5,
"relation": "childOf",
"id": "15859"
},
{
"source": 27,
"target": 9,
"sid": "I7504",
"tid": "I7682",
"value": 5,
"relation": "spouseOf",
"id": "15865"
},
{
"source": 27,
"target": 25,
"sid": "I7504",
"tid": "I7683",
"value": 5,
"relation": "spouseOf",
"id": "15866"
},
{
"source": 6,
"target": 11,
"sid": "I7503",
"tid": "I7656",
"value": 5,
"relation": "spouseOf",
"id": "15926"
},
{
"source": 21,
"target": 6,
"sid": "I7923",
"tid": "I7503",
"value": 5,
"relation": "childOf",
"id": "15927"
},
{
"source": 6,
"target": 5,
"sid": "I7503",
"tid": "I7657",
"value": 5,
"relation": "spouseOf",
"id": "15929"
},
{
"source": 6,
"target": 30,
"sid": "I7503",
"tid": "I7654",
"value": 5,
"relation": "spouseOf",
"id": "15930"
},
{
"source": 34,
"target": 6,
"sid": "I7655",
"tid": "I7503",
"value": 5,
"relation": "childOf",
"id": "15931"
},
{
"source": 10,
"target": 19,
"sid": "I7497",
"tid": "I7652",
"value": 5,
"relation": "spouseOf",
"id": "15933"
},
{
"source": 39,
"target": 12,
"sid": "I7501",
"tid": "I7653",
"value": 5,
"relation": "spouseOf",
"id": "15934"
},
{
"source": 32,
"target": 39,
"sid": "I7727",
"tid": "I7501",
"value": 5,
"relation": "childOf",
"id": "15935"
},
{
"source": 29,
"target": 39,
"sid": "I7761",
"tid": "I7501",
"value": 5,
"relation": "childOf",
"id": "15937"
},
{
"source": 0,
"target": 39,
"sid": "I7771",
"tid": "I7501",
"value": 5,
"relation": "childOf",
"id": "15939"
},
{
"source": 26,
"target": 39,
"sid": "I7841",
"tid": "I7501",
"value": 5,
"relation": "childOf",
"id": "15941"
},
{
"source": 13,
"target": 38,
"sid": "I7463",
"tid": "I7495",
"value": 5,
"relation": "childOf",
"id": "16186"
},
{
"source": 13,
"target": 18,
"sid": "I7463",
"tid": "I7496",
"value": 5,
"relation": "childOf",
"id": "16187"
},
{
"source": 14,
"target": 8,
"sid": "I7461",
"tid": "I7493",
"value": 5,
"relation": "childOf",
"id": "16190"
},
{
"source": 14,
"target": 17,
"sid": "I7461",
"tid": "I7494",
"value": 5,
"relation": "childOf",
"id": "16191"
},
{
"source": 40,
"target": 13,
"sid": "I7462",
"tid": "I7463",
"value": 5,
"relation": "spouseOf",
"id": "16231"
},
{
"source": 10,
"target": 40,
"sid": "I7497",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16232"
},
{
"source": 10,
"target": 13,
"sid": "I7497",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16233"
},
{
"source": 3,
"target": 40,
"sid": "I7498",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16234"
},
{
"source": 3,
"target": 13,
"sid": "I7498",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16235"
},
{
"source": 23,
"target": 40,
"sid": "I7499",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16236"
},
{
"source": 23,
"target": 13,
"sid": "I7499",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16237"
},
{
"source": 16,
"target": 40,
"sid": "I7500",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16238"
},
{
"source": 16,
"target": 13,
"sid": "I7500",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16239"
},
{
"source": 39,
"target": 40,
"sid": "I7501",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16240"
},
{
"source": 39,
"target": 13,
"sid": "I7501",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16241"
},
{
"source": 2,
"target": 40,
"sid": "I7502",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16242"
},
{
"source": 2,
"target": 13,
"sid": "I7502",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16243"
},
{
"source": 6,
"target": 40,
"sid": "I7503",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16244"
},
{
"source": 6,
"target": 13,
"sid": "I7503",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16245"
},
{
"source": 27,
"target": 40,
"sid": "I7504",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16246"
},
{
"source": 27,
"target": 13,
"sid": "I7504",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16247"
},
{
"source": 41,
"target": 40,
"sid": "I7505",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16248"
},
{
"source": 41,
"target": 13,
"sid": "I7505",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16249"
},
{
"source": 7,
"target": 40,
"sid": "I7506",
"tid": "I7462",
"value": 5,
"relation": "childOf",
"id": "16250"
},
{
"source": 7,
"target": 13,
"sid": "I7506",
"tid": "I7463",
"value": 5,
"relation": "childOf",
"id": "16251"
},
{
"source": 33,
"target": 14,
"sid": "I7460",
"tid": "I7461",
"value": 5,
"relation": "spouseOf",
"id": "16257"
},
{
"source": 31,
"target": 33,
"sid": "I7507",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16258"
},
{
"source": 31,
"target": 14,
"sid": "I7507",
"tid": "I7461",
"value": 5,
"relation": "childOf",
"id": "16259"
},
{
"source": 15,
"target": 33,
"sid": "I7508",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16260"
},
{
"source": 15,
"target": 14,
"sid": "I7508",
"tid": "I7461",
"value": 5,
"relation": "childOf",
"id": "16261"
},
{
"source": 36,
"target": 33,
"sid": "I7509",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16262"
},
{
"source": 36,
"target": 14,
"sid": "I7509",
"tid": "I7461",
"value": 5,
"relation": "childOf",
"id": "16263"
},
{
"source": 35,
"target": 33,
"sid": "I7510",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16264"
},
{
"source": 35,
"target": 14,
"sid": "I7510",
"tid": "I7461",
"value": 5,
"relation": "childOf",
"id": "16265"
},
{
"source": 40,
"target": 33,
"sid": "I7462",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16266"
},
{
"source": 40,
"target": 14,
"sid": "I7462",
"tid": "I7461",
"value": 5,
"relation": "childOf",
"id": "16267"
},
{
"source": 4,
"target": 33,
"sid": "I7511",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16268"
},
{
"source": 4,
"target": 14,
"sid": "I7511",
"tid": "I7461",
"value": 5,
"relation": "childOf",
"id": "16269"
},
{
"source": 33,
"target": 37,
"sid": "I7460",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16283"
},
{
"source": 33,
"target": 22,
"sid": "I7460",
"tid": "I7455",
"value": 5,
"relation": "childOf",
"id": "16284"
}
]
}
{
"nodes": [
{
"id": "I7453",
"gender": "M",
"name": "Robert Darwin",
"group": 0
},
{
"id": "I7564",
"gender": "F",
"name": "Elizabeth Anne Galton",
"group": 0
},
{
"id": "I7457",
"gender": "F",
"name": "Susanna Parker",
"group": 0
},
{
"id": "I7489",
"gender": "M",
"name": "Charles Darwin",
"group": 0
},
{
"id": "I7492",
"gender": "M",
"name": "William Alvey Darwin",
"group": 0
},
{
"id": "I7513",
"gender": "M",
"name": "John Hill",
"group": 0
},
{
"id": "I7566",
"gender": "F",
"name": "Millicent Adele Galton",
"group": 0
},
{
"id": "I7568",
"gender": "M",
"name": "Darwin Galton",
"group": 0
},
{
"id": "I7796",
"gender": "F",
"name": "Mary Jane Darwin",
"group": 0
},
{
"id": "I7800",
"gender": "F",
"name": "Frances Sarah Darwin",
"group": 0
},
{
"id": "I7548",
"gender": "F",
"name": "Millicent Pole",
"group": 0
},
{
"id": "I7490",
"gender": "M",
"name": "Erasmus Darwin",
"group": 0
},
{
"id": "I7491",
"gender": "F",
"name": "Elizabeth Darwin",
"group": 0
},
{
"id": "I7520",
"gender": "F",
"name": "Emma Georgina Elizabeth Darwin",
"group": 0
},
{
"id": "I7487",
"gender": "M",
"name": "Rev. John Darwin",
"group": 0
},
{
"id": "I7466",
"gender": "M",
"name": "William Swift",
"group": 0
},
{
"id": "I7478",
"gender": "M",
"name": "Charles Howard",
"group": 0
},
{
"id": "I7511",
"gender": "F",
"name": "Emily Catherine Darwin",
"group": 0
},
{
"id": "I7467",
"gender": "M",
"name": "John Hardcastle",
"group": 0
},
{
"id": "I7540",
"gender": "M",
"name": "Samuel Tertius Galton",
"group": 0
},
{
"id": "I7483",
"gender": "F",
"name": "Elizabeth Darwin",
"group": 0
},
{
"id": "I7518",
"gender": "M",
"name": "Edward Darwin",
"group": 0
},
{
"id": "I7569",
"gender": "M",
"name": "Erasmus Galton JP DL",
"group": 0
},
{
"id": "I7799",
"gender": "M",
"name": "Capt. Edward Levett Darwin",
"group": 0
},
{
"id": "I7801",
"gender": "F",
"name": "Georgiana Elizabeth Darwin",
"group": 0
},
{
"id": "I7485",
"gender": "F",
"name": "Anne Darwin",
"group": 0
},
{
"id": "I7488",
"gender": "M",
"name": "Robert Waring Darwin",
"group": 0
},
{
"id": "I7565",
"gender": "F",
"name": "Lucy Harriot Galton",
"group": 0
},
{
"id": "I7798",
"gender": "F",
"name": "Emma Elizabeth Darwin",
"group": 0
},
{
"id": "I5904",
"gender": "F",
"name": "Elizabeth Colyear",
"group": 0
},
{
"id": "I7465",
"gender": "F",
"name": "Lucy Swift",
"group": 0
},
{
"id": "I7456",
"gender": "F",
"name": "Mary Parker",
"group": 0
},
{
"id": "I7461",
"gender": "F",
"name": "Susannah Wedgwood",
"group": 0
},
{
"id": "I7479",
"gender": "F",
"name": "Penelope Foley",
"group": 0
},
{
"id": "I7468",
"gender": "F",
"name": "Mary Hardcastle",
"group": 0
},
{
"id": "I7508",
"gender": "F",
"name": "Caroline Sarah Darwin",
"group": 0
},
{
"id": "I7524",
"gender": "F",
"name": "Harriet Darwin",
"group": 0
},
{
"id": "I7519",
"gender": "F",
"name": "Frances Ann Violetta Darwin",
"group": 0
},
{
"id": "I7556",
"gender": "F",
"name": "Jane Harriet Ryle",
"group": 0
},
{
"id": "I8770",
"gender": "F",
"name": "Elizabeth Alvey",
"group": 0
},
{
"id": "I7455",
"gender": "F",
"name": "Mary Howard",
"group": 0
},
{
"id": "I7547",
"gender": "F",
"name": "Elizabeth Anne Pole",
"group": 0
},
{
"id": "I7459",
"gender": "M",
"name": "Joseph Day",
"group": 0
},
{
"id": "I7523",
"gender": "M",
"name": "Henry Darwin",
"group": 0
},
{
"id": "I7484",
"gender": "M",
"name": "William Alvey Darwin",
"group": 0
},
{
"id": "I5905",
"gender": "M",
"name": "Edward Sacheverel Pole",
"group": 0
},
{
"id": "I5874",
"gender": "M",
"name": "Sir Charles Colyear 2nd Earl of Portmore KT MP",
"group": 0
},
{
"id": "I7802",
"gender": "F",
"name": "Violetta Harriot Darwin",
"group": 0
},
{
"id": "I7805",
"gender": "M",
"name": "John Robert Darwin",
"group": 0
},
{
"id": "I7570",
"gender": "M",
"name": "Sir Francis Galton FRS FRGS",
"group": 0
},
{
"id": "I7797",
"gender": "M",
"name": "Reginald Darwin",
"group": 0
},
{
"id": "I7804",
"gender": "F",
"name": "Millicent Susan Darwin",
"group": 0
},
{
"id": "I7454",
"gender": "F",
"name": "Elizabeth Hill",
"group": 0
},
{
"id": "I7803",
"gender": "F",
"name": "Ann Eliza Thomasine Darwin",
"group": 0
},
{
"id": "I7544",
"gender": "M",
"name": "Sacheverel Pole [later Chandos-Pole]",
"group": 0
},
{
"id": "I7464",
"gender": "F",
"name": "Lucy [Unknown]",
"group": 0
},
{
"id": "I7567",
"gender": "F",
"name": "Emma Sophia Galton",
"group": 0
},
{
"id": "I7507",
"gender": "F",
"name": "Marianne Darwin",
"group": 0
},
{
"id": "I7458",
"gender": "F",
"name": "Mary Parker",
"group": 0
},
{
"id": "I7522",
"gender": "M",
"name": "John Darwin",
"group": 0
},
{
"id": "I7587",
"gender": "F",
"name": "Anne Waring",
"group": 0
},
{
"id": "I7460",
"gender": "M",
"name": "Robert Waring Darwin MD FRS",
"group": 0
},
{
"id": "I7510",
"gender": "M",
"name": "Erasmus Alvey Darwin",
"group": 0
},
{
"id": "I7509",
"gender": "F",
"name": "Susan Elizabeth Darwin",
"group": 0
},
{
"id": "I5906",
"gender": "M",
"name": "Erasmus Darwin",
"group": 0
},
{
"id": "I7586",
"gender": "M",
"name": "William Darwin",
"group": 0
},
{
"id": "I7486",
"gender": "F",
"name": "Susannah Darwin",
"group": 0
},
{
"id": "I7521",
"gender": "M",
"name": "Francis Sacheverel Darwin",
"group": 0
},
{
"id": "I7462",
"gender": "M",
"name": "Charles Robert Darwin FRS",
"group": 0
},
{
"id": "I7549",
"gender": "M",
"name": "German Pole",
"group": 0
},
{
"id": "I5901",
"gender": "F",
"name": "Elizabeth Collier",
"group": 0
}
],
"links": [
{
"source": 0,
"target": 65,
"sid": "I7453",
"tid": "I7586",
"value": 5,
"relation": "childOf",
"id": "16052"
},
{
"source": 0,
"target": 60,
"sid": "I7453",
"tid": "I7587",
"value": 5,
"relation": "childOf",
"id": "16053"
},
{
"source": 67,
"target": 38,
"sid": "I7521",
"tid": "I7556",
"value": 5,
"relation": "spouseOf",
"id": "16080"
},
{
"source": 8,
"target": 67,
"sid": "I7796",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16081"
},
{
"source": 50,
"target": 67,
"sid": "I7797",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16083"
},
{
"source": 28,
"target": 67,
"sid": "I7798",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16085"
},
{
"source": 23,
"target": 67,
"sid": "I7799",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16087"
},
{
"source": 9,
"target": 67,
"sid": "I7800",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16089"
},
{
"source": 24,
"target": 67,
"sid": "I7801",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16091"
},
{
"source": 47,
"target": 67,
"sid": "I7802",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16093"
},
{
"source": 53,
"target": 67,
"sid": "I7803",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16095"
},
{
"source": 51,
"target": 67,
"sid": "I7804",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16097"
},
{
"source": 48,
"target": 67,
"sid": "I7805",
"tid": "I7521",
"value": 5,
"relation": "childOf",
"id": "16099"
},
{
"source": 19,
"target": 37,
"sid": "I7540",
"tid": "I7519",
"value": 5,
"relation": "spouseOf",
"id": "16114"
},
{
"source": 1,
"target": 37,
"sid": "I7564",
"tid": "I7519",
"value": 5,
"relation": "childOf",
"id": "16116"
},
{
"source": 27,
"target": 37,
"sid": "I7565",
"tid": "I7519",
"value": 5,
"relation": "childOf",
"id": "16118"
},
{
"source": 6,
"target": 37,
"sid": "I7566",
"tid": "I7519",
"value": 5,
"relation": "childOf",
"id": "16120"
},
{
"source": 56,
"target": 37,
"sid": "I7567",
"tid": "I7519",
"value": 5,
"relation": "childOf",
"id": "16122"
},
{
"source": 7,
"target": 37,
"sid": "I7568",
"tid": "I7519",
"value": 5,
"relation": "childOf",
"id": "16124"
},
{
"source": 22,
"target": 37,
"sid": "I7569",
"tid": "I7519",
"value": 5,
"relation": "childOf",
"id": "16126"
},
{
"source": 49,
"target": 37,
"sid": "I7570",
"tid": "I7519",
"value": 5,
"relation": "childOf",
"id": "16128"
},
{
"source": 52,
"target": 5,
"sid": "I7454",
"tid": "I7513",
"value": 5,
"relation": "childOf",
"id": "16160"
},
{
"source": 52,
"target": 39,
"sid": "I7454",
"tid": "I8770",
"value": 5,
"relation": "childOf",
"id": "16161"
},
{
"source": 40,
"target": 16,
"sid": "I7455",
"tid": "I7478",
"value": 5,
"relation": "childOf",
"id": "16205"
},
{
"source": 40,
"target": 33,
"sid": "I7455",
"tid": "I7479",
"value": 5,
"relation": "childOf",
"id": "16206"
},
{
"source": 18,
"target": 30,
"sid": "I7467",
"tid": "I7465",
"value": 5,
"relation": "spouseOf",
"id": "16224"
},
{
"source": 34,
"target": 30,
"sid": "I7468",
"tid": "I7465",
"value": 5,
"relation": "childOf",
"id": "16226"
},
{
"source": 15,
"target": 55,
"sid": "I7466",
"tid": "I7464",
"value": 5,
"relation": "spouseOf",
"id": "16227"
},
{
"source": 64,
"target": 55,
"sid": "I5906",
"tid": "I7464",
"value": 5,
"relation": "spouseOf",
"id": "16228"
},
{
"source": 30,
"target": 64,
"sid": "I7465",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16229"
},
{
"source": 30,
"target": 55,
"sid": "I7465",
"tid": "I7464",
"value": 5,
"relation": "childOf",
"id": "16230"
},
{
"source": 61,
"target": 32,
"sid": "I7460",
"tid": "I7461",
"value": 5,
"relation": "spouseOf",
"id": "16257"
},
{
"source": 57,
"target": 61,
"sid": "I7507",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16258"
},
{
"source": 35,
"target": 61,
"sid": "I7508",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16260"
},
{
"source": 63,
"target": 61,
"sid": "I7509",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16262"
},
{
"source": 62,
"target": 61,
"sid": "I7510",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16264"
},
{
"source": 68,
"target": 61,
"sid": "I7462",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16266"
},
{
"source": 17,
"target": 61,
"sid": "I7511",
"tid": "I7460",
"value": 5,
"relation": "childOf",
"id": "16268"
},
{
"source": 42,
"target": 31,
"sid": "I7459",
"tid": "I7456",
"value": 5,
"relation": "spouseOf",
"id": "16270"
},
{
"source": 64,
"target": 31,
"sid": "I5906",
"tid": "I7456",
"value": 5,
"relation": "spouseOf",
"id": "16271"
},
{
"source": 2,
"target": 64,
"sid": "I7457",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16272"
},
{
"source": 2,
"target": 31,
"sid": "I7457",
"tid": "I7456",
"value": 5,
"relation": "childOf",
"id": "16273"
},
{
"source": 58,
"target": 64,
"sid": "I7458",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16274"
},
{
"source": 58,
"target": 31,
"sid": "I7458",
"tid": "I7456",
"value": 5,
"relation": "childOf",
"id": "16275"
},
{
"source": 64,
"target": 40,
"sid": "I5906",
"tid": "I7455",
"value": 5,
"relation": "spouseOf",
"id": "16276"
},
{
"source": 3,
"target": 64,
"sid": "I7489",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16277"
},
{
"source": 3,
"target": 40,
"sid": "I7489",
"tid": "I7455",
"value": 5,
"relation": "childOf",
"id": "16278"
},
{
"source": 11,
"target": 64,
"sid": "I7490",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16279"
},
{
"source": 11,
"target": 40,
"sid": "I7490",
"tid": "I7455",
"value": 5,
"relation": "childOf",
"id": "16280"
},
{
"source": 12,
"target": 64,
"sid": "I7491",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16281"
},
{
"source": 12,
"target": 40,
"sid": "I7491",
"tid": "I7455",
"value": 5,
"relation": "childOf",
"id": "16282"
},
{
"source": 61,
"target": 64,
"sid": "I7460",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16283"
},
{
"source": 61,
"target": 40,
"sid": "I7460",
"tid": "I7455",
"value": 5,
"relation": "childOf",
"id": "16284"
},
{
"source": 4,
"target": 64,
"sid": "I7492",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "16285"
},
{
"source": 4,
"target": 40,
"sid": "I7492",
"tid": "I7455",
"value": 5,
"relation": "childOf",
"id": "16286"
},
{
"source": 0,
"target": 52,
"sid": "I7453",
"tid": "I7454",
"value": 5,
"relation": "spouseOf",
"id": "16287"
},
{
"source": 26,
"target": 0,
"sid": "I7488",
"tid": "I7453",
"value": 5,
"relation": "childOf",
"id": "16288"
},
{
"source": 26,
"target": 52,
"sid": "I7488",
"tid": "I7454",
"value": 5,
"relation": "childOf",
"id": "16289"
},
{
"source": 20,
"target": 0,
"sid": "I7483",
"tid": "I7453",
"value": 5,
"relation": "childOf",
"id": "16290"
},
{
"source": 20,
"target": 52,
"sid": "I7483",
"tid": "I7454",
"value": 5,
"relation": "childOf",
"id": "16291"
},
{
"source": 44,
"target": 0,
"sid": "I7484",
"tid": "I7453",
"value": 5,
"relation": "childOf",
"id": "16292"
},
{
"source": 44,
"target": 52,
"sid": "I7484",
"tid": "I7454",
"value": 5,
"relation": "childOf",
"id": "16293"
},
{
"source": 25,
"target": 0,
"sid": "I7485",
"tid": "I7453",
"value": 5,
"relation": "childOf",
"id": "16294"
},
{
"source": 25,
"target": 52,
"sid": "I7485",
"tid": "I7454",
"value": 5,
"relation": "childOf",
"id": "16295"
},
{
"source": 66,
"target": 0,
"sid": "I7486",
"tid": "I7453",
"value": 5,
"relation": "childOf",
"id": "16296"
},
{
"source": 66,
"target": 52,
"sid": "I7486",
"tid": "I7454",
"value": 5,
"relation": "childOf",
"id": "16297"
},
{
"source": 14,
"target": 0,
"sid": "I7487",
"tid": "I7453",
"value": 5,
"relation": "childOf",
"id": "16298"
},
{
"source": 14,
"target": 52,
"sid": "I7487",
"tid": "I7454",
"value": 5,
"relation": "childOf",
"id": "16299"
},
{
"source": 64,
"target": 0,
"sid": "I5906",
"tid": "I7453",
"value": 5,
"relation": "childOf",
"id": "16300"
},
{
"source": 64,
"target": 52,
"sid": "I5906",
"tid": "I7454",
"value": 5,
"relation": "childOf",
"id": "16301"
},
{
"source": 64,
"target": 29,
"sid": "I5906",
"tid": "I5904",
"value": 5,
"relation": "spouseOf",
"id": "19376"
},
{
"source": 21,
"target": 64,
"sid": "I7518",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "19377"
},
{
"source": 21,
"target": 29,
"sid": "I7518",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19378"
},
{
"source": 37,
"target": 64,
"sid": "I7519",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "19379"
},
{
"source": 37,
"target": 29,
"sid": "I7519",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19380"
},
{
"source": 13,
"target": 64,
"sid": "I7520",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "19381"
},
{
"source": 13,
"target": 29,
"sid": "I7520",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19382"
},
{
"source": 67,
"target": 64,
"sid": "I7521",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "19383"
},
{
"source": 67,
"target": 29,
"sid": "I7521",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19384"
},
{
"source": 59,
"target": 64,
"sid": "I7522",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "19385"
},
{
"source": 59,
"target": 29,
"sid": "I7522",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19386"
},
{
"source": 43,
"target": 64,
"sid": "I7523",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "19387"
},
{
"source": 43,
"target": 29,
"sid": "I7523",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19388"
},
{
"source": 36,
"target": 64,
"sid": "I7524",
"tid": "I5906",
"value": 5,
"relation": "childOf",
"id": "19389"
},
{
"source": 36,
"target": 29,
"sid": "I7524",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19390"
},
{
"source": 45,
"target": 29,
"sid": "I5905",
"tid": "I5904",
"value": 5,
"relation": "spouseOf",
"id": "19391"
},
{
"source": 54,
"target": 29,
"sid": "I7544",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19393"
},
{
"source": 41,
"target": 29,
"sid": "I7547",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19395"
},
{
"source": 10,
"target": 29,
"sid": "I7548",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19397"
},
{
"source": 69,
"target": 29,
"sid": "I7549",
"tid": "I5904",
"value": 5,
"relation": "childOf",
"id": "19399"
},
{
"source": 29,
"target": 46,
"sid": "I5904",
"tid": "I5874",
"value": 5,
"relation": "childOf",
"id": "19408"
},
{
"source": 29,
"target": 70,
"sid": "I5904",
"tid": "I5901",
"value": 5,
"relation": "childOf",
"id": "19409"
}
]
}
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<html>
<head>
<title>Force Plus Append</title>
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script>
<script type="text/javascript" src="append_force.js"></script>
</head>
<body onload="viz01();">
<div id="viz01_main"></div>
</body>
</html>
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@biovisualize
Copy link

Could you fix the broken link to d3.js, using http://d3js.org/d3.v2.min.js ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment