Public
Edited
Apr 6, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
user
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
viewof y_axis = Inputs.toggle({ label: "Uniform Y axis:", value: true })
Insert cell
Insert cell
Insert cell
viewof charts = view`
<style>
.grid{
display:grid;
grid-template-columns: 1fr 1fr;
}
</style>
<div class="grid">
${[
"colors",
orderedSelections.map((colorpair) => {
let pic = makeBoxPlot(colorsBins.get(colorpair), color_pair_labels, {
width: 550,
height: 450,
margin: {},
bottomAxis: true,
yAxisLabel: "#couplexes/rxn",
tickWidth,
strokeWidth: 1.5,
meanSigma: true,
notches: false,
colorpair: colorpair
});
return pic;
})
]}
`
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
colorsBins = d3.group(
[...processEmudata(makeEmudataIds(amulator_data))].map((e) => ({
...e,
...calculateBoxPlotSingle(e.Name, e.sampleId, e.samples, tickWidth, e.Type)
})),
(e) => e.Type
)
Insert cell
global_range = {
return d3.extent(
emudata_from_amulator
.map((e) => e.colors.map((e) => e.values.couplex))
.flat()
.flat()
);
}
Insert cell
global_range
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
mutable filetable = null
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
emudata_from_amulator = {
if (url != null) {
const bardata = [];

// processing all urls urls -> return a concatenated json array (in a promise)
// wanted to extract it as a function or as a mutable variable -> to resuse it
// emuing cannot be passed as an argument; mutable is not calculated
let dataemu = await emuing().then((result) => {
// mutable emudata = result; // the workaround
return result;
});

return dataemu;
}
}
Insert cell
// lambda reconverted to float -> workaround the django database has integer type Todo: update database
amulator_data = emudata_from_amulator.map((sample) => {
let c = [];

sample.colors.map((color) => {
let r = [];
let l = [];
color.values.rightlambda.map((rlambda) => {
r.push(rlambda / 1000);
});
color.values.leftlambda.map((llambda) => {
l.push(llambda / 1000);
});
c.push(
Object.assign({}, color, {
values: Object.assign({}, color.values, {
rightlambda: r,
leftlambda: l
})
})
);
});
return Object.assign({}, sample, {
colors: c
});
})
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
color_pair_labels = make_color_pair_labels(colorsBins)
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