Platform
Resources
Pricing
Sign in
Get started
D3
Bring your data to life.
Workspace
Fork
Public
d3-array
By
Fil
and
Mike Bostock
Edited
Oct 24, 2023
ISC
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
randomWalk
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
blurredWalk
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
r
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
r2
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
pixels
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
blurred
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML