Published
Edited
Oct 16, 2019
Importers
Insert cell
html`
<body>

<h1>Ejemplo usando gephi</h1>

<h2>betweennes</h2>
<div id="betweennes"></div>
<h2>closeness</h2>
<div id="closeness"></div>
<h2>degree</h2>
<div id="degree"></div>
<h2>eccentricity</h2>
<div id="eccentricity"></div>
</body>
`
Insert cell
{
// Creamos el grafo
let g = createGraph();

// Definimos los links
g.addLink("fortran", "c");
g.addLink("c", "c++");
g.addLink("c++", "perl");
g.addLink("c", "javascript");

// Calculamos las diferentes métricas
d3.select('#betweennes').text(JSON.stringify(betweennes(g)))
d3.select('#closeness').text(JSON.stringify(closeness(g)))
d3.select('#degree').text(JSON.stringify(degree(g)))
d3.select('#eccentricity').text(JSON.stringify(eccentricity(g)))
return 'Código JS (lo mismo que el main.js del respositorio)'
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more