Platform
Resources
Pricing
Sign in
Get started
fiatjaf
Leftism is a disease.
Workspace
Fork
Published
By
fiatjaf
Edited
Mar 20, 2022
Fork of
Plot: Histogram
2
Insert cell
Insert cell
data
=
FileAttachment
(
"fwd@4.json"
)
.
json
(
)
Insert cell
since2021
=
data
.
filter
(
fwd
=>
fwd
.
t
)
.
map
(
fwd
=>
(
{
...
fwd
,
date
:
new
Date
(
fwd
.
t
*
1000
)
}
)
)
.
filter
(
(
fwd
)
=>
fwd
.
date
.
getFullYear
(
)
>=
2021
)
Insert cell
Plot
.
plot
(
{
y
:
{
grid
:
true
,
nice
:
true
}
,
x
:
{
nice
:
true
}
,
color
:
{
legend
:
true
}
,
marks
:
[
Plot
.
rectY
(
since2021
,
Plot
.
binX
(
{
y
:
"count"
}
,
{
x
:
"date"
,
fill
:
"s"
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
color
:
{
scheme
:
"viridis"
,
nice
:
true
,
legend
:
true
}
}
)
Insert cell
{
return
Plot
.
plot
(
{
y
:
{
grid
:
true
,
nice
:
true
}
,
x
:
{
nice
:
true
}
,
color
:
{
legend
:
true
}
,
marks
:
[
Plot
.
rectY
(
since2021
,
Plot
.
binX
(
{
y
:
"count"
}
,
{
x
:
"d"
,
fill
:
"a"
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
color
:
{
scheme
:
"turbo"
,
nice
:
true
,
legend
:
true
}
}
)
;
}
Insert cell
Insert cell
Plot
.
plot
(
{
y
:
{
grid
:
true
,
nice
:
true
}
,
x
:
{
nice
:
true
}
,
color
:
{
legend
:
true
}
,
marks
:
[
Plot
.
rectY
(
since2021
,
Plot
.
binX
(
{
y
:
"count"
}
,
{
x
:
"date"
,
fill
:
"d"
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
color
:
{
scheme
:
"inferno"
,
nice
:
true
,
legend
:
true
}
}
)
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
data
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
since2021
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
amountLevel
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