Public
Edited
Jul 24, 2023
Paused
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
spec = calcuvizspec({
models: [sc],
input_cursors: [{
lat_in:point[1], lng_in:point[0]
}],
mark: 'point',
encodings: {
y: {name: 'altitude_obj', type:'quantitative'},
x: {name: 'azimuth_obj', type: 'quantitative'},
opacity: {name: 'date_in', type: 'ordinal', domain:_.range(-60,24*60,30).map(d => date_fns.addMinutes(new Date(date_in), d))},
color: {name: 'obj_in', type: 'nominal', domain:['sun','moon']},
// row: additional months ..?
}
})
Insert cell
Insert cell
Insert cell
Insert cell
vega(calcuvizspec({
models: [sc],
input_cursors: [{
lat_in:point[1], lng_in:point[0], obj_in: 'moon'//, date_in: new Date(2023,6,23)
}],
mark: 'text',
encodings: {
//y: {name: 'altitude_obj', type:'quantitative'},
x: {name: 'formula', type: 'nominal', domain: ['azimuth_obj', 'altitude_obj']},
y: {name: 'date_in', type: 'ordinal', domain:_.range(-60,24*60,60).map(d => date_fns.addMinutes(new Date(date_in), d))},
text: {name: 'value' },
color: {name: 'formula'},
},
spec_post_process: (spec) => {
var o = {...spec};
o.width = 300
o.height = 400
o.encoding.text.format = ',.3f'
return o
}
}))
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