Public
Edited
Oct 24, 2023
4 forks
35 stars
Insert cell
Insert cell
Insert cell
randomWalk = d3.cumsum({length: 401}, () => Math.random() - 0.5)
Insert cell
blurredWalk = d3.blur(randomWalk.slice(), 3)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d3.blur2({
data: [
1, 0, 0,
0, 0, 0,
0, 0, 1
],
width: 3,
height: 3
}, 1)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
pixels = ({
width: 40,
data: Array.from({length: 40 * 20}, (_, i) => (i % 40) * Math.random())
})
Insert cell
blurred = d3.blur2({data: pixels.data.slice(), width: pixels.width}, 0.5)
Insert cell
Insert cell
Insert cell
Insert cell
d3.blur([27, 0, 0, 0, undefined, 0, 0, 0, 0, 0, 27], 1)
Insert cell
d3.blur([27, 0, 0, 0, undefined, 0, 0, 0, 0, 0, 27].map(d => isFinite(d = +d) ? d : 0), 1)
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