Published
Edited
Jan 10, 2022
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
domains = ({
//functions: ['x','dx','y','dy','compressed'], now determined from introspection_info
dx_in: [-3,0,3],
dampener_in: [0.9, 0.95, 1, 1.05],
t_in: [...Array(30).keys()]
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//cartesianProduct(function_inputs_cp['x']).map(({function$, ...d}) => ({...d, function:'x', value: function$(d)}))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{w.value.insert('selection_t_in_store', [{unit: "concat_0_concat_2_layer_2", fields: [{"field":"t_in","channel":"x","type":"E"}] , values:[10]}])
w.value.insert('selection_dampener_in_store', [{unit: "concat_2_concat_2_layer_0", fields: [{"field":"dampener_in","channel":"x","type":"E"}] , values:[0.95]}])
.run()}
// NOW TODO addSignalListener stuff... is it trigerred for above??
// until there is a selection api...
//https://github.com/vega/vega-lite/issues/2790#issuecomment-976633121
// https://github.com/vega/vega-lite/issues/1830#issuecomment-926138326
Insert cell
w = { spec2.data = {values: data}; // needed to init correctly, because of..?
return vega(spec2)}
Insert cell
Insert cell
v.value.insert('source_0', data).run() // does this work? for some reason doesn't look like it
// maybe the ObservableHQ run order? b/c data feeds into vega chart
// for some reason, only unique values held in source_0 (probably bc of Symbol mutation
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function_inputs_cp['compressed'][1]
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