Platform
Resources
Pricing
Sign in
Contact us
Harry Stevens
News and graphics at @ClimateLab, a project of @PostGraphics.
Workspace
Fork
Public
Math
By
Harry Stevens
Edited
Oct 18, 2022
1 fork
11 stars
Math
Kaprekar's constant
Bayes’ Theorem
Discovering Pi With Monte Carlo
Paper Folding
Hyperbolic & Inverse Hyperbolic Functions
Quadratic Formula
Secant & Tangent Lines on a Power Function
Round
Heron's Formula
Completing The Square
Circles, Angles and Right Triangles
Sin, Cosine, and Tangent of an Angle
Factorial
Z Score Table
Binominal Probability Formula
Stats
Log Animation
Circular Segment with Chart of h-k Relationship
Visualizing vector addition
Factor Functions
Function iterator
Approaching Euler's Number
Sine Wave
Pythagorean Triples
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
min
=
-
2000
;
Insert cell
max
=
2000
;
Insert cell
triples
=
{
const
out
=
[
]
;
for
(
let
a
=
min
;
a
<=
max
;
a
++
)
{
for
(
let
b
=
min
;
b
<=
max
;
b
++
)
{
const
c
=
Math
.
sqrt
(
a
**
2
+
b
**
2
)
;
if
(
a
&&
b
&&
Number
.
isInteger
(
c
)
)
out
.
push
(
{
a
,
b
,
c
}
)
;
}
}
return
out
;
}
Insert cell
frequency
=
d3
.
groups
(
triples
,
d
=>
d
.
a
)
.
map
(
(
[
a
,
entries
]
)
=>
(
{
a
,
count
:
entries
.
length
}
)
)
Insert cell
fy
=
d3
.
scaleLinear
(
)
.
domain
(
[
0
,
d3
.
max
(
frequency
,
d
=>
d
.
count
)
]
)
.
range
(
[
chartHeight
,
0
]
)
;
Insert cell
Insert cell
style
=
`
circle.triple {
fill: tomato;
}
.axis .domain {
display: none;
}
.grid .domain {
display: none;
}
.grid text {
display: none;
}
.grid line {
stroke: #ddd;
shape-rendering: crispEdges;
}
`
Insert cell
Insert cell
x
=
d3
.
scaleLinear
(
)
.
domain
(
[
min
,
max
]
)
.
range
(
[
0
,
chartWidth
]
)
;
Insert cell
y
=
d3
.
scaleLinear
(
)
.
domain
(
[
min
,
max
]
)
.
range
(
[
chartHeight
,
0
]
)
;
Insert cell
Insert cell
margin
=
(
{
left
:
40
,
right
:
10
,
top
:
10
,
bottom
:
40
}
)
;
Insert cell
size
=
Math
.
min
(
width
,
500
)
;
Insert cell
chartWidth
=
size
-
margin
.
left
-
margin
.
right
;
Insert cell
chartHeight
=
size
-
margin
.
top
-
margin
.
bottom
;
Insert cell
Insert cell
import
{
toc
}
from
"@harrystevens/toc"
;
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
Show 3 comments
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
min
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
max
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
triples
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
frequency
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
fy
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
style
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
x
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
y
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
margin
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
chartWidth
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chartHeight
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
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML