Public
Edited
Mar 2, 2023
Insert cell
Insert cell
workbook = FileAttachment("rota.xlsx").xlsx()
Insert cell
shifts = new Map(
workbook
.sheet("Shifts")
.slice(1)
.map((d) => [d.A, d])
)
Insert cell
sheet = workbook.sheet(workbook.sheetNames[0]) //, { range: "B2:J" })
Insert cell
Inputs.table(sheet)
Insert cell
dates = sheet.map((d) => d.B).slice(1)
Insert cell
names=Object.entries(sheet[0])
Insert cell
viewof name = Inputs.select(names, {
label: "Select a name.",
format: (x) => x[1],
value: (x) => x[0]
})
Insert cell
name
Insert cell
selection = sheet.slice(1).map((d) => d[name[0]])
Insert cell
Insert cell
Insert cell
sheet
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
sheet
Insert cell
selection
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
//sheet.shift()
Insert cell
var cal = ics();
cal.addEvent('Demo Event', 'This is an all day event', 'Nome, AK', '8/7/2013', '8/7/2013');
cal.addEvent('Demo Event', 'This is thirty minute event', 'Nome, AK', '8/7/2013 5:30 pm', '8/7/2013 6:00 pm');
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more