Published
Edited
May 1, 2022
Importers
1 star
Insert cell
Insert cell
viewof selected = navio(papers, { addAllAttribsIncludeArrays: true })
Insert cell
selected
Insert cell
Inputs.table(papers)
Insert cell
papers = program.contents
.map((p) => ({
...p,
track: mapTracks.get(p.trackId),
authors: p.authors.map((a) => ({
...a,
author: mapAuthors.get(a.personId)
})),
sessions: p.sessionIds
.map((s) => mapSessions.get(s))
.map((s) =>
Object.assign(s, { timeSlot: mapTimeSlots.get(s.timeSlotId) })
),
sessionsNames: p.sessionIds.map((s) => mapSessions.get(s).name),
type: mapType.get(p.typeId),
type_name: mapType.get(p.typeId).name
}))
.map((p) => Object.assign(p, getTimes(p)))
Insert cell
mapAuthors = new Map(program.people.map((p) => [p.id, p]))
Insert cell
mapTracks = new Map(program.tracks.map((t) => [t.id, t]))
Insert cell
mapSessions = new Map(program.sessions.map((s) => [s.id, s]))
Insert cell
mapType = new Map(program.contentTypes.map((d) => [d.id, d]))
Insert cell
mapTimeSlots = new Map(program.timeSlots.map((d) => [d.id, d]))
Insert cell
function getTimes(p) {
try {
const position = p.sessions[0].contentIds.indexOf(p.id);
return {
startTime: new Date(
p.sessions[0].timeSlot.startDate + 15000 * 60 * position
)
};
} catch (e) {
return {};
}
}
Insert cell
program = FileAttachment("CHI_2022_program.json")
.json()
.then((program) =>
Object.assign(program, {
people: program.people.map((a) =>
Object.assign(a, { name: `${a.firstName} ${a.lastName}` })
)
})
)
Insert cell
import { multiAutoSelect } from "@john-guerra/multi-auto-select"
Insert cell
import { navio } from "@john-guerra/navio"
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