Published
Edited
May 13, 2020
Importers
9 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const g = randomWalk(d3random.randomNormal(0, 1))
const data = Array.from(take(g, 100))
return linechart(data)
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const g = increase(1)
const data = Array.from(take(g, 100))
return linechart(data)
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const g = constant(5)
return Array.from(take(g, 10))
}
Insert cell
Insert cell
Insert cell
{
const seededRandom = seedrandom("some seed string")

// Source generators
const longtermIncrement = increase(1)
const cycles = apply(increase(2 * Math.PI * .025), d => Math.sin(d) * 20)
const noise = random(d3random.randomNormal.source(seededRandom)(0, 3))

// Composed data
const composed = compose([longtermIncrement, cycles, noise], (li, c, n) => li + c + n)
const data = Array.from(take(composed, 100))
return linechart(data)
}
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