Public
Edited
Jul 23, 2024
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Further used to get quantiles for mapping purpose
value = data.filter((d) => d.nuclide == nuclide && d.biogroup == biogroup).map((d) => d.activity)

Insert cell
Insert cell
Insert cell
files = [
FileAttachment(
"2024-05-13 extract all LaMer rads no restriction by location v4 - recombined - duplicates and elevated removed.csv"
),
FileAttachment("Mat FINAL dataset Dec 2023@1.csv")
]
Insert cell
Insert cell
bin1(dataSelected.map((d) => d.ln_activity))
Insert cell
defaultBinInterval = abs(bin1(dataSelected.map((d) => d.ln_activity))[0].x0-bin1(dataSelected.map((d) => d.ln_activity))[0].x1)
Insert cell
dataRange = bin1(dataSelected.map((d) => d.ln_activity))[bin1(dataSelected.map((d) => d.ln_activity)).length-1].x1-bin1(dataSelected.map((d) => d.ln_activity))[0].x0
Insert cell
Insert cell
Insert cell
dataRaw = selection.csv()
Insert cell
Insert cell
dataSelected = data.filter(
(d) => d.nuclide == nuclide && d.biogroup == biogroup
)
Insert cell
dataSelected.sort((a,b) => a.ln_activity - b.ln_activity)
Insert cell
Insert cell
Insert cell
n = dataSelected.length
Insert cell
percentile = i => (i + a) / (n + 1 - 2 * a)
Insert cell
z = i => qnorm(percentile(i))
Insert cell
a = n <= 10 ? 5 / 8 : 0.5
Insert cell
qnorm = p => Math.SQRT2 * erfinv(2 * p - 1)
Insert cell
erfinv = {
const a = 8 * (Math.PI - 3) / (3 * Math.PI * (4 - Math.PI));
return x => {
const b = Math.log(1 - x * x);
const c = b / 2 + (2 / (Math.PI * a));
return Math.sign(x) * Math.sqrt(Math.sqrt((c * c) - b / a) - c);
};
}
Insert cell
import {log, pow, round, abs} from "@fil/math"
Insert cell
import { projection } from "@d3/interrupted-mollweide-oceans"
Insert cell
world = (
await fetch("https://cdn.jsdelivr.net/npm/world-atlas@2/land-50m.json")
).json()
Insert cell
land = topojson.feature(world, world.objects.land)
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