Platform
Resources
Pricing
Sign in
Get started
huw
Workspace
Fork
Public
By
huw
Edited
Jan 25, 2024
1 star
Insert cell
Insert cell
Insert cell
Insert cell
viewof
tennisBallDiameter
=
sq
`6.54 to 6.86`
Insert cell
The standard tennis ball has a diameter of about 6.54–6.86 cm
${
viewof
tennisBallDiameter
}
Insert cell
Insert cell
import
{
area
}
from
"@hamzaamjad/tiny-charts"
Insert cell
kde
=
require
(
"fast-kde"
)
Insert cell
async
function
render
(
output
,
options
)
{
const
data
=
output
.
value
.
result
.
_value
.
value
.
samples
;
const
density
=
[
...
kde
.
density1d
(
data
)
]
;
return
area
(
density
.
map
(
(
{
y
}
)
=>
y
)
,
{
color
:
{
fill
:
"rgba(0, 0, 0, 0.1)"
}
}
)
;
}
Insert cell
import
{
sq
}
with
{
render
}
from
"@huw/squiggle"
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
tennisBallDiameter
Add comment
Copy import
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
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
kde
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
render
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML