To begin to answer this question it is important to understand some terminology. In Ireland there are seven universities, 13 institutes of technology, colleges of education, independent and further educations centres and other national research institutions such as the Dublin Institute for Advanced Studies. Staff and students of these institutions can gain access to ICHEC general-purpose computing resources (Stokes and Stoney) by submitting a project and are termed users.
Projects differ by size, class, and domain, for example, a small "Discovery" (Class C) project in the chemistry domain with three users or a large multi-year "Grand Challenge" (Class A) project in engineering with 10 users. Further details of the Full National Service can be found here. Also, ICHEC has numerous computational scientists, staff, that support the users during the course of their project.
So in summary there are users, project classes (A,B,C), project domains (Physics, Chemistry, Earth Science, Maths, Astrophysics, Engineering, Life Sciences, Computing, Humanities) staff, Institutions, and ICHEC. The challenge was to represent these data in a single info-graphic. The diagram above created using d3.js is the result and an explanation of its creation is described below. This graphic is an update from last year's protovis version.
But to answer the original question, ICHEC stands at the heart of computational research in Ireland.
{
"nodes":[
{"name":"TCD", "group":1},
{"name":"ICHEC", "group":5},
{"name":"Martin Peters", "group":2},
{"name":"Giorgio Carta", "group":4, "domain":2},
{"name":"tcche018c", "group":3, "domain":2, "cl":1}
],
"links":[
{"source":0, "target":10, "value":1},
{"source":1, "target":10, "value":1},
{"source":2, "target":10, "value":1}
]
};
Each node was given a group variable with the following definitions:
| Institutions | 1 |
| Staff | 2 |
| Project | 3 |
| User | 4 |
| ICHEC | 5 |
| Physics | 1 |
| Chemistry | 2 |
| Earth Science | 3 |
| Maths | 4 |
| Astrophysics | 5 |
| Engineering | 6 |
| Life Sciences | 7 |
| Computing | 8 |
| Humanities | 9 |
| A | 10 |
| B | 5 |
| C | 1 |
The connections between staff, users, projects, institutes and ICHEC were defined with links as shown in the code above. Each edge or link as a source and target. These numbers are the indices of each in the nodes array. The value of one describes it as a single connection.
var width = 500,
height = 650
color = d3.scale.category20();
var leftlegend = d3.select("#usersFig2011Leftlegend")
.append("svg")
.attr("width", 100)
.attr("height", height);
var rightlegend = d3.select("#usersFig2011Rightlegend")
.append("svg")
.attr("width", 130)
.attr("height", height);
var svg = d3.select("#usersFig2011Chart")
.append("svg")
.attr("width", width)
.attr("height", height);
var data = d3.svg.symbolTypes;
var instituteColours = {
"TCD" : colors(1),
"UCD" : colors(2),
"DCU" : colors(3),
"UCC" : colors(4),
"Tyndall": colors(5),
"NUIG" : colors(6),
"NUIM" : colors(7),
"DIAS" : colors(8),
"RCSI" : colors(9),
"UL" : colors(10),
"ITS" : colors(11),
"TG" : colors(12),
"DIT" : colors(14),
"ICHEC" : colors(13),
};
var domains = {
"Physics" : colors(1),
"Chemistry" : colors(2),
"Earth Science" : colors(3),
"Maths" : colors(4),
"Astrophysics" : colors(5),
"Engineering" : colors(6),
"Life Sciences" : colors(7),
"Computing" : colors(8),
"Humanities" : colors(9)
};
nodeSize = function(g, c) {
if (g == 5) { // ICHEC
return 800;
}
if (g == 1) { // institues
return 400;
}
if (g == 2) { // staff
return 50;
}
if (g == 3) { // project
return 40 * c;
}
return (30);
};
var col = function(g, d, n) {
if (g == 1) { // institutes
return instituteColours[n];
}
if (g == 2) { // staff
return "grey";
}
if (g == 3) {
return color(d);
}
if (g == 4) { // users
return "black";
}
if (g == 5) { // ICHEC
return "grey";
}
return color(d);
};
var sha = function(g) {
if (g == 1) { // institutes
return 6;
}
if (g == 2) { // staff
return 4;
}
if (g == 3) {
return 0;
}
if (g == 4) { // users
return 1;
}
if (g == 5) { // ICHEC
return 0;
}
return 5;
};
var wid = function(g) {
if (g == 4) { // users
return "0px";
}
return "1px";
};
d3.json("/path/to/json/file.json", function(json) {
var force = d3.layout.force()
.charge(-20)
.nodes(json.nodes)
.links(json.links)
.size([width, height])
.start();
var link = svg.selectAll("line.link")
.data(json.links).enter().append("line")
.attr("class", "link")
.style("stroke-width", function(d) { return Math.sqrt(d.value); })
.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; });
var node = svg.append("g").selectAll("path")
.data(json.nodes).enter().append("path")
.attr("transform", function(d) {
return "translate(" + d.x + "," + d.y + ")"; })
.attr("d", d3.svg.symbol()
.size(function(d) { return nodeSize(d.group, d.cl); })
.type(function(d) { return d3.svg.symbolTypes[sha(d.group)]; }))
.style("fill", function(d) {
return col(d.group, d.domain, d.name) ? col(d.group, d.domain, d.name) : color(d.domain); })
.style("stroke-width", function(d) { return wid(d.group); })
.style("stroke", function(d) {
return d3.rgb(col(d.group, d.domain, d.name) ? col(d.group, d.domain, d.name) : color(d.domain)).darker(); })
.call(force.drag);
// Institutions Legend
var insLeg = leftlegend.append("g").selectAll("path")
.data(d3.keys(instituteColours)).enter().append("path")
.attr("transform", function(d,i) {
return "translate(" + 20 + "," + (100 + i*25) + ")" + "rotate(45)"; })
.attr("d", d3.svg.symbol()
.size(50)
.type("square"))
.attr("stroke-width", ".5")
.style("fill", function(d) { return instituteColours[d]; })
.style("stroke", function(d) { return d3.rgb(instituteColours[d]).darker(); });
var insLegMainText = leftlegend.append("g").selectAll("path")
.data(['Institutions']).enter().append("text")
.attr("text-anchor", "left")
.attr("x", 15)
.attr("y", 80)
.text(function(d) { return d });
var insLegText = leftlegend.append("g").selectAll("path")
.data(d3.keys(instituteColours)).enter().append("text")
.attr("text-anchor", "left")
.attr("x", 30)
.attr("y", function(d, i) { return 100 + i*25 - 10; })
.attr("dx", 0)
.attr("dy", "1em")
.text(function(d) { return d });
// Project Domains Legend
var proDomLeg = rightlegend.append("g").selectAll("path")
.data(d3.keys(domains)).enter().append("circle") // Append circle elements
.attr("cx", 20)
.attr("cy", function(d, i) { return 100 + i*30; } )
.attr("stroke-width", ".5")
.style("fill", function(d) { return domains[d]; }) // Bar fill color
.style("stroke", function(d) { return d3.rgb(domains[d]).darker(); })
.attr("r", 5);
var proDomLegMainText = rightlegend.append("g").selectAll("path")
.data(['Project Domains']).enter().append("text")
.attr("text-anchor", "left")
.attr("x", 15)
.attr("y", 80)
.text(function(d) { return d });
var proDomLegText = rightlegend.append("g").selectAll("path")
.data(d3.keys(domains)).enter().append("text")
.attr("text-anchor", "left")
.attr("x", 30)
.attr("y", function(d, i) { return 100 + i*30 - 10; })
.attr("dx", 0)
.attr("dy", "1em")
.text(function(d) { return d });
Finally, text was added to each node and other styling for the force algorithm taken from the d3 example.
node.append("title")
.text(function(d) { return d.name; });
svg.style("opacity", 1e-6)
.transition()
.duration(1000)
.style("opacity", 1);
force.on("tick", function() {
link.attr("x1", function(d) { return d.source.x; })
.attr("y1", function(d) { return d.source.y; })
.attr("x2", function(d) { return d.target.x; })
.attr("y2", function(d) { return d.target.y; });
svg.selectAll("path")
.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; });
});
});