Published
Edited
Apr 12, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Table(data)
Insert cell
initiators = ({
10: 'Tom', // yellow setup
20: 'Ben',
30: 'Visnu', // phase end
40: 'Alexey', // low bid pass
50: 'Daniel', // voice
60: 'Joe' // prediction
})
Insert cell
data = save._events.$values.map((d, i, events) => ({
type: d.$type.split(',')[0].replace('Treachery.online.Shared.', ''),
initiator: initiators[d.Initiator],
startTime: i > 0 ? events[i-1].Time : d.Time,
minutes: i > 0 ? (new Date(d.Time) - new Date(events[i-1].Time))/1000/60 : 0,
...d,
}))
Insert cell
save = FileAttachment("savegame-2.json").json()
Insert cell
Insert cell
import { Table } from '@observablehq/inputs'
Insert cell
import { vl } from '@vega/vega-lite-api'
Insert cell
d3 = require('d3@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