Public
Edited
Apr 24, 2024
Insert cell
Insert cell
viewof nuclide = Inputs.select(new Set(data.map((d) => d.nuclide)), {
label: "Nuclide: ",
sort: true,
unique: true
})
// https://observablehq.com/@observablehq/input-select
Insert cell
dataSelected.filter((d) => d.exercise == "2nd ILC - G4S-B10")
Insert cell
d3.rollup(
dataSelected,
(v) => v.length,
(d) => d.exercise
)
Insert cell
Plot.plot({
marginLeft: 60,
x: {label: "Laboratory", axis: null},
y: {label: "Activity concentration (Bq/L)", grid: true},
color: {legend: true},
facet: {data: dataSelected, x: "exercise", interval: 1},
marks: [
Plot.barY(dataSelected, {x: "lab", y: "activity", fill: "lab"}),
Plot.ruleY([0]),
]
})
Insert cell
mypLot = Plot.plot({
marginLeft: 60,
x: { label: "Laboratory", axis: null },
y: { label: "Activity concentration (Bq/L)", grid: true },
color: { legend: true },
facet: { data: dataSelected, x: "exercise", interval: 1 },
marks: [
Plot.barY(dataSelected, { x: "lab", y: "activity", fill: "lab" }),

Plot.link(dataSelected, {
y1: (d) => (!isNaN(d.activity) ? d.activity + d.uncertainty : d.DL),
y2: (d) => (!isNaN(d.activity) ? d.activity - d.uncertainty : 0),
x1: "lab",
x2: "lab"
//marker: (d) => !isNaN(d.activity) ? "tick" : "arrow",
})
]
})
Insert cell
2024-04-21 ALPS SM ILCs all data for Observable.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
data = dataRaw.map((d) => ({
exercise: d["Exercise"],
lab: d["Laboratory"],
nuclide: d["Radionuclide"],
sourceterm: d["Source terms?"],
activity: d["Activity concentration (Bq/L)"],
uncertainty: d["Uncertainty (k=1) (Bq/L)"],
DL: d["Detection limit (Bq/L)"]
}))
Insert cell
dataSelected = data.filter(
(d) => d.nuclide == nuclide && d.activity != NaN
)
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