Public
Edited
May 30
9 stars
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
Insert cell
Insert cell
Insert cell
Insert cell
curveScale = data=>d3.scaleLinear(d3.extent(data,d=>d.curve), [arcs.minC, arcs.maxC])
Insert cell
weightScale = data=>d3.scaleLinear(d3.extent(data,d=>d.weight), [arcs.minW, arcs.maxW])
Insert cell
freqScale = data=>d3.scaleLinear([0,d3.max(data,d=>d.freq)], [0, 1])
Insert cell
speedScale = data=>d3.scaleLinear([0, d3.max(data,d=>d.speed)], [0, maxSpeed])
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
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
ukTradeMap = {
let f = d3.scaleLinear([0,d3.max(ukTopTrade,d=>d.value)],[0.3,1]);
let s = d3.scaleLinear([0,d3.max(ukTopTrade,d=>d.value)],[0.02,0.1]);
let w = d3.scaleLinear([0,d3.max(ukTopTrade,d=>d.value)],[2,6]);
let color = d3.scaleOrdinal(ukTopTrade.map(d=>d.type), d3.schemeDark2);
return connectionMap(ukTopTrade, {
name:'map2',
weight:d=>w(d.value),
frequency:d=>f(d.value),
speed:d=>s(d.value),
linkColor:d=>color(d.type),
...connectionOptions2,
...mapOptions2
}).svg.node();
}
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