Platform
Resources
Pricing
Sign in
Get started
Zach Bogart
I'll know it when I see it.
Workspace
Fork
Public
By
Zach Bogart
Edited
Jun 5, 2023
Insert cell
Insert cell
viewof
range
=
Inputs
.
range
(
[
0
,
100
]
,
{
label
:
"Membership Rate"
,
step
:
0.01
,
value
:
10
}
)
Insert cell
Insert cell
Insert cell
afterCosts
=
{
let
result
=
0
if
(
range
<=
3
)
{
// for $3 or less, 5% + $0.10
result
=
(
range
*
0.95
)
-
0.1
}
else
{
// over $3, 2.9% + $0.30
result
=
(
range
*
0.971
)
-
0.3
}
return
result
>=
0
?
result
:
0
}
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
range
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
afterCosts
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML