Published
Edited
Jul 28, 2022
3 forks
Importers
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
vegalite (plot_omega (_.filter (extract_omega_distributions (omega[2]), (d)=>d.type == "BUSTEDS"), false))
Insert cell
_.chain (extract_omega_distributions (omega[2])).groupBy (d=>d.index).map (d=>{
let wedge = [];
let result = {};
result.y = d[0].type == "BUSTEDS" ? 1 : 0;
let pair = [d[0].value - Math.sqrt(d[0].weight)*0.25, d[1].value - Math.sqrt(d[1].weight)*0.25];
result.x = d3.min (pair); result.x2 = d3.max (pair);
wedge.push (_.clone (result));
result.y = d[1].type == "BUSTEDS" ? 1 : 0;
pair = [d[0].value + Math.sqrt(d[0].weight)*0.25, d[1].value + Math.sqrt(d[1].weight)*0.25];
result.x = d3.min (pair); result.x2 = d3.max (pair);
wedge.push (_.clone (result))
return wedge;
}).value()[0]
Insert cell
extract_omega_distributions (omega[2])
Insert cell
extract_omega_distributions (omega[2])
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

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