Platform
Resources
Pricing
Sign in
Get started
Kevin Bateman Smith
A human. Living on Earth. During Late Capitalism.
Workspace
Fork
Public
By
Kevin Bateman Smith
Edited
Dec 31, 2022
1
Insert cell
Insert cell
attach
=
FileAttachment
(
"SunriseSunset.csv"
)
.
csv
(
)
Insert cell
data
=
attach
.
map
(
d
=>
(
{
...
d
,
date
:
new
Date
(
d
.
date
)
,
delta
:
+
d
.
delta
,
duration
:
+
d
.
duration
}
)
)
Insert cell
Plot
.
plot
(
{
grid
:
true
,
marks
:
[
Plot
.
line
(
data
,
{
x
:
"date"
,
y
:
"delta"
}
)
,
Plot
.
ruleY
(
[
0
]
)
]
}
)
Insert cell
Plot
.
plot
(
{
grid
:
true
,
marks
:
[
Plot
.
line
(
data
,
{
x
:
"date"
,
y
:
"duration"
}
)
,
Plot
.
ruleY
(
[
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
attach
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML