Published
Edited
Mar 11, 2022
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
update = chart.update(data, counter)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mutable chosen_edge = null
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
color_outer = {
// const scale = d3.scaleOrdinal(d3.schemePastel1);
// const scale = d3.scaleOrdinal().domain(data)
//.range(["gold", "blue", "green", "yellow", "black", "grey", "darkgreen", "pink", "brown", "slateblue", "grey1", "orange"]);

const scale = d3.scaleOrdinal().domain(data).range(["#c4f0ff","#ffa500","#f8de00","#d4f800","#d80000","#00e2cf","#ffbf62"]);
return d => scale(d.comm[1]);
}
Insert cell
color_inner = {
//const scale = d3.scaleOrdinal(d3.schemeDark2);
const scale = d3.scaleOrdinal().domain(data).range([["#000000","#1a1530","#163d4e","#1f6642","#54792f"]]);
return d => scale(d.comm[0]);
}
Insert cell
Insert cell
l2scale = {
const scale = d3.scaleLinear().range([.3, 1]);
return d => scale(d.comm[1]);
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md `# Imports`
Insert cell
d3 = require("d3@5")
Insert cell
import {slider} from "@jashkenas/inputs"
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