Published
Edited
Apr 6, 2021
1 fork
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`# Compute Network Properties Before Pruning`
Insert cell
nodes_outDegree = outDegree(links)
Insert cell
nodes_inDegree = inDegree(links)
Insert cell
maxOutDegree = d3.max(nodes_outDegree)
Insert cell
minOutDegree = d3.min(nodes_outDegree)
Insert cell
rangeOutDegree = maxOutDegree - minOutDegree
Insert cell
maxInDegree = d3.max(nodes_inDegree)
Insert cell
minInDegree = d3.min(nodes_inDegree)
Insert cell
rangeInDegree = maxInDegree - minInDegree
Insert cell
weights = edgeWeights(links)
Insert cell
maxWeight = d3.max(links.map(l=>weights[l.source+l.target]))
Insert cell
minWeight = d3.min(links.map(l=>weights[l.source+l.target]))
Insert cell
weightRange = maxWeight-minWeight
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`# Libraries`
Insert cell
d3 = require("d3@6")
Insert cell
import {rangeSlider} from "@mootari/range-slider"
Insert cell
import {inputsGroup} from "@bumbeishvili/input-groups"
Insert cell
import {select,text,slider,button} from "@jashkenas/inputs"
Insert cell
import {style, scale, categoricalWidget} from "@zzzev/categorical-legend-picker"
Insert cell
import {group} from "@bumbeishvili/utils"
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