forked from fogonwater's block: ignore
Last active
January 22, 2019 03:29
-
-
Save fogonwater/1be78516bfa6b4e9bf886e6f57d2f16b to your computer and use it in GitHub Desktop.
ignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: none |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="eng"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Split votes — all electorates</title> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<script src="sankey.js"></script> | |
<style> | |
body { | |
font-family: Helvetic, Arial, Sans-Serif; | |
color: #333; | |
} | |
div.container { | |
margin-top: 10px; | |
} | |
.axis path, | |
.axis line { | |
fill: none; | |
stroke: #000; | |
shape-rendering: crispEdges; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<div id="chart" style="text-align:center"></div> | |
</div> | |
<script src="script.js" type="text/javascript"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d3.sankey = function() { | |
var sankey = {}, | |
nodeWidth = 24, | |
nodePadding = 8, | |
size = [1, 1], | |
nodes = [], | |
links = []; | |
sankey.nodeWidth = function(_) { | |
if (!arguments.length) return nodeWidth; | |
nodeWidth = +_; | |
return sankey; | |
}; | |
sankey.nodePadding = function(_) { | |
if (!arguments.length) return nodePadding; | |
nodePadding = +_; | |
return sankey; | |
}; | |
sankey.nodes = function(_) { | |
if (!arguments.length) return nodes; | |
nodes = _; | |
return sankey; | |
}; | |
sankey.links = function(_) { | |
if (!arguments.length) return links; | |
links = _; | |
return sankey; | |
}; | |
sankey.size = function(_) { | |
if (!arguments.length) return size; | |
size = _; | |
return sankey; | |
}; | |
sankey.layout = function(iterations) { | |
computeNodeLinks(); | |
computeNodeValues(); | |
computeNodeBreadths(); | |
computeNodeDepths(iterations); | |
computeLinkDepths(); | |
return sankey; | |
}; | |
sankey.relayout = function() { | |
computeLinkDepths(); | |
return sankey; | |
}; | |
sankey.link = function() { | |
var curvature = .5; | |
function link(d) { | |
var x0 = d.source.x + d.source.dx, | |
x1 = d.target.x, | |
xi = d3.interpolateNumber(x0, x1), | |
x2 = xi(curvature), | |
x3 = xi(1 - curvature), | |
y0 = d.source.y + d.sy + d.dy / 2, | |
y1 = d.target.y + d.ty + d.dy / 2; | |
return "M" + x0 + "," + y0 | |
+ "C" + x2 + "," + y0 | |
+ " " + x3 + "," + y1 | |
+ " " + x1 + "," + y1; | |
} | |
link.curvature = function(_) { | |
if (!arguments.length) return curvature; | |
curvature = +_; | |
return link; | |
}; | |
return link; | |
}; | |
// Populate the sourceLinks and targetLinks for each node. | |
// Also, if the source and target are not objects, assume they are indices. | |
function computeNodeLinks() { | |
nodes.forEach(function(node) { | |
node.sourceLinks = []; | |
node.targetLinks = []; | |
}); | |
links.forEach(function(link) { | |
var source = link.source, | |
target = link.target; | |
if (typeof source === "number") source = link.source = nodes[link.source]; | |
if (typeof target === "number") target = link.target = nodes[link.target]; | |
source.sourceLinks.push(link); | |
target.targetLinks.push(link); | |
}); | |
} | |
// Compute the value (size) of each node by summing the associated links. | |
function computeNodeValues() { | |
nodes.forEach(function(node) { | |
node.value = Math.max( | |
d3.sum(node.sourceLinks, value), | |
d3.sum(node.targetLinks, value) | |
); | |
}); | |
} | |
// Iteratively assign the breadth (x-position) for each node. | |
// Nodes are assigned the maximum breadth of incoming neighbors plus one; | |
// nodes with no incoming links are assigned breadth zero, while | |
// nodes with no outgoing links are assigned the maximum breadth. | |
function computeNodeBreadths() { | |
var remainingNodes = nodes, | |
nextNodes, | |
x = 0; | |
while (remainingNodes.length) { | |
nextNodes = []; | |
remainingNodes.forEach(function(node) { | |
node.x = x; | |
node.dx = nodeWidth; | |
node.sourceLinks.forEach(function(link) { | |
if (nextNodes.indexOf(link.target) < 0) { | |
nextNodes.push(link.target); | |
} | |
}); | |
}); | |
remainingNodes = nextNodes; | |
++x; | |
} | |
// | |
moveSinksRight(x); | |
scaleNodeBreadths((size[0] - nodeWidth) / (x - 1)); | |
} | |
function moveSourcesRight() { | |
nodes.forEach(function(node) { | |
if (!node.targetLinks.length) { | |
node.x = d3.min(node.sourceLinks, function(d) { return d.target.x; }) - 1; | |
} | |
}); | |
} | |
function moveSinksRight(x) { | |
nodes.forEach(function(node) { | |
if (!node.sourceLinks.length) { | |
node.x = x - 1; | |
} | |
}); | |
} | |
function scaleNodeBreadths(kx) { | |
nodes.forEach(function(node) { | |
node.x *= kx; | |
}); | |
} | |
function computeNodeDepths(iterations) { | |
var nodesByBreadth = d3.nest() | |
.key(function(d) { return d.x; }) | |
.sortKeys(d3.ascending) | |
.entries(nodes) | |
.map(function(d) { return d.values; }); | |
// | |
initializeNodeDepth(); | |
resolveCollisions(); | |
for (var alpha = 1; iterations > 0; --iterations) { | |
relaxRightToLeft(alpha *= .99); | |
resolveCollisions(); | |
relaxLeftToRight(alpha); | |
resolveCollisions(); | |
} | |
function initializeNodeDepth() { | |
var ky = d3.min(nodesByBreadth, function(nodes) { | |
return (size[1] - (nodes.length - 1) * nodePadding) / d3.sum(nodes, value); | |
}); | |
nodesByBreadth.forEach(function(nodes) { | |
nodes.forEach(function(node, i) { | |
node.y = i; | |
node.dy = node.value * ky; | |
}); | |
}); | |
links.forEach(function(link) { | |
link.dy = link.value * ky; | |
}); | |
} | |
function relaxLeftToRight(alpha) { | |
nodesByBreadth.forEach(function(nodes, breadth) { | |
nodes.forEach(function(node) { | |
if (node.targetLinks.length) { | |
var y = d3.sum(node.targetLinks, weightedSource) / d3.sum(node.targetLinks, value); | |
node.y += (y - center(node)) * alpha; | |
} | |
}); | |
}); | |
function weightedSource(link) { | |
return center(link.source) * link.value; | |
} | |
} | |
function relaxRightToLeft(alpha) { | |
nodesByBreadth.slice().reverse().forEach(function(nodes) { | |
nodes.forEach(function(node) { | |
if (node.sourceLinks.length) { | |
var y = d3.sum(node.sourceLinks, weightedTarget) / d3.sum(node.sourceLinks, value); | |
node.y += (y - center(node)) * alpha; | |
} | |
}); | |
}); | |
function weightedTarget(link) { | |
return center(link.target) * link.value; | |
} | |
} | |
function resolveCollisions() { | |
nodesByBreadth.forEach(function(nodes) { | |
var node, | |
dy, | |
y0 = 0, | |
n = nodes.length, | |
i; | |
// Push any overlapping nodes down. | |
nodes.sort(ascendingDepth); | |
for (i = 0; i < n; ++i) { | |
node = nodes[i]; | |
dy = y0 - node.y; | |
if (dy > 0) node.y += dy; | |
y0 = node.y + node.dy + nodePadding; | |
} | |
// If the bottommost node goes outside the bounds, push it back up. | |
dy = y0 - nodePadding - size[1]; | |
if (dy > 0) { | |
y0 = node.y -= dy; | |
// Push any overlapping nodes back up. | |
for (i = n - 2; i >= 0; --i) { | |
node = nodes[i]; | |
dy = node.y + node.dy + nodePadding - y0; | |
if (dy > 0) node.y -= dy; | |
y0 = node.y; | |
} | |
} | |
}); | |
} | |
function ascendingDepth(a, b) { | |
return a.y - b.y; | |
} | |
} | |
function computeLinkDepths() { | |
nodes.forEach(function(node) { | |
node.sourceLinks.sort(ascendingTargetDepth); | |
node.targetLinks.sort(ascendingSourceDepth); | |
}); | |
nodes.forEach(function(node) { | |
var sy = 0, ty = 0; | |
node.sourceLinks.forEach(function(link) { | |
link.sy = sy; | |
sy += link.dy; | |
}); | |
node.targetLinks.forEach(function(link) { | |
link.ty = ty; | |
ty += link.dy; | |
}); | |
}); | |
function ascendingSourceDepth(a, b) { | |
return a.source.y - b.source.y; | |
} | |
function ascendingTargetDepth(a, b) { | |
return a.target.y - b.target.y; | |
} | |
} | |
function center(node) { | |
return node.y + node.dy / 2; | |
} | |
function value(link) { | |
return link.value; | |
} | |
return sankey; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.clear() | |
var SRC_FILE = "split-votes-all.json"; | |
// set the dimensions and margins of the graph | |
var margin = {top: 5, right: 5, bottom: 5, left: 5}, | |
width = 350 - margin.left - margin.right, | |
height = 760 - margin.top - margin.bottom; | |
// format variables | |
var formatNumber = d3.format(",.0f"), // zero decimal places | |
format = d3.format(",.0f") // zero decimal places | |
var color = d3.scaleOrdinal(d3.schemeCategory10); | |
// append the svg object to the body of the page | |
var svg = d3.select("#chart").append("svg") | |
.attr("width", width + margin.left + margin.right) | |
.attr("height", height + margin.top + margin.bottom) | |
.append("g") | |
.attr("transform", | |
"translate(" + margin.left + "," + margin.top + ")"); | |
// Set the sankey diagram properties | |
var sankey = d3.sankey() | |
.nodeWidth(36) | |
.nodePadding(12) | |
.size([width, height]); | |
var path = sankey.link(); | |
d3.json(SRC_FILE, function(error, graph) { | |
//console.log(graph) | |
sankey | |
.nodes(graph.nodes) | |
.links(graph.links) | |
.layout(0);// no iterations to arrange | |
// add in the links | |
var link = svg.append("g").selectAll(".link") | |
.data(graph.links) | |
.enter().append("path") | |
.attr("class", "link") | |
.attr("d", path) | |
.style("stroke-width", (d) => Math.max(1, d.dy)) | |
.style("fill", "none") | |
.style("stroke-opacity", (d) => 0.25) | |
.style("stroke", (d) => color(d.target.name)) | |
.sort(function(a, b) { return b.dy - a.dy; }); | |
// add the link titles | |
link.append("title") | |
.text(function(d) { | |
return d.source.name + " → " + | |
d.target.name + "\n" + format(d.value); }); | |
// add in the nodes | |
var node = svg.append("g").selectAll(".node") | |
.data(graph.nodes) | |
.enter().append("g") | |
.attr("class", "node") | |
.attr("font-family", "sans-serif") | |
.attr("font-size", 10) | |
.attr("transform", function(d) { | |
return "translate(" + d.x + "," + d.y + ")"; }) | |
.call(d3.drag() | |
.subject((d) => d) | |
.on("start", () => this.parentNode.appendChild(this)) | |
.on("drag", dragmove)); | |
// add the rectangles for the nodes | |
node.append("rect") | |
.attr("height", (d) => d.dy ) | |
.attr("width", sankey.nodeWidth()) | |
.style("fill", (d) => color(d.group)) | |
.style("stroke", (d) => d3.rgb(color(d.name)).darker(1)) | |
.append("title") | |
.text((d) => d.name + " " + format(d.value) ); | |
// add in the title for the nodes | |
node.append("text") | |
.attr("x", -6) | |
.attr("y", (d) => d.dy / 2) | |
.attr("dy", ".35em") | |
.attr("text-anchor", "end") | |
.attr("transform", null) | |
.text((d) => d.name + " " + format(Math.round(d.value / 10) * 10) ) | |
.filter((d) => d.x < width / 2) | |
.attr("x", 6 + sankey.nodeWidth()) | |
.attr("text-anchor", "start"); | |
// the function for moving the nodes | |
function dragmove(d) { | |
d3.select(this) | |
.attr("transform", | |
"translate(" | |
+ d.x + "," | |
+ (d.y = Math.max( | |
0, Math.min(height - d.dy, d3.event.y)) | |
) + ")"); | |
sankey.relayout(); | |
link.attr("d", path); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"links": [ | |
{ | |
"group": "Archives", | |
"source": 0, | |
"target": 1, | |
"value": 9227.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 0, | |
"target": 2, | |
"value": 6972.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 0, | |
"target": 3, | |
"value": 1878.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 0, | |
"target": 4, | |
"value": 32771.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 0, | |
"target": 5, | |
"value": 97572.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 0, | |
"target": 6, | |
"value": 135906.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 7, | |
"target": 1, | |
"value": 2678.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 7, | |
"target": 2, | |
"value": 10005.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 7, | |
"target": 3, | |
"value": 24690.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 7, | |
"target": 4, | |
"value": 27941.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 7, | |
"target": 5, | |
"value": 48752.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 7, | |
"target": 6, | |
"value": 41652.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 8, | |
"target": 1, | |
"value": 448.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 8, | |
"target": 2, | |
"value": 110782.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 8, | |
"target": 3, | |
"value": 18346.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 8, | |
"target": 4, | |
"value": 1380.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 8, | |
"target": 5, | |
"value": 1478.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 8, | |
"target": 6, | |
"value": 51.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 9, | |
"target": 1, | |
"value": 2137.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 9, | |
"target": 2, | |
"value": 1401.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 9, | |
"target": 3, | |
"value": 407.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 9, | |
"target": 4, | |
"value": 7031.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 9, | |
"target": 5, | |
"value": 28315.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 9, | |
"target": 6, | |
"value": 44378.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 10, | |
"target": 1, | |
"value": 516.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 10, | |
"target": 2, | |
"value": 45671.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 10, | |
"target": 3, | |
"value": 126.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 10, | |
"target": 4, | |
"value": 1125.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 10, | |
"target": 5, | |
"value": 1065.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 10, | |
"target": 6, | |
"value": 701.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 11, | |
"target": 1, | |
"value": 650.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 11, | |
"target": 2, | |
"value": 238.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 11, | |
"target": 3, | |
"value": 181.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 11, | |
"target": 4, | |
"value": 2049.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 11, | |
"target": 5, | |
"value": 9807.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 11, | |
"target": 6, | |
"value": 27384.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 12, | |
"target": 1, | |
"value": 187.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 12, | |
"target": 2, | |
"value": 231.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 12, | |
"target": 3, | |
"value": 2574.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 12, | |
"target": 4, | |
"value": 10892.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 12, | |
"target": 5, | |
"value": 9202.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 12, | |
"target": 6, | |
"value": 2831.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 13, | |
"target": 4, | |
"value": 606.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 13, | |
"target": 5, | |
"value": 14210.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 13, | |
"target": 6, | |
"value": 6619.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 14, | |
"target": 1, | |
"value": 451.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 14, | |
"target": 2, | |
"value": 175.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 14, | |
"target": 3, | |
"value": 225.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 14, | |
"target": 4, | |
"value": 2429.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 14, | |
"target": 5, | |
"value": 5638.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 14, | |
"target": 6, | |
"value": 9546.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 15, | |
"target": 1, | |
"value": 234.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 15, | |
"target": 2, | |
"value": 772.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 15, | |
"target": 4, | |
"value": 1980.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 15, | |
"target": 5, | |
"value": 6599.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 15, | |
"target": 6, | |
"value": 7600.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 16, | |
"target": 5, | |
"value": 14738.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 16, | |
"target": 6, | |
"value": 202.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 17, | |
"target": 1, | |
"value": 514.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 17, | |
"target": 4, | |
"value": 2345.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 17, | |
"target": 5, | |
"value": 5617.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 17, | |
"target": 6, | |
"value": 3766.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 18, | |
"target": 2, | |
"value": 645.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 18, | |
"target": 3, | |
"value": 411.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 18, | |
"target": 4, | |
"value": 6017.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 18, | |
"target": 5, | |
"value": 1713.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 18, | |
"target": 6, | |
"value": 2211.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 19, | |
"target": 2, | |
"value": 2498.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 19, | |
"target": 3, | |
"value": 1750.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 19, | |
"target": 4, | |
"value": 1678.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 19, | |
"target": 5, | |
"value": 1056.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 19, | |
"target": 6, | |
"value": 3744.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 20, | |
"target": 1, | |
"value": 229.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 20, | |
"target": 4, | |
"value": 163.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 20, | |
"target": 5, | |
"value": 2103.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 20, | |
"target": 6, | |
"value": 7289.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 21, | |
"target": 3, | |
"value": 168.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 21, | |
"target": 4, | |
"value": 2290.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 21, | |
"target": 5, | |
"value": 1144.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 21, | |
"target": 6, | |
"value": 5893.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 22, | |
"target": 1, | |
"value": 115.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 22, | |
"target": 3, | |
"value": 402.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 22, | |
"target": 4, | |
"value": 754.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 22, | |
"target": 5, | |
"value": 4256.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 22, | |
"target": 6, | |
"value": 3765.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 23, | |
"target": 1, | |
"value": 87.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 23, | |
"target": 4, | |
"value": 587.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 23, | |
"target": 5, | |
"value": 3679.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 23, | |
"target": 6, | |
"value": 3947.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 24, | |
"target": 2, | |
"value": 202.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 24, | |
"target": 3, | |
"value": 4618.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 24, | |
"target": 4, | |
"value": 1787.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 24, | |
"target": 5, | |
"value": 174.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 24, | |
"target": 6, | |
"value": 672.0 | |
}, | |
{ | |
"group": "Archives", | |
"source": 25, | |
"target": 1, | |
"value": 345.0 | |
}, | |
{ | |
"group": "Archway", | |
"source": 25, | |
"target": 2, | |
"value": 3527.0 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"source": 25, | |
"target": 3, | |
"value": 68.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 25, | |
"target": 4, | |
"value": 2819.0 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"source": 25, | |
"target": 5, | |
"value": 294.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 25, | |
"target": 6, | |
"value": 113.0 | |
}, | |
{ | |
"group": "National Library Online", | |
"source": 26, | |
"target": 4, | |
"value": 6927.0 | |
}, | |
{ | |
"group": "TE ARA", | |
"source": 26, | |
"target": 6, | |
"value": 119.0 | |
} | |
], | |
"nodes": [ | |
{ | |
"group": "mixed", | |
"name": "bing", | |
"node": 0 | |
}, | |
{ | |
"group": "Archives", | |
"name": "Archives", | |
"node": 1 | |
}, | |
{ | |
"group": "Archway", | |
"name": "Archway", | |
"node": 2 | |
}, | |
{ | |
"group": "DigitalNZ.org", | |
"name": "DigitalNZ.org", | |
"node": 3 | |
}, | |
{ | |
"group": "National Library Online", | |
"name": "National Library Online", | |
"node": 4 | |
}, | |
{ | |
"group": "NZHISTORY", | |
"name": "NZHISTORY", | |
"node": 5 | |
}, | |
{ | |
"group": "TE ARA", | |
"name": "TE ARA", | |
"node": 6 | |
}, | |
{ | |
"group": "mixed", | |
"name": "facebook", | |
"node": 7 | |
}, | |
{ | |
"group": "mixed", | |
"name": "archives.govt.nz", | |
"node": 8 | |
}, | |
{ | |
"group": "mixed", | |
"name": "yahoo", | |
"node": 9 | |
}, | |
{ | |
"group": "mixed", | |
"name": "aucklandmuseum.com", | |
"node": 10 | |
}, | |
{ | |
"group": "mixed", | |
"name": "wikipedia", | |
"node": 11 | |
}, | |
{ | |
"group": "mixed", | |
"name": "twitter", | |
"node": 12 | |
}, | |
{ | |
"group": "mixed", | |
"name": "classroom.google.com", | |
"node": 13 | |
}, | |
{ | |
"group": "mixed", | |
"name": "duckduckgo.com", | |
"node": 14 | |
}, | |
{ | |
"group": "mixed", | |
"name": "ask.com", | |
"node": 15 | |
}, | |
{ | |
"group": "mixed", | |
"name": "buzzfeed.com", | |
"node": 16 | |
}, | |
{ | |
"group": "mixed", | |
"name": "teara.govt.nz", | |
"node": 17 | |
}, | |
{ | |
"group": "mixed", | |
"name": "digitalnz.org", | |
"node": 18 | |
}, | |
{ | |
"group": "mixed", | |
"name": "nzetc.victoria.ac.nz", | |
"node": 19 | |
}, | |
{ | |
"group": "mixed", | |
"name": "newzealandnow.govt.nz", | |
"node": 20 | |
}, | |
{ | |
"group": "mixed", | |
"name": "pinterest.com", | |
"node": 21 | |
}, | |
{ | |
"group": "mixed", | |
"name": "reddit.com", | |
"node": 22 | |
}, | |
{ | |
"group": "mixed", | |
"name": "ecosia.org", | |
"node": 23 | |
}, | |
{ | |
"group": "mixed", | |
"name": "aucklandcity.govt.nz", | |
"node": 24 | |
}, | |
{ | |
"group": "mixed", | |
"name": "1840.dia.govt.nz", | |
"node": 25 | |
}, | |
{ | |
"group": "mixed", | |
"name": "reftracker.dia.govt.nz", | |
"node": 26 | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment