Published
Edited
Jul 29, 2021
3 stars
Hello, A5Hello, PGLiteINSEE ParquetHello, apcachDruidJS workerHello, OrbitWord Tour: 40k words and their friendsHello, spectral.jsHello, petite-vueHello, @thi.ng/grid-iteratorsHello, thumbhashHello, SwissGLHello, QOI (and glitches)Hello, orbHello, cosmographHello, TabulatorUsing d3.blur with PlotMath.cbrtHello debounceColorcetHello, gliiHello, Open MeteoHello, PyWaveletsHello, typesenseHello, libgifHello, kmeans-engineHappy anniversary, Project Gutenberg!Hello, fflateHello, ArchieML!Hello, d3-bboxCollideHello, jsgeoda!Hello, EDTF!Hello, protovis!Hello, placekeyHello, fuse.jsHello, Reorder.jsHello, shadow DOMjszipHello, procedural-glHello, qhullHello, genetic-jsDruidJSHello, Tippy.jsHello, paintWorkletBig πHello, AutoencoderHello, Shakespearean UUIDsHello, ccwt.jsHello, constrainautorHello, talismanHello, polygon-offsetHello p-queueHello async-poolHello rollup-plugin-asciiHello, algebra.jsHello, pixi.jsHello, d3-renderHello zip/unzipCumulative Wikipedia DonationsHTML <details>regl textureHello, npyjsHello protobufHello, pencil touchHello, LOESSHello html2canvaslegra mapscolor2cssHello, ecsy2D point distributionsHello, delatinThe gpu.js loopDijkstra’s shortest-path treeHello nojacko/Dijkstras-jsHello, tcort/dijkstrajsHello, lambdabaa/dijkstraHello, gpu.js v2Hello jsqrHello qrcodeHello SharedArrayBufferHello GamePad APIHello vtk.jsHello nd4jsHello BiofabricTravelling with a self-organizing mapHello glitchHello UMAP-jsHello pandemoniumHello iocaneHello JSON-editorHello d3-griddingHello mljs/knnWorkerHello lalolibImage to GPU.jsImage to blink.jsTissot's indicatrixVega projectionsHello WebCLGLUsing d3-inertia with observableVideo contouring 3
ngraph: pagerank, louvain…
Union-FindPerceptron (simple statistics)mljsHello h3-jsEmoji FlagsHello, poisson-disk-sampling
Also listed in…
Graphs
Algorithms
Insert cell
Insert cell
PIXEL = {
var container = md`<div style="width:${width}px; height: 400px">`;
yield container; // the container must exist before we call ngraph.pixel
var pix = ngraph.pixel(G, { container });
invalidation.then(() => {
pix = null;
}); // not sure how to dispose of the old renderer(???)
}
Insert cell
Insert cell
ngraph = ({
graph: await import("https://cdn.skypack.dev/ngraph.graph@19").then(
(d) => d.default
),
hits: await import("https://cdn.skypack.dev/ngraph.hits@2").then(
(d) => d.default
),
cw: await import("https://cdn.skypack.dev/ngraph.cw@2").then(
(d) => d.default
),
louvain: await import("https://cdn.skypack.dev/ngraph.louvain@2").then(
(d) => d.default
),
pixel: await import("https://cdn.skypack.dev/ngraph.pixel@2").then(
(d) => d.default
),
pagerank: await import("https://cdn.skypack.dev/ngraph.pagerank@2").then(
(d) => d.default
),
generators: await import("https://cdn.skypack.dev/ngraph.generators@19").then(
(d) => d.default
)
})
Insert cell
Insert cell
G = ngraph.generators.balancedBinTree(5)
// G = ngraph.generators.wattsStrogatz(100, 20, 0.50)
// G = ngraph.generators.grid3(5, 5, 5)
Insert cell
Insert cell
PAGERANK = ngraph.pagerank(G)
Insert cell
HUBS_AUTHORITIES = ngraph.hits(G)
Insert cell
CLUSTERS = {
var clusters = ngraph.louvain(G);
// now you can iterate over each node and get its community (aka class):
var classes = [];
G.forEachNode(function(node) {
classes.push( clusters.getClass(node.id) );
});
return classes;
}
Insert cell
LARGESTCLUSTER = {
var L = [];
CLUSTERS.forEach((i,j) => (L[i] || (L[i] = [])).push(j));
var M = [];
G.forEachNode(function(node) {
if (L[node.id] && L[node.id].length > M.length) M = L[node.id];
});
return M;
}
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