Public
Edited
Jan 1, 2023
Insert cell
Insert cell
degrees = [270, 314.9999, 174.3787, 191.2459, 314.9999, 134.9999, 146.2511, 0, 0, 314.9999, 0, 174.3623, 101.2459, 314.9999, 258.7541, 174.3607, 314.9999, 315.0, 0, 174.3623, 19.6889, 146.2511, 101.2491, 28.1195, 315.0, 140.6164, 314.9999, 174.3786, 19.6834, 22.4981, 191.2491, 19.6889, 258.7508, 146.2421, 258.7509, 22.5043, 258.7508, 146.2511, 315.0000, 174.3787, 101.2491, 45.0115, 45.0115, 33.7578, 137.8163, 26.7109, 305.1469, 244.6903, 272.8232, 9.8378, 122.3322, 68.9015, 111.0984, 119.5283, 163.1133, 98.4485, 9.8379, 272.8070, 42.1836, 215.1563, 87.1921, 85.7865, 57.6539, 182.8240, 9.8539, 5.6228, 189.8539, 9.8539, 151.8804, 37.9693, 9.8539, 80.1620, 188.4346, 35.1563, 139.2270, 111.0925, 97.0338, 130.7853, 94.2285, 49.2270, 35.1563, 85.7865, 357.1921, 210.9330, 25.3026, 340.3109, 250.3110].map((n, i) => ({i, n: Math.round(1000*n)/1000}))
Insert cell
histogram = {
const res = {};
degrees.forEach(e => {
const n = e.n;
if (res["" + n])
res["" + n] += 1;
else
res["" + n] = 1;
});
return Object.entries(res).map(([n, c]) => ({n, c}));
}
Insert cell
vl.markCircle().encode(
vl.x().fieldQ("i").title("positie"),
vl.y().fieldQ("n").title("graden")
)
.data(degrees)
.width(600)
.render();
Insert cell
vl.markBar().encode(
vl.x().fieldQ("n").title("graden"),
vl.y().fieldQ("c").title("aantal")
)
.data(histogram)
.width(700)
.render();
Insert cell
degrees.filter(d => d.n <= 90)
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