Public
Edited
Jan 3, 2024
1 fork
Importers
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
ADTTE = {
trigger
return aq.table({
USUBJID: d3.range(1,enrollment+1).map(d => 'Subject' + d),
AVAL: Array.from({length: enrollment}, d3.randomInt(1, 24)),
CNSR: Array.from({length: enrollment}, d3.randomBinomial(1, 0.2)),
PARAMCD: new Array(enrollment).fill('PFS'),
}).objects()
}
Insert cell
ADSL = {
trigger
return aq.table({
USUBJID: d3.range(1, enrollment + 1).map(d => 'Subject' + d),
MARKFL1: Array.from({length: enrollment}, d3.randomInt(1, 100)),
MARKFL2: Array.from({length: enrollment}, d3.randomBinomial(1, 0.6)),
})
.objects()
.map(d => ({...d, 'MARKFL1B': d.MARKFL1 > cutoff ? 1 : 0}))
}
Insert cell
ADRS = {
trigger
const probs = [0.2, 0.4, 0.2, 0.1, 0.1]
const mult = SJS.Multinomial(enrollment, probs).draw()
const rs = ['CR', 'PR', 'SD', 'PD', 'NE']
let r = []

mult.map((d,i) => {
r.push(...new Array(d).fill(rs[i]))
})
const rsArray = _.shuffle(r)
return aq.table({
USUBJID: d3.range(1, enrollment + 1).map(d => 'Subject' + d),
AVALC: rsArray,
PARAMCD: new Array(enrollment).fill('BESTRESP'),
})
.objects()
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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