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
// graph team
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: 118840,
label: 'UMR3523 – Chemistry for Life Sciences (Chem4Life)',
type: 'image',
url: '',
x: 0,
y: 0,
size: 30,
color: '#DDDDDD'
});
N=2
var x_node = Math.cos(2 * 0 * Math.PI / N) * 2;
var y_node = Math.sin(2 * 0 * Math.PI / N) * 2;
var biggest_node_size = 0;
//check if content already exist
x_site = Math.cos(2 * 0 * Math.PI / N) * 2;
y_site = Math.sin(2 * 0 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: ,
label: 'Ajax Graph',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/ajax-graph/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 118840,
size: 0.5,
source: 118840,
target: });
//check if content already exist
x_site = Math.cos(2 * 1 * Math.PI / N) * 2;
y_site = Math.sin(2 * 1 * Math.PI / N) * 2;
// adding site
g.nodes.push({
id: 95915,
label: 'Paola Arimondo',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/10/research_pasteur-p-arimondo_5757-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/paola-arimondo/',
x: x_site,
y: y_site,
size: 16,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 11884095915,
size: 0.5,
source: 118840,
target: 95915 });
// update positions
x_node = Math.cos(2 * 0 * Math.PI / N) * 10;
y_node = Math.sin(2 * 0 * Math.PI / N) * 10;
N=14
// 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: 231352,
label: 'EVENT: 3rd PPU Oxford bilateral summit “Chimie Biologique” – “Tackling AntiMicrobial Resistance, together”',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/save-the-date-register-3rd-ppu-oxford-bilateral-summit-chimie-biologique-tackling-antimicrobial-resistance-together/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840231352,
size: 0.5,
source: 118840,
target: 231352 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 23135295915,
size: 0.5,
source: 231352,
target: 95915 });
//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: 7209,
label: 'Philippe Glaser',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_ha41-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/philippe-glaser/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 2313527209,
size: 0.5,
source: 231352,
target: 7209 });
//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: 7063,
label: 'Monica Sala',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-monica-sala-research-pasteur-monica-sala-monicaphoto2020-3-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/monica-sala/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 2313527063,
size: 0.5,
source: 231352,
target: 7063 });
//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: 161202,
label: 'Emilie Boutet',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/06/research_pasteur-emilie-boutet-essai-jpeg-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/emilie-boutet/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 231352161202,
size: 0.5,
source: 231352,
target: 161202 });
// 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: 231246,
label: 'EVENT: Thesis defense – Synthesis and identification of chemical compounds targeting DNA Methylation reader proteins (By Jean Contreras)',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/soutenance-de-these-synthesis-and-identification-of-chemical-compounds-targeting-dna-methylation-reader-proteins-par-jean-contreras/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840231246,
size: 0.5,
source: 118840,
target: 231246 });
//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: 154480,
label: 'Jean Contreras',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/jean-contreras/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 231246154480,
size: 0.5,
source: 231246,
target: 154480 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 23124695915,
size: 0.5,
source: 231246,
target: 95915 });
// 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: 194255,
label: 'EVENT: New antiviral strategies: from bench to bedside – A joint Société de Chimie Thérapeutique, Société Française de Virologie & Institut Pasteur Symposium',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/save-the-date-new-antiviral-strategies-form-bench-to-bedside-a-joint-societe-de-chimie-therapeutique-societe-francaise-de-virologie-institut-pasteur-symposium/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840194255,
size: 0.5,
source: 118840,
target: 194255 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 19425595915,
size: 0.5,
source: 194255,
target: 95915 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 161202) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 194255161202,
size: 0.5,
source: 194255,
target: 161202 });
// 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: 190575,
label: 'COURSE: Resistance to antibacterial agents MOOC',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/11/research_pasteur-resistance-to-antibacterial-agents-mooc-twit-1-mooc--150x150.jpg',
page_url: 'https://research.pasteur.fr/en/course/resistance-to-antibacterial-agents-mooc/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840190575,
size: 0.5,
source: 118840,
target: 190575 });
//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: 4541,
label: 'Didier Mazel',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/05/research_pasteur-didier-mazel-img-6478-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/didier-mazel/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1905754541,
size: 0.5,
source: 190575,
target: 4541 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7209) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1905757209,
size: 0.5,
source: 190575,
target: 7209 });
//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: 187839,
label: 'Paul Rochette',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/09/research_pasteur-paul-rochette-index-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/paul-rochette/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 190575187839,
size: 0.5,
source: 190575,
target: 187839 });
//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: 4913,
label: 'Patrick Trieu-Cuot',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_photo_p_trieu_cuot_aout01-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/patrick-trieu-cuot/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1905754913,
size: 0.5,
source: 190575,
target: 4913 });
// 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: 180798,
label: 'EVENT: 2nd PPU-Oxford Bilateral Summit ” Chimie Biologique” – Linking Chemistry and Microbiology to fight human Infectious Diseases',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/2nd-ppu-oxford-bilateral-summit-chimie-biologique-linking-chemistry-and-microbiology-to-fight-human-infectious-diseases/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840180798,
size: 0.5,
source: 118840,
target: 180798 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 18079895915,
size: 0.5,
source: 180798,
target: 95915 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7209) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1807987209,
size: 0.5,
source: 180798,
target: 7209 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 161202) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 180798161202,
size: 0.5,
source: 180798,
target: 161202 });
//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: 4509,
label: 'Nathalie Pardigon',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/?post_type=member&p=4509',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1807984509,
size: 0.5,
source: 180798,
target: 4509 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7063) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1807987063,
size: 0.5,
source: 180798,
target: 7063 });
// 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: 180752,
label: 'EVENT: 2nd joint Université Paris Cité – Institut Pasteur Antimicrobial Resistance Symposium & Microb’UP Anniversary meeting',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/call-for-astracts-2nd-joint-symposium-universite-paris-cite-institut-pasteur-antimicrobial-resistance/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840180752,
size: 0.5,
source: 118840,
target: 180752 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 18075295915,
size: 0.5,
source: 180752,
target: 95915 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7209) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1807527209,
size: 0.5,
source: 180752,
target: 7209 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 161202) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 180752161202,
size: 0.5,
source: 180752,
target: 161202 });
// adding node
var x_node = Math.cos(2 * 6 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 6 * Math.PI / N) * 10;
g.nodes.push({
id: 180749,
label: 'EVENT: Research and innovation to reduce the burden of antibiotic resistance: strengthening the European action',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/research-and-innovation-to-reduce-the-burden-of-antibiotic-resistance-strengthening-the-european-action/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840180749,
size: 0.5,
source: 118840,
target: 180749 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 18074995915,
size: 0.5,
source: 180749,
target: 95915 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7209) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1807497209,
size: 0.5,
source: 180749,
target: 7209 });
// adding node
var x_node = Math.cos(2 * 7 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 7 * Math.PI / N) * 10;
g.nodes.push({
id: 173453,
label: 'EVENT: Postponed – Joint Conference on Antimicrobial Drug Development',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/joint-conference-on-antimicrobial-drug-development/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840173453,
size: 0.5,
source: 118840,
target: 173453 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 17345395915,
size: 0.5,
source: 173453,
target: 95915 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7209) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1734537209,
size: 0.5,
source: 173453,
target: 7209 });
// adding node
var x_node = Math.cos(2 * 8 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 8 * Math.PI / N) * 10;
g.nodes.push({
id: 165579,
label: 'EVENT: 1st Joint Institut Pasteur – Université de Paris Antimicrobial resistance Symposium',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/event/joint-institut-pasteur-universite-de-paris-antimicrobial-resistance-symposium/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840165579,
size: 0.5,
source: 118840,
target: 165579 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 16557995915,
size: 0.5,
source: 165579,
target: 95915 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 7209) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 1655797209,
size: 0.5,
source: 165579,
target: 7209 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 161202) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 165579161202,
size: 0.5,
source: 165579,
target: 161202 });
// adding node
var x_node = Math.cos(2 * 9 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 9 * Math.PI / N) * 10;
g.nodes.push({
id: 62878,
label: 'TEAM: Bioorganic chemistry of nucleic acids',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/bioorganic-chemistry-of-nucleic-acids/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 11884062878,
size: 0.5,
source: 118840,
target: 62878 });
//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: 8302,
label: 'Marie-Ange Garnier',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_img_47534-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marie-ange-garnier/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 628788302,
size: 0.5,
source: 62878,
target: 8302 });
//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: 75573,
label: 'Fabienne Levi-Acobas',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/fabienne-levi-acobas/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6287875573,
size: 0.5,
source: 62878,
target: 75573 });
//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: 155472,
label: 'Alix Bouvier-Müller',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2021/03/research_pasteur-alix-bouvier-muller-alix-bouvier-mueller-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/alix-bouvier-muller/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878155472,
size: 0.5,
source: 62878,
target: 155472 });
//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: 177454,
label: 'Nazarii Sabat',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/03/research_pasteur-nazarii-sabat-photo-site-4-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/nazarii-sabat/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878177454,
size: 0.5,
source: 62878,
target: 177454 });
//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: 182494,
label: 'Camélia Kitoun',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/harley-betts/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878182494,
size: 0.5,
source: 62878,
target: 182494 });
//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: 214687,
label: 'Pierre Nicolas Bizat',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/pierre-nicolas-bizat/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878214687,
size: 0.5,
source: 62878,
target: 214687 });
//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: 214697,
label: 'Usman Akhtar',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/usman-akhtar/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878214697,
size: 0.5,
source: 62878,
target: 214697 });
//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: 216820,
label: 'Maria Dalla-Pozza',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/maria-dalla-pozza/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878216820,
size: 0.5,
source: 62878,
target: 216820 });
//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: 225074,
label: 'Yan BADJI',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/yan-badji/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878225074,
size: 0.5,
source: 62878,
target: 225074 });
//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: 226191,
label: 'Alexandre QUELHAS',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/alexandre-quelhas/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878226191,
size: 0.5,
source: 62878,
target: 226191 });
//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: 232311,
label: 'Sophie Battedou',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/sophie-battedou/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878232311,
size: 0.5,
source: 62878,
target: 232311 });
//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: 232316,
label: 'Amina Tahir',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/amina-tahir/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 62878232316,
size: 0.5,
source: 62878,
target: 232316 });
//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: 62876,
label: 'Marcel Hollenstein',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2016/01/research.pasteur.fr_thrashmanlessthrash-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/marcel-hollenstein/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6287862876,
size: 0.5,
source: 62878,
target: 62876 });
// adding node
var x_node = Math.cos(2 * 10 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 10 * Math.PI / N) * 10;
g.nodes.push({
id: 101330,
label: 'TEAM: Epigenetic Chemical Biology',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2020/04/research_pasteur-unite-p-arimondo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/chimie-biologique-epigenetique/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 118840101330,
size: 0.5,
source: 118840,
target: 101330 });
//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: 101558,
label: 'Ludovic Halby',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/ludovic-halby/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 101330101558,
size: 0.5,
source: 101330,
target: 101558 });
//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: 8702,
label: 'Corinne Jallet',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/corinne-jallet/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1013308702,
size: 0.5,
source: 101330,
target: 8702 });
//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: 4697,
label: 'Frédéric Bonhomme',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_20150827_132948-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/frederic-bonhomme/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1013304697,
size: 0.5,
source: 101330,
target: 4697 });
//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: 4695,
label: 'Sophie Vichier-Guerre',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_photo-web-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sophie-vichier-guerre/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1013304695,
size: 0.5,
source: 101330,
target: 4695 });
//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: 8306,
label: 'Valérie Huteau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/08/research.pasteur.fr_vh1-150x150.png',
page_url: 'https://research.pasteur.fr/en/member/valerie-huteau/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1013308306,
size: 0.5,
source: 101330,
target: 8306 });
//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: 8305,
label: 'Laurence Dugue',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_laurencephoto-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/laurence-dugue/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 1013308305,
size: 0.5,
source: 101330,
target: 8305 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 154480) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 101330154480,
size: 0.5,
source: 101330,
target: 154480 });
//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: 139744,
label: 'Alexandra Fillion',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/alexandra-fillion/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 101330139744,
size: 0.5,
source: 101330,
target: 139744 });
//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: 179640,
label: 'Sergio Mallart',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/sergio-mallart/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 101330179640,
size: 0.5,
source: 101330,
target: 179640 });
//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: 197952,
label: 'Roxane Bayle',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/roxane-bayle/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 101330197952,
size: 0.5,
source: 101330,
target: 197952 });
//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: 222104,
label: 'Clément Peyroux',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/clement-peyroux/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 101330222104,
size: 0.5,
source: 101330,
target: 222104 });
//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: 222112,
label: 'Chloé Breton-Patient',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/chloe-breton-patient/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 101330222112,
size: 0.5,
source: 101330,
target: 222112 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 95915) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 10133095915,
size: 0.5,
source: 101330,
target: 95915 });
// adding node
var x_node = Math.cos(2 * 11 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 11 * Math.PI / N) * 10;
g.nodes.push({
id: 62878,
label: 'TEAM: Bioorganic chemistry of nucleic acids',
x: x_node,
y: y_node,
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/team/bioorganic-chemistry-of-nucleic-acids/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 11884062878,
size: 0.5,
source: 118840,
target: 62878 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8302) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 628788302,
size: 0.5,
source: 62878,
target: 8302 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 75573) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 6287875573,
size: 0.5,
source: 62878,
target: 75573 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 155472) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878155472,
size: 0.5,
source: 62878,
target: 155472 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 177454) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878177454,
size: 0.5,
source: 62878,
target: 177454 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 182494) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878182494,
size: 0.5,
source: 62878,
target: 182494 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 214687) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878214687,
size: 0.5,
source: 62878,
target: 214687 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 214697) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878214697,
size: 0.5,
source: 62878,
target: 214697 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 216820) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878216820,
size: 0.5,
source: 62878,
target: 216820 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 225074) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878225074,
size: 0.5,
source: 62878,
target: 225074 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 226191) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878226191,
size: 0.5,
source: 62878,
target: 226191 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 232311) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878232311,
size: 0.5,
source: 62878,
target: 232311 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 232316) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 62878232316,
size: 0.5,
source: 62878,
target: 232316 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 62876) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 6287862876,
size: 0.5,
source: 62878,
target: 62876 });
// adding node
var x_node = Math.cos(2 * 12 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 12 * Math.PI / N) * 10;
g.nodes.push({
id: 15050,
label: 'TEAM: Chemogenomic and Biological Screening Platform (PF-CCB)',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_14287-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/fabrice-agou-team/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 11884015050,
size: 0.5,
source: 118840,
target: 15050 });
//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: 15050139594,
size: 0.5,
source: 15050,
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: 7851,
label: 'Alix Boucharlat',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2017/09/research_pasteur-file-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/alix-boucharlat/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 150507851,
size: 0.5,
source: 15050,
target: 7851 });
//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: 1734,
label: 'Agnès Zettor',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/03/DSC9333-e1433491207149-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/agnes-zettor/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 150501734,
size: 0.5,
source: 15050,
target: 1734 });
//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: 1505099492,
size: 0.5,
source: 15050,
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: 175733,
label: 'Marine Ghazarian',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/02/research_pasteur-marine-ghazarian-image-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/marine-ghazarian/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050175733,
size: 0.5,
source: 15050,
target: 175733 });
//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: 1505091407,
size: 0.5,
source: 15050,
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: 189062,
label: 'Salomé Guez',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2022/10/research_pasteur-salome-guez-capture-decran-2022-10-18-a-09.09.52-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/salome-guez/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050189062,
size: 0.5,
source: 15050,
target: 189062 });
//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: 196337,
label: 'Lucas Facchinetti',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/02/research_pasteur-lucas-facchinetti-1704461585694-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/lucas-facchinetti/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050196337,
size: 0.5,
source: 15050,
target: 196337 });
//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: 195773,
label: 'Siham Schacre',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/siham-schacre/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050195773,
size: 0.5,
source: 15050,
target: 195773 });
//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: 194602,
label: 'Cyrielle Durand',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/01/research_pasteur-cyrielle-durand-snapchat-1724420620-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/cyrielle-durand/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050194602,
size: 0.5,
source: 15050,
target: 194602 });
//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: 216782,
label: 'Virginie Belz',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2024/01/research_pasteur-envirginie-belzfrvirginie-belz-belz-virginie-0010-hd-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/virginie-belz/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050216782,
size: 0.5,
source: 15050,
target: 216782 });
//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: 229475,
label: 'Alexandrine Capra',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/alexandrine-capra/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050229475,
size: 0.5,
source: 15050,
target: 229475 });
//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: 199054,
label: 'Stéphanie Guillon',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2023/03/research_pasteur-stephanie-guillon-guillon-stephanie-photo-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/stephanie-guillon/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 15050199054,
size: 0.5,
source: 15050,
target: 199054 });
//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: 150507850,
size: 0.5,
source: 15050,
target: 7850 });
// adding node
var x_node = Math.cos(2 * 13 * Math.PI / N) * 10;
var y_node = Math.sin(2 * 13 * Math.PI / N) * 10;
g.nodes.push({
id: 6152,
label: 'TEAM: Chemistry of Biomolecules',
x: x_node,
y: y_node,
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_institutpasteur_383851-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/team/chemistry-of-biomolecules/',
size: 24,
color: '#DDDDDD'
});
//link content to central post
g.edges.push({
id: 1188406152,
size: 0.5,
source: 118840,
target: 6152 });
//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: 4586,
label: 'Sylvie Bay',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_sylviebay-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/sylvie-bay/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 61524586,
size: 0.5,
source: 6152,
target: 4586 });
//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: 112554,
label: 'Marion Bouchet',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/marion-bouchet/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6152112554,
size: 0.5,
source: 6152,
target: 112554 });
//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: 4592,
label: 'Yves-Marie Coic',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/yves-marie-coic/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 61524592,
size: 0.5,
source: 6152,
target: 4592 });
//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: 79267,
label: 'Johan Cornil',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/johan-cornil/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 615279267,
size: 0.5,
source: 6152,
target: 79267 });
//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: 8298,
label: 'Christelle Ganneau',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/11/research.pasteur.fr_dscn3897b-150x150.jpg',
page_url: 'https://research.pasteur.fr/en/member/christelle-ganneau/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 61528298,
size: 0.5,
source: 6152,
target: 8298 });
//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: 8300,
label: 'Catherine Guerreiro Inverno',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/catherine-guerreiro-inverno/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 61528300,
size: 0.5,
source: 6152,
target: 8300 });
//check if content already exist
// update node size depending on the amount of edges
g.nodes.forEach(function(n) {
if (n.id == 8302) {
n.size = n.size + 10;
if ( n.size > biggest_node_size ){
biggest_node_size = n.size;
}
}
});
g.nodes.forEach(function(n) {
if (n.id == 118840) {
if ( n.size < biggest_node_size ){
n.size = biggest_node_size;
}
}
});
//link to content
g.edges.push({
id: 61528302,
size: 0.5,
source: 6152,
target: 8302 });
//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: 153127,
label: 'Marielle Tamigney-Kenfack',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/marielle-tamigney-kenfack/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6152153127,
size: 0.5,
source: 6152,
target: 153127 });
//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: 168431,
label: 'Teresa Piechowiak',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/teresa-piechowiak/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6152168431,
size: 0.5,
source: 6152,
target: 168431 });
//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: 211044,
label: 'Marie-Claire Jiang',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/marie-claire-jiang/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6152211044,
size: 0.5,
source: 6152,
target: 211044 });
//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: 211051,
label: 'Emma Melotti',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/emma-melotti/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6152211051,
size: 0.5,
source: 6152,
target: 211051 });
//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: 219341,
label: 'Marc Borie-Guichot',
type: 'image',
url: '',
page_url: 'https://research.pasteur.fr/en/member/marc-borie-guichot/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 6152219341,
size: 0.5,
source: 6152,
target: 219341 });
//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: 4589,
label: 'Laurence Mulard',
type: 'image',
url: 'https://research.pasteur.fr/wp-content/uploads/2015/07/research.pasteur.fr_fig5-150x150.jpeg',
page_url: 'https://research.pasteur.fr/en/member/laurence-mulard/',
x: x_site,
y: y_site,
size: 10,
color: '#DDDDDD'
});
//link to content
g.edges.push({
id: 61524589,
size: 0.5,
source: 6152,
target: 4589 });
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: 12,
maxNodeSize: 30,
mouseWheelEnabled: false,
font: 'Montserrat',
labelThreshold:25,
borderSize:1,
defaultNodeBorderColor: '#333',
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;
//console.log(n.id);
//console.log(s.graph.nodes(n.id));
});
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) {
});