Platform
Resources
Pricing
Sign in
Get started
Olga Belitskaya
Workspace
Fork
Public
By
Olga Belitskaya
Edited
Dec 3, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot
.
plot
(
{
y
:
{
grid
:
true
}
,
marks
:
[
Plot
.
rectY
(
customers
.
map
(
d
=>
Math
.
log
(
d
[
product
]
)
)
,
Plot
.
binX
(
{
y
:
"count"
,
fill
:
"count"
}
)
)
,
Plot
.
ruleY
(
[
0
]
)
]
,
color
:
{
scheme
:
"Cool"
,
legend
:
true
}
,
title
:
'The Histogram for Logarithmic Values for the Column: '
+
product
,
height
:
400
,
width
:
900
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
boxY
(
customers
,
{
x
:
"Channel"
,
y
:
product
,
fill
:
"Channel"
,
opacity
:
.7
}
)
]
,
y
:
{
domain
:
[
0
,
50000
]
}
,
color
:
{
scheme
:
"Cool"
}
,
}
)
Insert cell
Insert cell
Plot
.
plot
(
{
marks
:
[
Plot
.
ruleY
(
[
0
]
)
,
Array
.
from
(
{
length
:
6
}
,
(
_
,
i
)
=>
{
return
Plot
.
areaY
(
customers
,
{
y
:
product_lst
[
i
]
,
fill
:
i
+
1
,
opacity
:
1
-
.05
*
i
}
)
}
)
]
,
color
:
{
scheme
:
"Turbo"
,
domain
:
[
0
,
7
]
}
,
height
:
400
,
width
:
900
}
)
Insert cell
Insert cell
Plot
.
density
(
customers
,
{
x
:
"Milk"
,
y
:
"Fresh"
,
stroke
:
"Channel"
}
)
.
plot
(
{
x
:
{
domain
:
[
-
1000
,
18000
]
}
,
y
:
{
domain
:
[
-
3000
,
50000
]
}
,
color
:
{
scheme
:
"Cool"
}
,
style
:
{
paddingBottom
:
20
}
}
)
Insert cell
d3
=
require
(
'd3@7'
)
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
url
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
customers
Edit
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
product_lst
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
product
Edit
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
d3
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML