Public
Edited
May 25
Insert cell
Insert cell
workbook = FileAttachment("dataExcelSmall@1.xlsx").xlsx()
Insert cell
workbook.sheetNames
Insert cell
data = workbook.sheet(0, {
headers: true,
range: "A1:R100"
})
Insert cell
Insert cell
Plot.plot({
y: {grid: true},
color: {legend: true},
marks: [
Plot.rectY(data, Plot.binX({y: "count"}, {x: "Size", fill: "Type Shoes"})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Plot.plot({
x: {label: "Division"},
y: {label: "Sales@POS"},
color: {legend: true},
marks: [
Plot.barY(data1, {
x: "Division",
y: "Sales@POS",
title: "Sales by Division",
fill: "Division",
raster: true
}),
]
})

Insert cell
data1 = workbook.sheet(0, {
headers: true,
range: "A1:R900"
})
Insert cell
data1
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Plot.plot({
x: {label: "Sales@Original"},
y: {label: "Sales@POS"},
color: {legend: true},
marks: [
Plot.dot(data1, {
x: "Sales@Original",
y: "Sales@POS",
r: "Quantity",
title: "Sales by Division",
fill: "Division",
opacity: 0.6}),
]
})
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.
Learn more