Platform
Resources
Pricing
Sign in
Get started
DIS-2023-FALL
Workspace
Fork
Public
By
Sumeyya
Edited
Sep 25, 2023
Fork of
Revenue over time
1
Insert cell
Insert cell
viewof
aggregation
=
Inputs
.
select
(
[
"day"
,
"week"
,
"month"
,
"quarter"
]
,
{
label
:
"Aggregation"
,
value
:
"week"
}
)
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
ruleY
(
[
0
]
)
,
Plot
.
lineY
(
ordersByPeriod
,
{
x
:
"start_date"
,
y
:
"revenue"
}
)
]
,
y
:
{
tickFormat
:
"$s"
}
}
)
Insert cell
pizzaOrders
SELECT DATE_TRUNC(${aggregation}, order_date) as start_date, sum(revenue) as revenue
FROM pizzaOrders
GROUP BY start_date
ORDER BY start_date
Insert cell
pizza
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
mta_daily_ridership_data__beginning_20209
=
FileAttachment
(
"MTA_Daily_Ridership_Data__Beginning_2020-9.csv"
)
.
csv
(
)
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
aggregation
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
ordersByPeriod
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
pizzaOrders
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9.csv
CSV
Databases
pizzaOrders
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
pizza
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
mta_daily_ridership_data__beginning_20209
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML