Public
Edited
May 22
Insert cell
Insert cell
Insert cell
Insert cell
birds = FileAttachment('birds.json').json();
Insert cell
Inputs.table(birds, { width: 500 })
Insert cell
Insert cell
Insert cell
// put your chart code or image here
Insert cell
ab785e570e419a51007bb1bb8b370b7 = FileAttachment("ab785e570e419a51007bb1bb8b370b7.png").image()
Insert cell
Insert cell
Insert cell
// put your chart code or image here
Insert cell
dab426decf4a53c353e17234fcc82 = FileAttachment("23dab426decf4a53c353e17234fcc82.png").image()
Insert cell
cc3a1d32e5ab74e3c9c39ed05c024f6 = FileAttachment("cc3a1d32e5ab74e3c9c39ed05c024f6.png").image()
Insert cell
Insert cell
Insert cell
render({
data: { values: birds },
layer: [
{
mark: 'circle',
encoding: {
x: { field: 'bill_length', type: 'Q', scale: { zero: false } },
y: { field: 'bill_depth', type: 'Q', scale: { zero: false } },
color: { field: 'condition', type: 'N' }
}
},
{
mark: { type: 'line', stroke: 'black' },
transform: [{ regression: 'bill_depth', on: 'bill_length' }],
encoding: {
x: { field: 'bill_length', type: 'Q', scale: { zero: false } },
y: { field: 'bill_depth', type: 'Q', scale: { zero: false } }
}
},
{
mark: { type: 'line' },
transform: [
{ regression: 'bill_depth', on: 'bill_length', groupby: ['condition'] }
],
encoding: {
x: { field: 'bill_length', type: 'Q', scale: { zero: false } },
y: { field: 'bill_depth', type: 'Q', scale: { zero: false } },
color: { field: 'condition', type: 'N' }
}
}
]
})

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// put code or image here
Insert cell
d4080a99586921e0f7cb082aa52bc2 = FileAttachment("1d4080a99586921e0f7cb082aa52bc2.png").image()
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