Platform
Resources
Pricing
Sign in
Get started
Brentyn Muir
Workspace
Fork
Published
Class Assignments
By
Brentyn Muir
Edited
Sep 22, 2019
Fork of
Imports
Insert cell
Insert cell
Insert cell
Insert cell
vl
.
layer
(
line
,
point
,
heartbeatpoint
)
.
render
(
)
Insert cell
line
=
vl
.
markLine
(
{
stroke
:
"#876ABC"
}
)
.
width
(
800
)
.
height
(
335
)
.
data
(
datafilter1
)
.
transform
(
vl
.
calculate
(
`floor(datum.x)`
)
.
as
(
"y"
)
)
.
encode
(
vl
.
x
(
)
.
fieldQ
(
"x"
)
.
scale
(
{
domain
:
[
0
,
10
]
}
)
,
vl
.
y
(
)
.
fieldQ
(
"y"
)
.
scale
(
{
domain
:
[
0
,
10
]
}
)
)
Insert cell
point
=
vl
.
markCircle
(
{
stroke
:
"black"
,
size
:
200
,
fill
:
"green"
}
)
.
width
(
800
)
.
height
(
335
)
.
data
(
datafilter2
)
.
transform
(
vl
.
calculate
(
`floor(datum.x)`
)
.
as
(
"y"
)
)
.
encode
(
vl
.
x
(
)
.
fieldQ
(
"x"
)
.
scale
(
{
domain
:
[
0
,
10
]
}
)
,
vl
.
y
(
)
.
fieldQ
(
"y"
)
.
scale
(
{
domain
:
[
0
,
10
]
}
)
)
Insert cell
heartbeatpoint
=
vl
.
markCircle
(
{
stroke
:
"black"
,
size
:
(
1000
*
(
1
-
i
%
1
)
)
,
fill
:
"red"
}
)
.
width
(
800
)
.
height
(
335
)
.
data
(
dataheartbeatpoint
)
.
encode
(
vl
.
x
(
)
.
fieldQ
(
"x"
)
.
scale
(
{
domain
:
[
0
,
10
]
}
)
,
vl
.
y
(
)
.
fieldQ
(
"y"
)
.
scale
(
{
domain
:
[
0
,
10
]
}
)
)
Insert cell
viewof
drawslider
=
slider
(
{
min
:
0
,
max
:
10
,
step
:
0.1
,
title
:
"Draw Slider"
}
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
datafilter1
=
data
.
filter
(
d
=>
d
.
x
<=
i
)
Insert cell
datafilter2
=
data
.
filter
(
d
=>
d
.
x
==
i
)
Insert cell
dataheartbeatpoint
=
[
{
x
:
0.25
,
y
:
9
}
]
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
Compare fork
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
i
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
heartbeat
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
line
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
point
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
heartbeatpoint
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
drawslider
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
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
datafilter1
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
datafilter2
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
dataheartbeatpoint
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML