Platform
Resources
Pricing
Sign in
Get started
Saneef H. Ansari
Consultant Designer & Developer
Workspace
Fork
Published
Utilities & Helpers
By
Saneef H. Ansari
Edited
May 26, 2022
MIT
Importers
3 stars
Utilities & Helpers
Tailwind CSS
Utils: Arrays
Rams Palette
Mindfully curated color palettes by mymind
CORS Proxy using CorsProxy.io
Download HTML as Image
Print HTML Element
Substratum
Clearable Store
Change Case
Whitespace characters
Pretty Tables
Utils: Object
Notebook URL
Seed Button
Helper functions: 3D Geometry
μ Lodash
Generate a color palette
Poisson Sampling
Timer
Ratios
Helper functions: Geometry
Fit ‘N’ number of squares in a rectangle
PDF View
Feather Icons
Use Tachyons CSS in Observable
Generate a Contrasting Random Color
canvas-sketch-util
p5.js Kit for Observable
SVG.js Wrapper
Insert cell
Insert cell
chunk
(
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
]
,
5
)
Insert cell
chunk
=
(
array
,
size
)
=>
{
return
array
.
reduce
(
(
arr
,
item
,
idx
)
=>
{
return
idx
%
size
===
0
?
[
...
arr
,
[
item
]
]
:
[
...
arr
.
slice
(
0
,
-
1
)
,
[
...
arr
.
slice
(
-
1
)
[
0
]
,
item
]
]
;
}
,
[
]
)
;
}
Insert cell
groupBy
(
[
1.2
,
1.3
,
1.5
,
1.6
,
1.9
,
2
]
,
(
v
)
=>
Math
.
round
(
v
)
)
Insert cell
function
groupBy
(
array
,
fn
)
{
return
array
.
reduce
(
(
r
,
v
,
i
,
a
,
k
=
fn
(
v
)
)
=>
(
(
r
[
k
]
||
(
r
[
k
]
=
[
]
)
)
.
push
(
v
)
,
r
)
,
{
}
)
;
}
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chunk
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
groupBy
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML