Platform
Resources
Pricing
Sign in
Get started
DIS-2023-FALL
Workspace
Fork
Public
Learn 🧿 workshop
By
Sumeyya
Edited
Sep 26, 2023
5
Insert cell
Insert cell
myData
Clear All
Swap X/Y
Customize
X
Date
Y
Subways: Total Estimated Ridership
Color
—
Size
—
Facet X
—
Facet Y
—
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.
Insert cell
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
myValue
=
{
const
a
=
20
;
const
b
=
20
;
return
a
+
b
;
}
Insert cell
newValue
=
myValue
*
20
Insert cell
myOtherValue
=
300
*
newValue
Insert cell
<
p
>
Hello, World!
</
P
>
Insert cell
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
---
##
Data
Insert cell
mta_daily_ridership_data__beginning_2020924
=
FileAttachment
(
"MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv"
)
.
csv
(
)
Insert cell
mta_daily_ridership_data__beginning_2020924
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
myNewDatabase
SELECT * FROM myData
Insert cell
myNewDatabase
=
DuckDBClient
.
of
(
{
myData
}
)
Insert cell
Select a data source…
Type Chart, then Shift-Enter. Ctrl-space for more options.
Insert cell
myEndpointData
=
d3
.
json
(
"https://data.ny.gov/resource/vxuj-8kew.json"
)
Insert cell
cars
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
Select a data source…
Type SQL, then Shift-Enter. Ctrl-space for more options.
Insert cell
Insert cell
myData
Clear All
Swap X/Y
Customize
X
Date
Y
Buses: Total Estimated Ridership
Color
Subways: Total Estimated Ridership
Size
Subways: Total Estimated Ridership
Facet X
—
Facet Y
—
Mark
dot
Type Chart, then Shift-Enter. Ctrl-space for more options.
Insert cell
mypizzaData
Type SQL, then Shift-Enter. Ctrl-space for more options.
Insert cell
viewof
selectCatagory
=
Inputs
.
select
(
[
"Classic"
,
"Speciality"
,
"Vegetarian"
]
,
{
label
:
"Select one"
}
)
Insert cell
viewof
range
=
Inputs
.
range
(
[
0
,
100
]
,
{
label
:
"Amount"
,
step
:
1
}
)
Insert cell
pizza
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
Mychart
=
Plot
.
plot
(
{
marks
:
[
Plot
.
areaY
(
mypizzaData
,
Plot
.
windowY
(
{
x
:
"order_date"
,
y
:
"orders"
,
k
:
range
,
interval
:
d3
.
utcDay
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
}
)
Insert cell
mypizzaData
Clear All
Swap X/Y
Customize
X
order_date
Y
sum
orders
Color
—
Size
—
Facet X
category
Facet Y
day_of_week
Mark
bar
Type Chart, then Shift-Enter. Ctrl-space for more options.
Insert cell
Plot
.
plot
(
{
marginLeft
:
100
,
marfinRight
:
200
,
marks
:
[
Plot
.
frame
(
{
strokeOpacity
:
0.1
}
)
,
Plot
.
rectY
(
mypizzaData
,
Plot
.
binX
(
{
y
:
"sum"
}
,
{
fx
:
"category"
,
fy
:
"day_of_week"
,
x
:
"order_date"
,
y
:
"orders"
,
fill
:
"category"
,
tip
:
true
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
height
:
600
}
)
Insert cell
Plot
.
plot
(
{
y
:
{
tickFormat
:
"s"
}
,
marks
:
[
Plot
.
areaY
(
industries
,
{
x
:
"date"
,
y
:
"unemployed"
,
fill
:
"industry"
}
)
,
Plot
.
ruleY
(
[
0
]
)
]
}
)
Insert cell
d3
.
version
Insert cell
import
{
ordersByProductDay
}
from
'@observablehq/pizza-paradise-data'
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
myData
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Customize
Clear
Title
Subtitle
Caption
Height
Width
Auto
Full
Margin
Top
Right
Bottom
Left
Inset
Legend
Auto
None
X label
X scale
Auto
Scale
Auto
linear
log
sqrt
symlog
point
band
X options
Grid
Reverse
Y label
Y scale
Auto
Scale
Auto
linear
log
sqrt
symlog
point
band
Y options
Grid
Reverse
Color scheme
Auto
Color scheme
Auto
Default color schemes
Sequential
Diverging
Cyclical
Categorical
Sequential color schemes
Blues
Greens
Greys
Oranges
Purples
Reds
Turbo
Viridis
Inferno
Magma
Plasma
Cividis
Warm
Cool
BuGn
BuPu
GnBu
OrRd
PuBuGn
PuBu
PuRd
RdPu
YlGnBu
YlGn
YlOrBr
YlOrRd
Diverging color schemes
BrBG
PRGn
PiYG
PuOr
RdBu
RdGy
RdYlBu
RdYlGn
Spectral
Cyclical color schemes
Sinebow
Turbo
Categorical color schemes
Category10
Accent
Dark2
Paired
Pastel1
Pastel2
Set1
Set2
Set3
Tableau10
Color scale
Auto
Scale
Auto
linear
log
sqrt
symlog
categorical
ordinal
Color options
Reverse
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Field
—
Field
—
Mark
Auto
—
bar
dot
line
area
rule
myData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
myValue
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
newValue
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
myOtherValue
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mta_daily_ridership_data__beginning_2020923
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mta_daily_ridership_data__beginning_2020924
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
mta_daily_ridership_data__beginning_2020924
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
myNewDatabase
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
myNewDatabase
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
Add data to a cell in your notebook
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
myEndpointData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
cars
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
Add comment
Select
Duplicate
Copy link
Embed
Delete
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
myData
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Customize
Clear
Title
Subtitle
Caption
Height
Width
Auto
Full
Margin
Top
Right
Bottom
Left
Inset
Legend
Auto
None
X label
X scale
Auto
Scale
Auto
linear
log
sqrt
symlog
point
band
X options
Grid
Reverse
Y label
Y scale
Auto
Scale
Auto
linear
log
sqrt
symlog
point
band
Y options
Grid
Reverse
Color scheme
Auto
Color scheme
Auto
Default color schemes
Sequential
Diverging
Cyclical
Categorical
Sequential color schemes
Blues
Greens
Greys
Oranges
Purples
Reds
Turbo
Viridis
Inferno
Magma
Plasma
Cividis
Warm
Cool
BuGn
BuPu
GnBu
OrRd
PuBuGn
PuBu
PuRd
RdPu
YlGnBu
YlGn
YlOrBr
YlOrRd
Diverging color schemes
BrBG
PRGn
PiYG
PuOr
RdBu
RdGy
RdYlBu
RdYlGn
Spectral
Cyclical color schemes
Sinebow
Turbo
Categorical color schemes
Category10
Accent
Dark2
Paired
Pastel1
Pastel2
Set1
Set2
Set3
Tableau10
Color scale
Auto
Scale
Auto
linear
log
sqrt
symlog
categorical
ordinal
Color options
Reverse
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Field
—
Field
—
Mark
Auto
bar
dot
line
area
rule
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
mypizzaData
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
selectCatagory
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
range
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
mypizzaData
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
Cells
pizza
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
Mychart
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
mypizzaData
File attachments
MTA_Daily_Ridership_Data__Beginning_2020-9 (2).csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@1.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@2.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@3.csv
CSV
MTA_Daily_Ridership_Data__Beginning_2020-9 (2)@4.csv
CSV
Customize
Clear
Title
Subtitle
Caption
Height
Width
Auto
Full
Margin
Top
Right
Bottom
Left
Inset
Legend
Auto
None
X label
X scale
Auto
Scale
Auto
linear
log
sqrt
symlog
point
band
X options
Grid
Reverse
Y label
Y scale
Auto
Scale
Auto
linear
log
sqrt
symlog
point
band
Y options
Grid
Reverse
Color scheme
Auto
Color scheme
Auto
Default color schemes
Sequential
Diverging
Cyclical
Categorical
Sequential color schemes
Blues
Greens
Greys
Oranges
Purples
Reds
Turbo
Viridis
Inferno
Magma
Plasma
Cividis
Warm
Cool
BuGn
BuPu
GnBu
OrRd
PuBuGn
PuBu
PuRd
RdPu
YlGnBu
YlGn
YlOrBr
YlOrRd
Diverging color schemes
BrBG
PRGn
PiYG
PuOr
RdBu
RdGy
RdYlBu
RdYlGn
Spectral
Cyclical color schemes
Sinebow
Turbo
Categorical color schemes
Category10
Accent
Dark2
Paired
Pastel1
Pastel2
Set1
Set2
Set3
Tableau10
Color scale
Auto
Scale
Auto
linear
log
sqrt
symlog
categorical
ordinal
Color options
Reverse
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Reducer
—
Auto
—
count
distinct
sum
min
max
mean
median
mode
Field
—
Field
—
Field
—
Mark
Auto
bar
dot
line
area
rule
Add comment
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
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML