Platform
Resources
Pricing
Sign in
Contact us
BMT Teams
Workspace
Fork
Public
By
Soma Maroju
Edited
Sep 5, 2024
1
Insert cell
Insert cell
Insert cell
transactionsDates
=
Array
.
from
(
d3
.
rollup
(
transactions
,
v
=>
v
[
0
]
,
d
=>
d
.
date
)
.
keys
(
)
)
.
map
(
date
=>
new
Date
(
date
)
)
.
sort
(
(
a
,
b
)
=>
a
-
b
)
Insert cell
Insert cell
transactionsMemo
=
Array
.
from
(
d3
.
rollup
(
transactions
,
v
=>
v
[
0
]
,
d
=>
d
.
memo
)
.
keys
(
)
)
Insert cell
Insert cell
Insert cell
search_transaction
Filter
Columns
4
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
grouped_transactions
=
d3
.
rollups
(
search_transaction
,
v
=>
(
{
sum_usd
:
d3
.
sum
(
v
,
leaf
=>
leaf
.
amount_usd
)
,
sum_cents
:
d3
.
sum
(
v
,
leaf
=>
leaf
.
amount_cents
)
}
)
,
d
=>
d
.
date
,
d
=>
d
.
memo
)
;
Insert cell
Insert cell
Insert cell
transactions_usd
=
transactions
.
map
(
(
d
)
=>
(
{
...
d
,
amount_usd
:
Math
.
abs
(
d
.
amount_cents
)
/
100
}
)
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
cell
(
transactions_usd
,
Plot
.
group
(
{
fill
:
"sum"
}
,
{
fill
:
"amount_usd"
,
y
:
"memo"
,
x
:
(
d
)
=>
new
Date
(
d
.
date
)
}
)
)
]
,
marginLeft
:
300
,
width
:
1040
,
height
:
5000
}
)
Insert cell
transactions
=
FileAttachment
(
"transaction_export_Arcade_2024-09-05-02-08-55.json"
)
.
json
(
)
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
transactionsDates
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
transactionsMemo
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
search_transaction
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
search_transaction
File attachments
transaction_export_Arcade_2024-09-05-02-08-55.json
JSON
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
grouped_transactions
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
transactions_usd
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
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
transactions
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML