Public
Edited
May 3
Insert cell
Insert cell
Insert cell
workbook = FileAttachment("JOLTS(1).xlsx").xlsx()
Insert cell
workbook.sheetNames
Insert cell
data = workbook.sheet(0, {
headers: false,
// range: "A1:J10"
})
Insert cell
data
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
Plot.plot({
marks: [
Plot.line(data, { x: "B", y: "E", stroke: "I" })
],
x: { label: "Date" },
y: { label: "Job Openings" },
width: 800,
height: 400
})

Insert cell
Insert cell
Plot.plot({
marks: [
Plot.dot(
data.filter(d => d.C === "Quit Rate"),
{
x: "H",
y: "D",
title: d => `Date: ${d.B}\nQuits: ${d.H}\nHires: ${d.D}`
}
)
],
x: { label: "Quits" },
y: { label: "Hires" }
})

Insert cell
Insert cell
Plot.plot({
marks: [
Plot.line(
data.filter(d => d.C === "Layoff Rate"),
{
x: "B",
y: "F",
title: d => `Date: ${d.B}\nLayoffs: ${d.F}`
}
)
],
x: { label: "Date" },
y: { label: "Layoffs" }
})

Insert cell
Insert cell
viewof rateType = Inputs.select(
[...new Set(data.map(d => d.C))],
{ label: "Select Rate Type" }
)

Insert cell
Plot.plot({
marks: [
Plot.line(
data.filter(d => d.C === rateType),
{ x: "B", y: "I" }
)
],
x: { label: "Date" },
y: { label: "Rate" }
})

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