Platform
Resources
Pricing
Sign in
Get started
Kelley van Evert
Workspace
Fork
Public
By
Kelley van Evert
Edited
Feb 17, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
size
=
50
Insert cell
dpi
=
window
.
devicePixelRatio
??
1
Insert cell
height
=
400
Insert cell
function
interpolate
(
x
,
[
a
,
b
]
)
{
return
a
+
x
*
(
b
-
a
)
;
}
Insert cell
function
map
(
x
,
[
a
,
b
]
,
[
c
,
d
]
)
{
return
interpolate
(
(
x
-
a
)
/
(
b
-
a
)
,
[
c
,
d
]
)
;
}
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
rollTrigger
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
size
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dpi
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
height
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
interpolate
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
map
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML