Published
Edited
Nov 10, 2021
Insert cell
// vegaPetalsWidget = vl
// .markPoint()
// .data(irisSubset)
// .encode(
// vl.y().fieldQ("petalLength").scale({domain: [0, Math.max(...petalLengths)]}),
// vl.x().fieldQ('petalWidth'),
// vl.color().fieldN('species')
// )
// .render()
Insert cell
Insert cell
Insert cell
petalLengths = irisData.map(sample => sample.petalLength)
Insert cell
d3 = require("d3-dsv@1")
Insert cell
irisData = d3.csvParse(await FileAttachment("iris_data.csv").text(), d3.autoType)
Insert cell
import {rangeSlider} from '@mootari/range-slider'
Insert cell
irisSubset = irisData
.filter(flower =>
flower.sepalLength >= minSepalLength)
.filter(flower =>
flower.sepalWidth >= minSepalWidth)
Insert cell
extraCell = "initial value"
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