Published unlisted
Edited
Jan 27, 2021
Insert cell
Insert cell
Insert cell
Insert cell
wine_data = await FileAttachment('wine.json').json()
Insert cell
vl.markPoint()
.data(wine_data)
.width(400)
.height(400)
.encode(
vl.x().fieldQ('Flavanoids'),
vl.y().fieldQ('Nonflavanoid_phenols')
)
.render()
Insert cell
Insert cell
vl.markPoint()
.data(wine_data)
.width(400)
.encode(
vl.x().fieldQ('Nonflavanoid_phenols'),
vl.y().fieldO('Alcohol')
)
.render()
Insert cell
Insert cell
vl.markPoint()
.data(wine_data)
.width(400)
.encode(
vl.x().fieldQ('Nonflavanoid_phenols'),
vl.size().fieldN('Alcohol')
)
.render()
Insert cell
Insert cell
Insert cell
vl.markPoint()
.data(wine_data)
.width(400)
.height(400)
.encode(
vl.x().bin({step:bin_step}).fieldQ('Flavanoids'),
vl.y().fieldQ('Nonflavanoid_phenols')
)
.render()
Insert cell
Insert cell
vl.markBar()
.data(wine_data)
.width(200)
.height(250)
.encode(
vl.x().bin({step:bin_step}).fieldQ('Flavanoids'),
vl.y().aggregate('count')
)
.render()
Insert cell
Insert cell
vl.markPoint()
.data(wine_data)
.width(400)
.height(400)
.encode(
vl.x().fieldQ('Flavanoids'),
vl.y().fieldQ('Nonflavanoid_phenols'),
vl.color().fieldO('Alcohol')
)
.render()
Insert cell
Insert cell
vl.markRect()
.data(wine_data)
.width(400)
.encode(
vl.x().bin(true).fieldQ('Flavanoids'),
vl.y().fieldO('Alcohol'),
vl.color().aggregate('mean').fieldQ('Nonflavanoid_phenols')
)
.render()
Insert cell
Insert cell
vl.markPoint()
.data(wine_data)
.width(200)
.height(200)
.encode(
vl.column().fieldO('Alcohol'),
vl.x().fieldQ('Flavanoids'),
vl.y().fieldQ('Nonflavanoid_phenols')
)
.render()
Insert cell
Insert cell
vl.markCircle()
.data(wine_data)
.width(200)
.encode(
vl.row().fieldO('Alcohol'),
vl.x().fieldQ('Flavanoids'),
vl.color().fieldQ('Nonflavanoid_phenols')
)
.render()
Insert cell
Insert cell
vl.markCircle()
.data(wine_data)
.width(100)
.height(100)
.encode(
vl.column().bin(true).fieldQ('Flavanoids'),
vl.x().fieldQ('Nonflavanoid_phenols'),
vl.y().fieldQ('Ash'),
vl.size().fieldQ('Magnesium'),
vl.color().fieldO('Alcohol')
)
.render()
Insert cell
Insert cell
Insert cell
d3 = require('d3@5')
Insert cell
import {vl} from '@vega/vega-lite-api'
Insert cell
import {slider} from "@jashkenas/inputs"
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