Skip to content

Instantly share code, notes, and snippets.

@fogonwater
Last active August 19, 2018 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fogonwater/da29cab26c335298b1db4b1ece9d6e38 to your computer and use it in GitHub Desktop.
Save fogonwater/da29cab26c335298b1db4b1ece9d6e38 to your computer and use it in GitHub Desktop.
Delete and rework
license: mit

Rough. Re-do and delete.

<!DOCTYPE html>
<meta charset="utf-8">
<title>SANKEY Experiment</title>
<style>
body {
font-family: Helvetica;
font-size:0.6em;
}
.node rect {
cursor: move;
fill-opacity: .9;
shape-rendering: crispEdges;
}
.node text {
pointer-events: none;
text-shadow: 0 1px 0 #fff;
}
.link {
fill: none;
stroke: #000;
stroke-opacity: .2;
}
.link:hover {
stroke-opacity: .5;
}
</style>
<body>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="sankey.js"></script>
<script>
console.clear()
var units = "loans";
// set the dimensions and margins of the graph
var margin = {top: 10, right: 10, bottom: 10, left: 10},
width = 700 - margin.left - margin.right,
height = 1200 - margin.top - margin.bottom;
// format variables
var formatNumber = d3.format(",.0f"), // zero decimal places
format = function(d) { return formatNumber(d) + " " + units; },
color = d3.scaleOrdinal(d3.schemeCategory10);
// append the svg object to the body of the page
var svg = d3.select("body").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(2)
.size([width, height]);
var path = sankey.link();
// load the data
d3.json("sankey.json", function(error, graph) {
sankey
.nodes(graph.nodes)
.links(graph.links)
.layout(10);
// 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", function(d) { return Math.max(1, d.dy); })
.style("stroke", function(d) {
if (d.col == "None") {return 'black'}
else
{return d.color = color(d.col);}
})
.sort(function(a, b) { return b.dy - a.dy; });
// add the link titles
link.append("title")
.text(function(d) {
return d.source.label + " → " +
d.target.label + "\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("transform", function(d) {
return "translate(" + d.x + "," + d.y + ")"; })
.call(d3.drag()
.subject(function(d) {
return d;
})
.on("start", function() {
this.parentNode.appendChild(this);
})
.on("drag", dragmove));
// add the rectangles for the nodes
node.append("rect")
.attr("height", function(d) { return d.dy; })
.attr("width", sankey.nodeWidth())
.style("fill", function(d) {
if (d.col == "None") {return '#ccc'}
else
{return d.color = color(d.col);}
})
.text(function(d) {
return d.name + "\n" + format(d.value); });
// add in the title for the nodes
node.append("text")
.attr("x", -6)
.attr("y", function(d) { return d.dy / 2; })
.attr("dy", ".35em")
.attr("text-anchor", "end")
.attr("transform", null)
.text(function(d) { return d.label; })
.filter(function(d) { return 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);
}
});
</script>
</body>
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;
};
{
"links": [
{
"col": "All",
"source": 0,
"target": 1,
"value": 1065
},
{
"col": "Gap",
"source": 1,
"target": 2,
"value": 79
},
{
"col": "In demand",
"source": 1,
"target": 3,
"value": 36
},
{
"col": "Few supplied",
"source": 1,
"target": 4,
"value": 15
},
{
"col": "Fair range supplied",
"source": 1,
"target": 5,
"value": 177
},
{
"col": "Good range supplied",
"source": 1,
"target": 6,
"value": 758
},
{
"col": "Arts",
"source": 7,
"target": 8,
"value": 31
},
{
"col": "Gap",
"source": 8,
"target": 9,
"value": 8
},
{
"col": "In demand",
"source": 8,
"target": 10,
"value": 6
},
{
"col": "Fair range supplied",
"source": 8,
"target": 11,
"value": 4
},
{
"col": "Good range supplied",
"source": 8,
"target": 12,
"value": 13
},
{
"col": "Arts",
"source": 7,
"target": 13,
"value": 30
},
{
"col": "Gap",
"source": 13,
"target": 14,
"value": 7
},
{
"col": "In demand",
"source": 13,
"target": 15,
"value": 5
},
{
"col": "Fair range supplied",
"source": 13,
"target": 16,
"value": 2
},
{
"col": "Good range supplied",
"source": 13,
"target": 17,
"value": 16
},
{
"col": "Arts",
"source": 7,
"target": 18,
"value": 29
},
{
"col": "Gap",
"source": 18,
"target": 19,
"value": 9
},
{
"col": "Few supplied",
"source": 18,
"target": 20,
"value": 1
},
{
"col": "Fair range supplied",
"source": 18,
"target": 21,
"value": 6
},
{
"col": "Good range supplied",
"source": 18,
"target": 22,
"value": 13
},
{
"col": "Arts",
"source": 7,
"target": 23,
"value": 145
},
{
"col": "Gap",
"source": 23,
"target": 24,
"value": 11
},
{
"col": "In demand",
"source": 23,
"target": 25,
"value": 10
},
{
"col": "Few supplied",
"source": 23,
"target": 26,
"value": 5
},
{
"col": "Fair range supplied",
"source": 23,
"target": 27,
"value": 25
},
{
"col": "Good range supplied",
"source": 23,
"target": 28,
"value": 94
},
{
"col": "Arts",
"source": 7,
"target": 29,
"value": 166
},
{
"col": "Gap",
"source": 29,
"target": 30,
"value": 22
},
{
"col": "In demand",
"source": 29,
"target": 31,
"value": 2
},
{
"col": "Few supplied",
"source": 29,
"target": 32,
"value": 5
},
{
"col": "Fair range supplied",
"source": 29,
"target": 33,
"value": 38
},
{
"col": "Good range supplied",
"source": 29,
"target": 34,
"value": 99
},
{
"col": "Health & PE",
"source": 35,
"target": 36,
"value": 101
},
{
"col": "Gap",
"source": 36,
"target": 37,
"value": 3
},
{
"col": "In demand",
"source": 36,
"target": 38,
"value": 4
},
{
"col": "Few supplied",
"source": 36,
"target": 39,
"value": 3
},
{
"col": "Fair range supplied",
"source": 36,
"target": 40,
"value": 13
},
{
"col": "Good range supplied",
"source": 36,
"target": 41,
"value": 78
},
{
"col": "Health & PE",
"source": 35,
"target": 42,
"value": 95
},
{
"col": "Gap",
"source": 42,
"target": 43,
"value": 13
},
{
"col": "In demand",
"source": 42,
"target": 44,
"value": 1
},
{
"col": "Fair range supplied",
"source": 42,
"target": 45,
"value": 12
},
{
"col": "Good range supplied",
"source": 42,
"target": 46,
"value": 69
},
{
"col": "Health & PE",
"source": 35,
"target": 47,
"value": 21
},
{
"col": "Gap",
"source": 47,
"target": 48,
"value": 5
},
{
"col": "In demand",
"source": 47,
"target": 49,
"value": 2
},
{
"col": "Fair range supplied",
"source": 47,
"target": 50,
"value": 2
},
{
"col": "Good range supplied",
"source": 47,
"target": 51,
"value": 12
},
{
"col": "Health & PE",
"source": 35,
"target": 52,
"value": 110
},
{
"col": "Gap",
"source": 52,
"target": 53,
"value": 15
},
{
"col": "In demand",
"source": 52,
"target": 54,
"value": 2
},
{
"col": "Few supplied",
"source": 52,
"target": 55,
"value": 1
},
{
"col": "Fair range supplied",
"source": 52,
"target": 56,
"value": 10
},
{
"col": "Good range supplied",
"source": 52,
"target": 57,
"value": 82
},
{
"col": "Health & PE",
"source": 35,
"target": 58,
"value": 143
},
{
"col": "Gap",
"source": 58,
"target": 59,
"value": 5
},
{
"col": "In demand",
"source": 58,
"target": 60,
"value": 16
},
{
"col": "Fair range supplied",
"source": 58,
"target": 61,
"value": 17
},
{
"col": "Good range supplied",
"source": 58,
"target": 62,
"value": 105
},
{
"col": "Language",
"source": 63,
"target": 64,
"value": 121
},
{
"col": "Gap",
"source": 64,
"target": 65,
"value": 12
},
{
"col": "In demand",
"source": 64,
"target": 66,
"value": 3
},
{
"col": "Few supplied",
"source": 64,
"target": 67,
"value": 7
},
{
"col": "Fair range supplied",
"source": 64,
"target": 68,
"value": 18
},
{
"col": "Good range supplied",
"source": 64,
"target": 69,
"value": 81
},
{
"col": "Language",
"source": 63,
"target": 70,
"value": 164
},
{
"col": "Gap",
"source": 70,
"target": 71,
"value": 22
},
{
"col": "In demand",
"source": 70,
"target": 72,
"value": 6
},
{
"col": "Few supplied",
"source": 70,
"target": 73,
"value": 5
},
{
"col": "Fair range supplied",
"source": 70,
"target": 74,
"value": 31
},
{
"col": "Good range supplied",
"source": 70,
"target": 75,
"value": 100
},
{
"col": "Language",
"source": 63,
"target": 76,
"value": 95
},
{
"col": "Gap",
"source": 76,
"target": 77,
"value": 20
},
{
"col": "In demand",
"source": 76,
"target": 78,
"value": 5
},
{
"col": "Few supplied",
"source": 76,
"target": 79,
"value": 4
},
{
"col": "Fair range supplied",
"source": 76,
"target": 80,
"value": 13
},
{
"col": "Good range supplied",
"source": 76,
"target": 81,
"value": 53
},
{
"col": "Maths & Statistics",
"source": 82,
"target": 83,
"value": 52
},
{
"col": "Gap",
"source": 83,
"target": 84,
"value": 4
},
{
"col": "Few supplied",
"source": 83,
"target": 85,
"value": 1
},
{
"col": "Fair range supplied",
"source": 83,
"target": 86,
"value": 10
},
{
"col": "Good range supplied",
"source": 83,
"target": 87,
"value": 37
},
{
"col": "Maths & Statistics",
"source": 82,
"target": 88,
"value": 31
},
{
"col": "Gap",
"source": 88,
"target": 89,
"value": 7
},
{
"col": "Few supplied",
"source": 88,
"target": 90,
"value": 1
},
{
"col": "Fair range supplied",
"source": 88,
"target": 91,
"value": 5
},
{
"col": "Good range supplied",
"source": 88,
"target": 92,
"value": 18
},
{
"col": "Maths & Statistics",
"source": 82,
"target": 93,
"value": 27
},
{
"col": "Gap",
"source": 93,
"target": 94,
"value": 3
},
{
"col": "In demand",
"source": 93,
"target": 95,
"value": 1
},
{
"col": "Fair range supplied",
"source": 93,
"target": 96,
"value": 4
},
{
"col": "Good range supplied",
"source": 93,
"target": 97,
"value": 19
},
{
"col": "Maths & Statistics",
"source": 82,
"target": 98,
"value": 14
},
{
"col": "Gap",
"source": 98,
"target": 99,
"value": 1
},
{
"col": "Fair range supplied",
"source": 98,
"target": 100,
"value": 3
},
{
"col": "Good range supplied",
"source": 98,
"target": 101,
"value": 10
},
{
"col": "Reading",
"source": 102,
"target": 103,
"value": 1504
},
{
"col": "Gap",
"source": 103,
"target": 104,
"value": 22
},
{
"col": "In demand",
"source": 103,
"target": 105,
"value": 7
},
{
"col": "Few supplied",
"source": 103,
"target": 106,
"value": 55
},
{
"col": "Fair range supplied",
"source": 103,
"target": 107,
"value": 236
},
{
"col": "Good range supplied",
"source": 103,
"target": 108,
"value": 1184
},
{
"col": "Science",
"source": 109,
"target": 110,
"value": 594
},
{
"col": "Gap",
"source": 110,
"target": 111,
"value": 50
},
{
"col": "In demand",
"source": 110,
"target": 112,
"value": 22
},
{
"col": "Few supplied",
"source": 110,
"target": 113,
"value": 4
},
{
"col": "Fair range supplied",
"source": 110,
"target": 114,
"value": 70
},
{
"col": "Good range supplied",
"source": 110,
"target": 115,
"value": 448
},
{
"col": "Science",
"source": 109,
"target": 116,
"value": 137
},
{
"col": "Gap",
"source": 116,
"target": 117,
"value": 6
},
{
"col": "In demand",
"source": 116,
"target": 118,
"value": 1
},
{
"col": "Fair range supplied",
"source": 116,
"target": 119,
"value": 25
},
{
"col": "Good range supplied",
"source": 116,
"target": 120,
"value": 105
},
{
"col": "Science",
"source": 109,
"target": 121,
"value": 186
},
{
"col": "Gap",
"source": 121,
"target": 122,
"value": 9
},
{
"col": "In demand",
"source": 121,
"target": 123,
"value": 9
},
{
"col": "Fair range supplied",
"source": 121,
"target": 124,
"value": 27
},
{
"col": "Good range supplied",
"source": 121,
"target": 125,
"value": 141
},
{
"col": "Science",
"source": 109,
"target": 126,
"value": 297
},
{
"col": "Gap",
"source": 126,
"target": 127,
"value": 14
},
{
"col": "In demand",
"source": 126,
"target": 128,
"value": 13
},
{
"col": "Few supplied",
"source": 126,
"target": 129,
"value": 2
},
{
"col": "Fair range supplied",
"source": 126,
"target": 130,
"value": 47
},
{
"col": "Good range supplied",
"source": 126,
"target": 131,
"value": 221
},
{
"col": "Science",
"source": 109,
"target": 132,
"value": 434
},
{
"col": "Gap",
"source": 132,
"target": 133,
"value": 25
},
{
"col": "In demand",
"source": 132,
"target": 134,
"value": 7
},
{
"col": "Few supplied",
"source": 132,
"target": 135,
"value": 5
},
{
"col": "Fair range supplied",
"source": 132,
"target": 136,
"value": 70
},
{
"col": "Good range supplied",
"source": 132,
"target": 137,
"value": 327
},
{
"col": "Social Sciences",
"source": 138,
"target": 139,
"value": 171
},
{
"col": "Gap",
"source": 139,
"target": 140,
"value": 26
},
{
"col": "In demand",
"source": 139,
"target": 141,
"value": 27
},
{
"col": "Few supplied",
"source": 139,
"target": 142,
"value": 5
},
{
"col": "Fair range supplied",
"source": 139,
"target": 143,
"value": 44
},
{
"col": "Good range supplied",
"source": 139,
"target": 144,
"value": 69
},
{
"col": "Social Sciences",
"source": 138,
"target": 145,
"value": 600
},
{
"col": "Gap",
"source": 145,
"target": 146,
"value": 101
},
{
"col": "In demand",
"source": 145,
"target": 147,
"value": 56
},
{
"col": "Few supplied",
"source": 145,
"target": 148,
"value": 11
},
{
"col": "Fair range supplied",
"source": 145,
"target": 149,
"value": 103
},
{
"col": "Good range supplied",
"source": 145,
"target": 150,
"value": 329
},
{
"col": "Social Sciences",
"source": 138,
"target": 151,
"value": 192
},
{
"col": "Gap",
"source": 151,
"target": 152,
"value": 32
},
{
"col": "In demand",
"source": 151,
"target": 153,
"value": 14
},
{
"col": "Few supplied",
"source": 151,
"target": 154,
"value": 2
},
{
"col": "Fair range supplied",
"source": 151,
"target": 155,
"value": 34
},
{
"col": "Good range supplied",
"source": 151,
"target": 156,
"value": 110
},
{
"col": "Social Sciences",
"source": 138,
"target": 157,
"value": 537
},
{
"col": "Gap",
"source": 157,
"target": 158,
"value": 84
},
{
"col": "In demand",
"source": 157,
"target": 159,
"value": 47
},
{
"col": "Few supplied",
"source": 157,
"target": 160,
"value": 7
},
{
"col": "Fair range supplied",
"source": 157,
"target": 161,
"value": 93
},
{
"col": "Good range supplied",
"source": 157,
"target": 162,
"value": 306
},
{
"col": "Social Sciences",
"source": 138,
"target": 163,
"value": 41
},
{
"col": "Gap",
"source": 163,
"target": 164,
"value": 7
},
{
"col": "In demand",
"source": 163,
"target": 165,
"value": 1
},
{
"col": "Fair range supplied",
"source": 163,
"target": 166,
"value": 8
},
{
"col": "Good range supplied",
"source": 163,
"target": 167,
"value": 25
},
{
"col": "Technology",
"source": 168,
"target": 169,
"value": 22
},
{
"col": "Fair range supplied",
"source": 169,
"target": 170,
"value": 3
},
{
"col": "Good range supplied",
"source": 169,
"target": 171,
"value": 19
},
{
"col": "Technology",
"source": 168,
"target": 172,
"value": 21
},
{
"col": "Gap",
"source": 172,
"target": 173,
"value": 5
},
{
"col": "Few supplied",
"source": 172,
"target": 174,
"value": 1
},
{
"col": "Fair range supplied",
"source": 172,
"target": 175,
"value": 3
},
{
"col": "Good range supplied",
"source": 172,
"target": 176,
"value": 12
},
{
"col": "Technology",
"source": 168,
"target": 177,
"value": 62
},
{
"col": "Gap",
"source": 177,
"target": 178,
"value": 11
},
{
"col": "In demand",
"source": 177,
"target": 179,
"value": 2
},
{
"col": "Fair range supplied",
"source": 177,
"target": 180,
"value": 17
},
{
"col": "Good range supplied",
"source": 177,
"target": 181,
"value": 32
},
{
"col": "Technology",
"source": 168,
"target": 182,
"value": 207
},
{
"col": "Gap",
"source": 182,
"target": 183,
"value": 25
},
{
"col": "In demand",
"source": 182,
"target": 184,
"value": 20
},
{
"col": "Few supplied",
"source": 182,
"target": 185,
"value": 2
},
{
"col": "Fair range supplied",
"source": 182,
"target": 186,
"value": 36
},
{
"col": "Good range supplied",
"source": 182,
"target": 187,
"value": 124
}
],
"nodes": [
{
"col": null,
"label": "All",
"name": "All:",
"node": 0
},
{
"col": "All",
"label": "All Learning Areas",
"name": "All Learning Areas",
"node": 1
},
{
"col": "Gap",
"label": "",
"name": "All Learning Areas: Gap",
"node": 2
},
{
"col": "In demand",
"label": "",
"name": "All Learning Areas: In demand",
"node": 3
},
{
"col": "Few supplied",
"label": "",
"name": "All Learning Areas: Few supplied",
"node": 4
},
{
"col": "Fair range supplied",
"label": "",
"name": "All Learning Areas: Fair range supplied",
"node": 5
},
{
"col": "Good range supplied",
"label": "",
"name": "All Learning Areas: Good range supplied",
"node": 6
},
{
"col": null,
"label": "Arts",
"name": "Arts:",
"node": 7
},
{
"col": "Arts",
"label": "Dance",
"name": "Dance",
"node": 8
},
{
"col": "Gap",
"label": "",
"name": "Dance: Gap",
"node": 9
},
{
"col": "In demand",
"label": "",
"name": "Dance: In demand",
"node": 10
},
{
"col": "Fair range supplied",
"label": "",
"name": "Dance: Fair range supplied",
"node": 11
},
{
"col": "Good range supplied",
"label": "",
"name": "Dance: Good range supplied",
"node": 12
},
{
"col": "Arts",
"label": "Drama",
"name": "Drama",
"node": 13
},
{
"col": "Gap",
"label": "",
"name": "Drama: Gap",
"node": 14
},
{
"col": "In demand",
"label": "",
"name": "Drama: In demand",
"node": 15
},
{
"col": "Fair range supplied",
"label": "",
"name": "Drama: Fair range supplied",
"node": 16
},
{
"col": "Good range supplied",
"label": "",
"name": "Drama: Good range supplied",
"node": 17
},
{
"col": "Arts",
"label": "Music",
"name": "Music",
"node": 18
},
{
"col": "Gap",
"label": "",
"name": "Music: Gap",
"node": 19
},
{
"col": "Few supplied",
"label": "",
"name": "Music: Few supplied",
"node": 20
},
{
"col": "Fair range supplied",
"label": "",
"name": "Music: Fair range supplied",
"node": 21
},
{
"col": "Good range supplied",
"label": "",
"name": "Music: Good range supplied",
"node": 22
},
{
"col": "Arts",
"label": "The Arts",
"name": "The Arts",
"node": 23
},
{
"col": "Gap",
"label": "",
"name": "The Arts: Gap",
"node": 24
},
{
"col": "In demand",
"label": "",
"name": "The Arts: In demand",
"node": 25
},
{
"col": "Few supplied",
"label": "",
"name": "The Arts: Few supplied",
"node": 26
},
{
"col": "Fair range supplied",
"label": "",
"name": "The Arts: Fair range supplied",
"node": 27
},
{
"col": "Good range supplied",
"label": "",
"name": "The Arts: Good range supplied",
"node": 28
},
{
"col": "Arts",
"label": "Visual Arts",
"name": "Visual Arts",
"node": 29
},
{
"col": "Gap",
"label": "",
"name": "Visual Arts: Gap",
"node": 30
},
{
"col": "In demand",
"label": "",
"name": "Visual Arts: In demand",
"node": 31
},
{
"col": "Few supplied",
"label": "",
"name": "Visual Arts: Few supplied",
"node": 32
},
{
"col": "Fair range supplied",
"label": "",
"name": "Visual Arts: Fair range supplied",
"node": 33
},
{
"col": "Good range supplied",
"label": "",
"name": "Visual Arts: Good range supplied",
"node": 34
},
{
"col": null,
"label": "Health & PE",
"name": "Health & PE:",
"node": 35
},
{
"col": "Health & PE",
"label": "Health & PE",
"name": "Health & PE",
"node": 36
},
{
"col": "Gap",
"label": "",
"name": "Health & PE: Gap",
"node": 37
},
{
"col": "In demand",
"label": "",
"name": "Health & PE: In demand",
"node": 38
},
{
"col": "Few supplied",
"label": "",
"name": "Health & PE: Few supplied",
"node": 39
},
{
"col": "Fair range supplied",
"label": "",
"name": "Health & PE: Fair range supplied",
"node": 40
},
{
"col": "Good range supplied",
"label": "",
"name": "Health & PE: Good range supplied",
"node": 41
},
{
"col": "Health & PE",
"label": "Healthy Communities & Environments",
"name": "Healthy Communities & Environments",
"node": 42
},
{
"col": "Gap",
"label": "",
"name": "Healthy Communities & Environments: Gap",
"node": 43
},
{
"col": "In demand",
"label": "",
"name": "Healthy Communities & Environments: In demand",
"node": 44
},
{
"col": "Fair range supplied",
"label": "",
"name": "Healthy Communities & Environments: Fair range supplied",
"node": 45
},
{
"col": "Good range supplied",
"label": "",
"name": "Healthy Communities & Environments: Good range supplied",
"node": 46
},
{
"col": "Health & PE",
"label": "Movement Concepts & Motor Skills",
"name": "Movement Concepts & Motor Skills",
"node": 47
},
{
"col": "Gap",
"label": "",
"name": "Movement Concepts & Motor Skills: Gap",
"node": 48
},
{
"col": "In demand",
"label": "",
"name": "Movement Concepts & Motor Skills: In demand",
"node": 49
},
{
"col": "Fair range supplied",
"label": "",
"name": "Movement Concepts & Motor Skills: Fair range supplied",
"node": 50
},
{
"col": "Good range supplied",
"label": "",
"name": "Movement Concepts & Motor Skills: Good range supplied",
"node": 51
},
{
"col": "Health & PE",
"label": "Personal Health & Physical Development",
"name": "Personal Health & Physical Development",
"node": 52
},
{
"col": "Gap",
"label": "",
"name": "Personal Health & Physical Development: Gap",
"node": 53
},
{
"col": "In demand",
"label": "",
"name": "Personal Health & Physical Development: In demand",
"node": 54
},
{
"col": "Few supplied",
"label": "",
"name": "Personal Health & Physical Development: Few supplied",
"node": 55
},
{
"col": "Fair range supplied",
"label": "",
"name": "Personal Health & Physical Development: Fair range supplied",
"node": 56
},
{
"col": "Good range supplied",
"label": "",
"name": "Personal Health & Physical Development: Good range supplied",
"node": 57
},
{
"col": "Health & PE",
"label": "Relationships with other people",
"name": "Relationships with other people",
"node": 58
},
{
"col": "Gap",
"label": "",
"name": "Relationships with other people: Gap",
"node": 59
},
{
"col": "In demand",
"label": "",
"name": "Relationships with other people: In demand",
"node": 60
},
{
"col": "Fair range supplied",
"label": "",
"name": "Relationships with other people: Fair range supplied",
"node": 61
},
{
"col": "Good range supplied",
"label": "",
"name": "Relationships with other people: Good range supplied",
"node": 62
},
{
"col": null,
"label": "Language",
"name": "Language:",
"node": 63
},
{
"col": "Language",
"label": "English",
"name": "English",
"node": 64
},
{
"col": "Gap",
"label": "",
"name": "English: Gap",
"node": 65
},
{
"col": "In demand",
"label": "",
"name": "English: In demand",
"node": 66
},
{
"col": "Few supplied",
"label": "",
"name": "English: Few supplied",
"node": 67
},
{
"col": "Fair range supplied",
"label": "",
"name": "English: Fair range supplied",
"node": 68
},
{
"col": "Good range supplied",
"label": "",
"name": "English: Good range supplied",
"node": 69
},
{
"col": "Language",
"label": "Listening, Reading, Viewing",
"name": "Listening, Reading, Viewing",
"node": 70
},
{
"col": "Gap",
"label": "",
"name": "Listening, Reading, Viewing: Gap",
"node": 71
},
{
"col": "In demand",
"label": "",
"name": "Listening, Reading, Viewing: In demand",
"node": 72
},
{
"col": "Few supplied",
"label": "",
"name": "Listening, Reading, Viewing: Few supplied",
"node": 73
},
{
"col": "Fair range supplied",
"label": "",
"name": "Listening, Reading, Viewing: Fair range supplied",
"node": 74
},
{
"col": "Good range supplied",
"label": "",
"name": "Listening, Reading, Viewing: Good range supplied",
"node": 75
},
{
"col": "Language",
"label": "Speaking, Writing, Presenting",
"name": "Speaking, Writing, Presenting",
"node": 76
},
{
"col": "Gap",
"label": "",
"name": "Speaking, Writing, Presenting: Gap",
"node": 77
},
{
"col": "In demand",
"label": "",
"name": "Speaking, Writing, Presenting: In demand",
"node": 78
},
{
"col": "Few supplied",
"label": "",
"name": "Speaking, Writing, Presenting: Few supplied",
"node": 79
},
{
"col": "Fair range supplied",
"label": "",
"name": "Speaking, Writing, Presenting: Fair range supplied",
"node": 80
},
{
"col": "Good range supplied",
"label": "",
"name": "Speaking, Writing, Presenting: Good range supplied",
"node": 81
},
{
"col": null,
"label": "Maths & Statistics",
"name": "Maths & Statistics:",
"node": 82
},
{
"col": "Maths & Statistics",
"label": "Geometry & Measurement",
"name": "Geometry & Measurement",
"node": 83
},
{
"col": "Gap",
"label": "",
"name": "Geometry & Measurement: Gap",
"node": 84
},
{
"col": "Few supplied",
"label": "",
"name": "Geometry & Measurement: Few supplied",
"node": 85
},
{
"col": "Fair range supplied",
"label": "",
"name": "Geometry & Measurement: Fair range supplied",
"node": 86
},
{
"col": "Good range supplied",
"label": "",
"name": "Geometry & Measurement: Good range supplied",
"node": 87
},
{
"col": "Maths & Statistics",
"label": "Maths & Statistics",
"name": "Maths & Statistics",
"node": 88
},
{
"col": "Gap",
"label": "",
"name": "Maths & Statistics: Gap",
"node": 89
},
{
"col": "Few supplied",
"label": "",
"name": "Maths & Statistics: Few supplied",
"node": 90
},
{
"col": "Fair range supplied",
"label": "",
"name": "Maths & Statistics: Fair range supplied",
"node": 91
},
{
"col": "Good range supplied",
"label": "",
"name": "Maths & Statistics: Good range supplied",
"node": 92
},
{
"col": "Maths & Statistics",
"label": "Number & Algebra",
"name": "Number & Algebra",
"node": 93
},
{
"col": "Gap",
"label": "",
"name": "Number & Algebra: Gap",
"node": 94
},
{
"col": "In demand",
"label": "",
"name": "Number & Algebra: In demand",
"node": 95
},
{
"col": "Fair range supplied",
"label": "",
"name": "Number & Algebra: Fair range supplied",
"node": 96
},
{
"col": "Good range supplied",
"label": "",
"name": "Number & Algebra: Good range supplied",
"node": 97
},
{
"col": "Maths & Statistics",
"label": "Statistics",
"name": "Statistics",
"node": 98
},
{
"col": "Gap",
"label": "",
"name": "Statistics: Gap",
"node": 99
},
{
"col": "Fair range supplied",
"label": "",
"name": "Statistics: Fair range supplied",
"node": 100
},
{
"col": "Good range supplied",
"label": "",
"name": "Statistics: Good range supplied",
"node": 101
},
{
"col": null,
"label": "Reading",
"name": "Reading:",
"node": 102
},
{
"col": "Reading",
"label": "Reading",
"name": "Reading",
"node": 103
},
{
"col": "Gap",
"label": "",
"name": "Reading: Gap",
"node": 104
},
{
"col": "In demand",
"label": "",
"name": "Reading: In demand",
"node": 105
},
{
"col": "Few supplied",
"label": "",
"name": "Reading: Few supplied",
"node": 106
},
{
"col": "Fair range supplied",
"label": "",
"name": "Reading: Fair range supplied",
"node": 107
},
{
"col": "Good range supplied",
"label": "",
"name": "Reading: Good range supplied",
"node": 108
},
{
"col": null,
"label": "Science",
"name": "Science:",
"node": 109
},
{
"col": "Science",
"label": "Living World",
"name": "Living World",
"node": 110
},
{
"col": "Gap",
"label": "",
"name": "Living World: Gap",
"node": 111
},
{
"col": "In demand",
"label": "",
"name": "Living World: In demand",
"node": 112
},
{
"col": "Few supplied",
"label": "",
"name": "Living World: Few supplied",
"node": 113
},
{
"col": "Fair range supplied",
"label": "",
"name": "Living World: Fair range supplied",
"node": 114
},
{
"col": "Good range supplied",
"label": "",
"name": "Living World: Good range supplied",
"node": 115
},
{
"col": "Science",
"label": "Material World",
"name": "Material World",
"node": 116
},
{
"col": "Gap",
"label": "",
"name": "Material World: Gap",
"node": 117
},
{
"col": "In demand",
"label": "",
"name": "Material World: In demand",
"node": 118
},
{
"col": "Fair range supplied",
"label": "",
"name": "Material World: Fair range supplied",
"node": 119
},
{
"col": "Good range supplied",
"label": "",
"name": "Material World: Good range supplied",
"node": 120
},
{
"col": "Science",
"label": "Physical World",
"name": "Physical World",
"node": 121
},
{
"col": "Gap",
"label": "",
"name": "Physical World: Gap",
"node": 122
},
{
"col": "In demand",
"label": "",
"name": "Physical World: In demand",
"node": 123
},
{
"col": "Fair range supplied",
"label": "",
"name": "Physical World: Fair range supplied",
"node": 124
},
{
"col": "Good range supplied",
"label": "",
"name": "Physical World: Good range supplied",
"node": 125
},
{
"col": "Science",
"label": "Planet Earth & Beyond",
"name": "Planet Earth & Beyond",
"node": 126
},
{
"col": "Gap",
"label": "",
"name": "Planet Earth & Beyond: Gap",
"node": 127
},
{
"col": "In demand",
"label": "",
"name": "Planet Earth & Beyond: In demand",
"node": 128
},
{
"col": "Few supplied",
"label": "",
"name": "Planet Earth & Beyond: Few supplied",
"node": 129
},
{
"col": "Fair range supplied",
"label": "",
"name": "Planet Earth & Beyond: Fair range supplied",
"node": 130
},
{
"col": "Good range supplied",
"label": "",
"name": "Planet Earth & Beyond: Good range supplied",
"node": 131
},
{
"col": "Science",
"label": "Science",
"name": "Science",
"node": 132
},
{
"col": "Gap",
"label": "",
"name": "Science: Gap",
"node": 133
},
{
"col": "In demand",
"label": "",
"name": "Science: In demand",
"node": 134
},
{
"col": "Few supplied",
"label": "",
"name": "Science: Few supplied",
"node": 135
},
{
"col": "Fair range supplied",
"label": "",
"name": "Science: Fair range supplied",
"node": 136
},
{
"col": "Good range supplied",
"label": "",
"name": "Science: Good range supplied",
"node": 137
},
{
"col": null,
"label": "Social Sciences",
"name": "Social Sciences:",
"node": 138
},
{
"col": "Social Sciences",
"label": "Continuity and Change",
"name": "Continuity and Change",
"node": 139
},
{
"col": "Gap",
"label": "",
"name": "Continuity and Change: Gap",
"node": 140
},
{
"col": "In demand",
"label": "",
"name": "Continuity and Change: In demand",
"node": 141
},
{
"col": "Few supplied",
"label": "",
"name": "Continuity and Change: Few supplied",
"node": 142
},
{
"col": "Fair range supplied",
"label": "",
"name": "Continuity and Change: Fair range supplied",
"node": 143
},
{
"col": "Good range supplied",
"label": "",
"name": "Continuity and Change: Good range supplied",
"node": 144
},
{
"col": "Social Sciences",
"label": "Identity, Culture and Organisation",
"name": "Identity, Culture and Organisation",
"node": 145
},
{
"col": "Gap",
"label": "",
"name": "Identity, Culture and Organisation: Gap",
"node": 146
},
{
"col": "In demand",
"label": "",
"name": "Identity, Culture and Organisation: In demand",
"node": 147
},
{
"col": "Few supplied",
"label": "",
"name": "Identity, Culture and Organisation: Few supplied",
"node": 148
},
{
"col": "Fair range supplied",
"label": "",
"name": "Identity, Culture and Organisation: Fair range supplied",
"node": 149
},
{
"col": "Good range supplied",
"label": "",
"name": "Identity, Culture and Organisation: Good range supplied",
"node": 150
},
{
"col": "Social Sciences",
"label": "Place and Environment",
"name": "Place and Environment",
"node": 151
},
{
"col": "Gap",
"label": "",
"name": "Place and Environment: Gap",
"node": 152
},
{
"col": "In demand",
"label": "",
"name": "Place and Environment: In demand",
"node": 153
},
{
"col": "Few supplied",
"label": "",
"name": "Place and Environment: Few supplied",
"node": 154
},
{
"col": "Fair range supplied",
"label": "",
"name": "Place and Environment: Fair range supplied",
"node": 155
},
{
"col": "Good range supplied",
"label": "",
"name": "Place and Environment: Good range supplied",
"node": 156
},
{
"col": "Social Sciences",
"label": "Social Sciences",
"name": "Social Sciences",
"node": 157
},
{
"col": "Gap",
"label": "",
"name": "Social Sciences: Gap",
"node": 158
},
{
"col": "In demand",
"label": "",
"name": "Social Sciences: In demand",
"node": 159
},
{
"col": "Few supplied",
"label": "",
"name": "Social Sciences: Few supplied",
"node": 160
},
{
"col": "Fair range supplied",
"label": "",
"name": "Social Sciences: Fair range supplied",
"node": 161
},
{
"col": "Good range supplied",
"label": "",
"name": "Social Sciences: Good range supplied",
"node": 162
},
{
"col": "Social Sciences",
"label": "The Economic World",
"name": "The Economic World",
"node": 163
},
{
"col": "Gap",
"label": "",
"name": "The Economic World: Gap",
"node": 164
},
{
"col": "In demand",
"label": "",
"name": "The Economic World: In demand",
"node": 165
},
{
"col": "Fair range supplied",
"label": "",
"name": "The Economic World: Fair range supplied",
"node": 166
},
{
"col": "Good range supplied",
"label": "",
"name": "The Economic World: Good range supplied",
"node": 167
},
{
"col": null,
"label": "Technology",
"name": "Technology:",
"node": 168
},
{
"col": "Technology",
"label": "Nature of Technology",
"name": "Nature of Technology",
"node": 169
},
{
"col": "Fair range supplied",
"label": "",
"name": "Nature of Technology: Fair range supplied",
"node": 170
},
{
"col": "Good range supplied",
"label": "",
"name": "Nature of Technology: Good range supplied",
"node": 171
},
{
"col": "Technology",
"label": "Technological Knowledge",
"name": "Technological Knowledge",
"node": 172
},
{
"col": "Gap",
"label": "",
"name": "Technological Knowledge: Gap",
"node": 173
},
{
"col": "Few supplied",
"label": "",
"name": "Technological Knowledge: Few supplied",
"node": 174
},
{
"col": "Fair range supplied",
"label": "",
"name": "Technological Knowledge: Fair range supplied",
"node": 175
},
{
"col": "Good range supplied",
"label": "",
"name": "Technological Knowledge: Good range supplied",
"node": 176
},
{
"col": "Technology",
"label": "Technological Practice",
"name": "Technological Practice",
"node": 177
},
{
"col": "Gap",
"label": "",
"name": "Technological Practice: Gap",
"node": 178
},
{
"col": "In demand",
"label": "",
"name": "Technological Practice: In demand",
"node": 179
},
{
"col": "Fair range supplied",
"label": "",
"name": "Technological Practice: Fair range supplied",
"node": 180
},
{
"col": "Good range supplied",
"label": "",
"name": "Technological Practice: Good range supplied",
"node": 181
},
{
"col": "Technology",
"label": "Technology",
"name": "Technology",
"node": 182
},
{
"col": "Gap",
"label": "",
"name": "Technology: Gap",
"node": 183
},
{
"col": "In demand",
"label": "",
"name": "Technology: In demand",
"node": 184
},
{
"col": "Few supplied",
"label": "",
"name": "Technology: Few supplied",
"node": 185
},
{
"col": "Fair range supplied",
"label": "",
"name": "Technology: Fair range supplied",
"node": 186
},
{
"col": "Good range supplied",
"label": "",
"name": "Technology: Good range supplied",
"node": 187
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment