Platform
Resources
Pricing
Sign in
Get started
claromes
Workspace
Fork
Public
Data Visualization Fundamentals and Best Practices
By
claromes
Edited
Apr 10, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
cars
Insert cell
Insert cell
// Dot
Plot
.
plot
(
{
marks
:
[
Plot
.
dot
(
carMakes
,
{
x
:
"power (hp)"
,
y
:
"make"
,
fill
:
"cylinders"
,
r
:
"weight (lb)"
,
title
:
"name"
,
sort
:
{
y
:
"x"
,
reverse
:
true
,
limit
:
12
}
}
)
]
,
color
:
{
domain
:
[
3
,
4
,
6
,
8
]
,
//cylinders
legend
:
true
}
}
)
Insert cell
// Tick X
Plot
.
plot
(
{
marks
:
[
Plot
.
tickX
(
carMakes
,
{
x
:
"power (hp)"
,
y
:
"make"
,
fill
:
"cylinders"
,
r
:
"weight (lb)"
,
title
:
"name"
,
sort
:
{
y
:
"x"
,
reverse
:
true
,
limit
:
12
}
}
)
]
,
color
:
{
domain
:
[
3
,
4
,
6
,
8
]
,
//cylinders
legend
:
true
}
}
)
Insert cell
carMakes
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
import
{
carMakes
}
from
"@observable/lesson-2-data-representation"
//import from other notebook
Insert cell
Insert cell
// NASDAQ: AAPL (Apple)
Plot
.
plot
(
{
marks
:
[
Plot
.
ruleY
(
[
0
]
)
,
// Force domain to include 0
Plot
.
lineY
(
aapl
,
{
x
:
"Date"
,
y
:
"Close"
}
)
]
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
ruleY
(
[
0
]
)
,
Plot
.
lineY
(
industries
,
{
x
:
"date"
,
y
:
"unemployed"
,
z
:
"industry"
,
stroke
:
"industry"
}
)
]
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
barY
(
alphabet
,
{
x
:
"letter"
,
y
:
"frequency"
,
sort
:
{
x
:
"y"
,
reverse
:
true
}
}
)
,
Plot
.
ruleY
(
[
0
]
)
]
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
lineY
(
alphabet
,
{
x
:
"letter"
,
y
:
"frequency"
,
sort
:
{
x
:
"y"
,
reverse
:
true
}
}
)
,
Plot
.
ruleY
(
[
0
]
)
]
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
barY
(
laserStrikes
,
Plot
.
groupX
(
{
y
:
"count"
}
,
{
x
:
"year"
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
}
)
Insert cell
laserStrikes
Filter
Columns
Sort
Slice
Save
Type Table, then Shift-Enter. Ctrl-space for more options.
Insert cell
import
{
laserStrikesCleaned
as
laserStrikes
}
from
"@observablehq/excel-add-columns"
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
table
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
Edit
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
Select
Duplicate
Copy link
Embed
Delete
Cells
carMakes
File attachments
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
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
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
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
Add comment
Select
Duplicate
Copy link
Embed
Delete
Cells
laserStrikes
File attachments
Databases
Filter
Column
Operator
Columns
Sort
Column
Direction
Descending
Ascending
Slice
From
Start
To
End
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML