GUIDE
- Left-click and drag the background to move the graph
- Left-click and drag the nodes to reorganize
- Left-click a node to view first level connections
- Double left-click a node to navigate to its page
- Double left-click the background to zoom in
- Right-click the background to zoom out
sigma.utils.pkg('sigma.canvas.nodes');
sigma.canvas.nodes.image = (function() {
var _cache = {},
_loading = {},
_callbacks = {};
// Return the renderer itself:
var renderer = function(node, context, settings) {
var args = arguments,
prefix = settings('prefix') || '',
size = node[prefix + 'size'],
color = node.color || settings('defaultNodeColor'),
url = node.url;
if (_cache[url]) {
context.save();
// Draw the clipping disc:
context.beginPath();
context.arc(
node[prefix + 'x'],
node[prefix + 'y'],
node[prefix + 'size'],
0,
Math.PI * 2,
true
);
context.closePath();
context.clip();
// Draw the image
context.drawImage(
_cache[url],
node[prefix + 'x'] - size,
node[prefix + 'y'] - size,
2 * size,
2 * size
);
// Quit the "clipping mode":
context.restore();
// Draw the border:
context.beginPath();
context.arc(
node[prefix + 'x'],
node[prefix + 'y'],
node[prefix + 'size'],
0,
Math.PI * 2,
true
);
context.lineWidth = 1;
context.strokeStyle = node.color || settings('defaultNodeColor');
context.stroke();
} else {
sigma.canvas.nodes.image.cache(url);
sigma.canvas.nodes.def.apply(
sigma.canvas.nodes,
args
);
}
};
// Let's add a public method to cache images, to make it possible to
// preload images before the initial rendering:
renderer.cache = function(url, callback) {
if (callback)
_callbacks[url] = callback;
if (_loading[url])
return;
var img = new Image();
img.onload = function() {
_loading[url] = false;
_cache[url] = img;
if (_callbacks[url]) {
_callbacks[url].call(this, img);
delete _callbacks[url];
}
};
_loading[url] = true;
img.src = url;
};
return renderer;
})();
var i,
s,
o,
offset_left = 0.5,
N = 1,
E = 40,
C = 5,
d = 0.5,
cs = [],
g = {
nodes: [],
edges: []
};
if (!sigma.classes.graph.hasMethod('neighbors')){
sigma.classes.graph.addMethod('neighbors', function(nodeId) {
var k,
neighbors = {},
index = this.allNeighborsIndex[nodeId] || {};
for (k in index)
neighbors[k] = this.nodesIndex[k];
return neighbors;
});
}
//adding the central node
g.nodes.push({
id: 4051,
label: 'Pierre Charneau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig10-150x150.jpeg',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
var biggest_node_size = 0;
N=6
// adding node
var x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
g.nodes.push({
id: 182338,
label: 'NEWS: New publication – Potent Human Broadly SARS-CoV-2 Neutralizing IgA and IgG Antibodies Effective Against Omicron BA.1 and BA.2',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/new-publication-potent-human-broadly-sars-cov-2-neutralizing-iga-and-igg-antibodies-effective-against-omicron-ba-1-and-ba-2/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4051182338,
size: 0.5,
source: 4051,
target: 182338,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 83681,
label: 'Cyril Planchais',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/01/research.pasteur.fr_cyril-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/cyril-planchais/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233883681,
size: 0.5,
source: 182338,
target: 83681 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 116577,
label: 'Ignacio Fernandez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/11/research_pasteur-img_4481-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-ignacio-fernandez/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338116577,
size: 0.5,
source: 182338,
target: 116577 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4817,
label: 'Timothée Bruel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/09/research_pasteur-photo2-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/timothee-bruel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384817,
size: 0.5,
source: 182338,
target: 4817 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 42508,
label: 'Guilherme Dias de Melo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research_pasteur-guilherme-dias-de-melo-photo-pour-profil-prix-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/guilherme-dias-de-melo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233842508,
size: 0.5,
source: 182338,
target: 42508 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8357,
label: 'Matthieu Prot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_372261-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/matthieu-prot/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823388357,
size: 0.5,
source: 182338,
target: 8357 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 121828,
label: 'Maxime Beretta',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=121828',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338121828,
size: 0.5,
source: 182338,
target: 121828 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 56127,
label: 'Pablo Guardado-Calvo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research_pasteur-pablo-guardado-calvo-1670697779326-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/pablo-guardado-calvo/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233856127,
size: 0.5,
source: 182338,
target: 56127 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 95622,
label: 'Jérémy Dufloo',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=95622',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233895622,
size: 0.5,
source: 182338,
target: 95622 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 93674,
label: 'Luis Molinos-Albert',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=93674',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233893674,
size: 0.5,
source: 182338,
target: 93674 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4727,
label: 'Marija Backovic',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-marija-backovic-img-3538-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/marija-backovic/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384727,
size: 0.5,
source: 182338,
target: 4727 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 139594,
label: 'Jeanne Chiaravalli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/02/research_pasteur-mdizoduw-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/jeanne-chiaravalli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338139594,
size: 0.5,
source: 182338,
target: 139594 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 91407,
label: 'Emilie Giraud',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/06/research_pasteur-emilie-de-la-llave-giraud-lrrieuh--400x400-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/emilie-giraud/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233891407,
size: 0.5,
source: 182338,
target: 91407 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 145954,
label: 'Laurine Conquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/08/research_pasteur-laurine-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laurine-conquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338145954,
size: 0.5,
source: 182338,
target: 145954 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 134005,
label: 'Delphine Planas',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/10/research_pasteur-delphine_planas-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/delphine-planas/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 182338134005,
size: 0.5,
source: 182338,
target: 134005 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3940,
label: 'Isabelle Staropoli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_image-32-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/isabelle-staropoli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823383940,
size: 0.5,
source: 182338,
target: 3940 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 21458,
label: 'Florence Guivel-Benhassine',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-flo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/florence-guivel/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233821458,
size: 0.5,
source: 182338,
target: 21458 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4578,
label: 'Thierry Hieu',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4578',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384578,
size: 0.5,
source: 182338,
target: 4578 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 99492,
label: 'Mikaël Boullé',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/mikael-boulle/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 18233899492,
size: 0.5,
source: 182338,
target: 99492 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 7878,
label: 'Marie-Noelle Ungeheuer',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_43070-e1437491181428-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-noelle-ungeheuer/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823387878,
size: 0.5,
source: 182338,
target: 7878 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4051) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1823384051,
size: 0.5,
source: 182338,
target: 4051 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4920,
label: 'Sylvie van Der Werf',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/07/research_pasteur-photo_sylvie-vdw1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/sylvie-van-der-werf/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384920,
size: 0.5,
source: 182338,
target: 4920 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 7850,
label: 'Fabrice Agou',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/06/research.pasteur.fr_image010-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fabrice-agou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823387850,
size: 0.5,
source: 182338,
target: 7850 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4765,
label: 'Etienne Simon-Loriere',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_e.simon-loriere_1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/etienne-simon-loriere/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384765,
size: 0.5,
source: 182338,
target: 4765 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3977,
label: 'Hervé Bourhy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig50-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/herve-bourhy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823383977,
size: 0.5,
source: 182338,
target: 3977 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4644,
label: 'Xavier Montagutelli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-xavier-montagutelli-xm-web-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/xavier-montagutelli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384644,
size: 0.5,
source: 182338,
target: 4644 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4724,
label: 'Félix A. Rey',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-enfelix-a-reyfrfelix-rey-portrait-felixrey-1-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/felix-rey/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384724,
size: 0.5,
source: 182338,
target: 4724 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4821,
label: 'Olivier Schwartz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_photo-o.schwartz-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/olivier-schwartz/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384821,
size: 0.5,
source: 182338,
target: 4821 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4575,
label: 'Hugo Mouquet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/05/research_pasteur-mouquet_id-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/hugo-mouquet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1823384575,
size: 0.5,
source: 182338,
target: 4575 });
// adding node
var x_node = Math.cos(2 * 1 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 1 * Math.PI / N) * 10;
g.nodes.push({
id: 172440,
label: 'PROJECT: Towards understanding of immunostimulatory properties of SARS-CoV-2 RNAs',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/towards-understanding-of-immunostimulatory-properties-of-sars-cov-2-rnas/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4051172440,
size: 0.5,
source: 4051,
target: 172440,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 57915,
label: 'Rachel Legendre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research_pasteur-rachel-legendre-img-20201028-145758-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/rachel-legendre/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 17244057915,
size: 0.5,
source: 172440,
target: 57915 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 89206,
label: 'Yannis Rahou',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/01/research_pasteur-photo-de-moi-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/yannis-rahou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 17244089206,
size: 0.5,
source: 172440,
target: 89206 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8400,
label: 'Valérie Najburg',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dsc08042-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/valerie-najburg/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1724408400,
size: 0.5,
source: 172440,
target: 8400 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4051) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1724404051,
size: 0.5,
source: 172440,
target: 4051 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4881,
label: 'Frédéric Tangy',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig11-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/frederic-tangy/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1724404881,
size: 0.5,
source: 172440,
target: 4881 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4920) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1724404920,
size: 0.5,
source: 172440,
target: 4920 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4887,
label: 'Anastasia V. Komarova',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_ak-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/anastasia-komarova/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1724404887,
size: 0.5,
source: 172440,
target: 4887 });
// adding node
var x_node = Math.cos(2 * 2 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 2 * Math.PI / N) * 10;
g.nodes.push({
id: 164027,
label: 'TEAM: Institut Pasteur-TheraVectys Joint Laboratory',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/institut-pasteur-theravectys-joint-laboratory/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4051164027,
size: 0.5,
source: 4051,
target: 164027,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3993,
label: 'Laleh Majlessi',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/12/research_pasteur-photo-lm-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/laleh-majlessi/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1640273993,
size: 0.5,
source: 164027,
target: 3993 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 65932,
label: 'François Anna',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/francois-anna/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 16402765932,
size: 0.5,
source: 164027,
target: 65932 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 188534,
label: 'Anastasia Goloudina',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/anastasia-goloudina/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027188534,
size: 0.5,
source: 164027,
target: 188534 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 188532,
label: 'Laëtitia Douguet',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/laetitia-douguet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027188532,
size: 0.5,
source: 164027,
target: 188532 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4899,
label: 'Kirill Nemirov',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/kirill-nemirov/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1640274899,
size: 0.5,
source: 164027,
target: 4899 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 7786,
label: 'Maryline Bourgine',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-maryline-bourgine-moi-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/maryline-bourgine/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1640277786,
size: 0.5,
source: 164027,
target: 7786 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 6835,
label: 'Catherine Blanc',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/catherine-blanc/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1640276835,
size: 0.5,
source: 164027,
target: 6835 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 188530,
label: 'Pierre Authié',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/pierre-authie/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027188530,
size: 0.5,
source: 164027,
target: 188530 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3996,
label: 'Fabien Le Chevalier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/10/research.pasteur.fr_20150928mip_6639--150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fabien-le-chevalier/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1640273996,
size: 0.5,
source: 164027,
target: 3996 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 133893,
label: 'Ingrid Fert',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/ingrid-fert/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027133893,
size: 0.5,
source: 164027,
target: 133893 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 188527,
label: 'Fanny Moncoq',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/fanny-moncoq/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027188527,
size: 0.5,
source: 164027,
target: 188527 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 188522,
label: 'Amandine Noirat',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/amandine-noirat/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027188522,
size: 0.5,
source: 164027,
target: 188522 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 188536,
label: 'Benjamin Vesin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/10/research_pasteur-benjamin-vesin-img-20220724-wa0027-3-1-1-e1665656552693-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/benjamin-vesin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027188536,
size: 0.5,
source: 164027,
target: 188536 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 221310,
label: 'Fabienne Tzvetkov-Ricard',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/fabienne-tzvetkov-ricard/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 164027221310,
size: 0.5,
source: 164027,
target: 221310 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4051) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1640274051,
size: 0.5,
source: 164027,
target: 4051 });
// adding node
var x_node = Math.cos(2 * 3 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 3 * Math.PI / N) * 10;
g.nodes.push({
id: 163902,
label: 'NEWS: Humoral immunity to SARS-CoV-2 and seasonal coronaviruses in children and adults in north-eastern France',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/news/humoral-immunity-to-sars-cov-2-and-seasonal-coronaviruses-in-children-and-adults-in-north-eastern-france/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4051163902,
size: 0.5,
source: 4051,
target: 163902,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 157520,
label: 'Tom Woudenberg',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=157520',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 163902157520,
size: 0.5,
source: 163902,
target: 157520 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 157508,
label: 'Stéphane Pelleau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/04/research_pasteur-stephane-pelleau-pelleau-stephane-1307-3-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/stephane-pelleau/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 163902157508,
size: 0.5,
source: 163902,
target: 157508 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 65932) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 16390265932,
size: 0.5,
source: 163902,
target: 65932 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 156774,
label: 'Mikaël Attia',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/mikael-attia/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 163902156774,
size: 0.5,
source: 163902,
target: 156774 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 8453,
label: 'Françoise Donnadieu',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_donadieu-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/francoise-donnadieu/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1639028453,
size: 0.5,
source: 163902,
target: 8453 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4051) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1639024051,
size: 0.5,
source: 163902,
target: 4051 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4926,
label: 'Caroline Demeret',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/09/research.pasteur.fr_dscn7482-copie-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/caroline-demeret/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1639024926,
size: 0.5,
source: 163902,
target: 4926 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4920) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1639024920,
size: 0.5,
source: 163902,
target: 4920 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 2624,
label: 'Arnaud Fontanet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_arnaud-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/arnaud-fontanet/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1639022624,
size: 0.5,
source: 163902,
target: 2624 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 94079,
label: 'Michael White',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/08/research_pasteur-michael-white-michael-photo-cropped-2-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fr-michael-white/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 16390294079,
size: 0.5,
source: 163902,
target: 94079 });
// adding node
var x_node = Math.cos(2 * 4 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 4 * Math.PI / N) * 10;
g.nodes.push({
id: 141840,
label: 'PROJECT: CORONABODIES',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/project/coronabodies/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 4051141840,
size: 0.5,
source: 4051,
target: 141840,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 749,
label: 'Pierre Lafaye',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/01/Lafaye-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/pierre-lafaye/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 141840749,
size: 0.5,
source: 141840,
target: 749 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4883,
label: 'Nicolas Escriou',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/nicolas-escriou/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1418404883,
size: 0.5,
source: 141840,
target: 4883 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4724) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1418404724,
size: 0.5,
source: 141840,
target: 4724 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 2606,
label: 'Stéphane Petres',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/11/research_pasteur-img_1660-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/stephane-petres/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1418402606,
size: 0.5,
source: 141840,
target: 2606 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4051) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 1418404051,
size: 0.5,
source: 141840,
target: 4051 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 99324,
label: 'Gabriel Aymé',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/03/research_pasteur-iphone-006-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gabriel-ayme/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 14184099324,
size: 0.5,
source: 141840,
target: 99324 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 976,
label: 'Gaëlle Chauveau-Le Friec',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/02/chauveau1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/gaelle-chauveau-le-friec/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 141840976,
size: 0.5,
source: 141840,
target: 976 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 6839,
label: 'François Déjardin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2018/06/research_pasteur-francois-avril-2015-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francois-dejardin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1418406839,
size: 0.5,
source: 141840,
target: 6839 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4929,
label: 'Annette Martin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_annettemartin-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/annette-martin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 1418404929,
size: 0.5,
source: 141840,
target: 4929 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 116577) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 141840116577,
size: 0.5,
source: 141840,
target: 116577 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 56127) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 14184056127,
size: 0.5,
source: 141840,
target: 56127 });
// adding node
var x_node = Math.cos(2 * 5 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 5 * Math.PI / N) * 10;
g.nodes.push({
id: 64262,
label: 'PROJECT: Group for AIDS Research',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/02/research.pasteur.fr_grs-logo-3-square-1-150x150.png',
page_url: 'https://research.pasteur.fr/en/project/groupe-reflexion-sida/',
size: 35,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 405164262,
size: 0.5,
source: 4051,
target: 64262,
});
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4818,
label: 'Nicoletta Casartelli',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/06/research_pasteur-682135-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nicoletta-casartelli/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642624818,
size: 0.5,
source: 64262,
target: 4818 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3931,
label: 'Lisa Chakrabarti',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/11/research.pasteur.fr_lc2-photo-medium-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lisa-chakrabarti/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642623931,
size: 0.5,
source: 64262,
target: 3931 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4575) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624575,
size: 0.5,
source: 64262,
target: 4575 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4600,
label: 'Asier Sáez-Cirión',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_dsc2316-e1441290951360-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/asier-saez-cirion/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642624600,
size: 0.5,
source: 64262,
target: 4600 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4597,
label: 'Michaela Muller-Trutwin',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_michaela-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/michaela-muller-trutwin/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642624597,
size: 0.5,
source: 64262,
target: 4597 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4821) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624821,
size: 0.5,
source: 64262,
target: 4821 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4881) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624881,
size: 0.5,
source: 64262,
target: 4881 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4963,
label: 'Simon Wain-Hobson',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig2-1-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/simon-wain-hobson/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642624963,
size: 0.5,
source: 64262,
target: 4963 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 4051) {
n.size = n.size + 8;
}
});
//link to content
g.edges.push({
id: 642624051,
size: 0.5,
source: 64262,
target: 4051 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 3928,
label: 'Fernando Arenzana-Seisdedos',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig60-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/fernando-arenzana-seisdedos/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642623928,
size: 0.5,
source: 64262,
target: 3928 });
//check if content already exist
if (x_node<0){
x_site = x_node + ((Math.random() * 2)-1) - offset_left;
}else{
x_site = x_node + ((Math.random() * 2)-1) + offset_left;
}
if (y_node<0){
y_site = y_node + ((Math.random() * 2)-1) - offset_left;
}else{
y_site = y_node + ((Math.random() * 2)-1) + offset_left;
}
// adding site
g.nodes.push({
id: 4052,
label: 'Francesca Di Nunzio',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2019/01/research_pasteur-dscf1697-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/francesca-di-nunzio/',
x: x_site,
y: y_site,
size: 10,
color: '#dddddd'
});
//link to content
g.edges.push({
id: 642624052,
size: 0.5,
source: 64262,
target: 4052 });
var s = new sigma({
//container: document.getElementById('graph-main'),
graph: g,
renderer: {
// IMPORTANT:
// This works only with the canvas renderer, so the
// renderer type set as "canvas" is necessary here.
container: document.getElementById('graph-main'),
type: 'canvas'
},
settings: {
minNodeSize: 6,
maxNodeSize: 35,
mouseWheelEnabled: false,
font: 'Montserrat',
labelThreshold:25,
borderSize:1,
defaultNodeBorderColor: '#999',
sideMargin:25,
}
});
// We first need to save the original colors of our
// nodes and edges, like this:
s.graph.nodes().forEach(function(n) {
n.originalColor = n.color;
});
s.graph.edges().forEach(function(e) {
e.originalColor = e.color;
});
// When a node is clicked, we check for each node
// if it is a neighbor of the clicked one. If not,
// we set its color as grey, and else, it takes its
// original color.
// We do the same for the edges, and we only keep
// edges that have both extremities colored.
s.bind('clickNode', function(e) {
var nodeId = e.data.node.id,
toKeep = s.graph.neighbors(nodeId);
toKeep[nodeId] = e.data.node;
s.graph.nodes().forEach(function(n) {
if (toKeep[n.id])
n.color = '#35a9f5';
else
n.color = '#dddddd';
});
s.graph.edges().forEach(function(e) {
if (toKeep[e.source] && toKeep[e.target])
e.color = '#35a9f5';
else
e.color = '#dddddd';
});
// Since the data has been modified, we need to
// call the refresh method to make the colors
// update effective.
s.refresh();
});
// When the stage is clicked, we just color each
// node and edge with its original color.
s.bind('clickStage', function(e) {
s.graph.nodes().forEach(function(n) {
n.color = n.originalColor;
});
s.graph.edges().forEach(function(e) {
e.color = e.originalColor;
});
// Same as in the previous event:
s.refresh();
});
s.bind("doubleClickNode", function (e) {
$("#canvas-wrap, .sigma-scene, .sigma-mouse").val();
ajax_load_page( e.data.node.page_url );
});
var c = s.camera;
s.bind("rightClickStage", function (e) {
sigma.misc.animation.camera(c, {
ratio: c.ratio * c.settings('zoomingRatio')
}, {
duration: 200
});
});
// Configure the noverlap layout:
var noverlapListener = s.configNoverlap({
nodeMargin: 10,
scaleNodes: 0.3,
gridSize: 1,
easing: 'quadraticInOut', // animation transition function
duration: 4000 // animation duration. Long here for the purposes of this example only
});
// Bind the events:
noverlapListener.bind('start stop interpolate', function(e) {
//console.log(e.type);
if(e.type === 'start') {
//console.time('noverlap');
}
if(e.type === 'interpolate') {
//console.timeEnd('noverlap');
}
});
// Start the layout:
s.startNoverlap();
//s.refresh();
// Initialize the dragNodes plugin:
var dragListener = sigma.plugins.dragNodes(s, s.renderers[0]);
dragListener.bind('startdrag', function(event) {
});
dragListener.bind('drag', function(event) {
});
dragListener.bind('drop', function(event) {
});
dragListener.bind('dragend', function(event) {
});