Public
Edited
Mar 16, 2023
Insert cell
Insert cell
aspects = [
[2.5, 3.5], // inches Poker
[61 / 25.4, 88 / 25.4], // mm Marvel Champions
]
Insert cell
Insert cell
Insert cell
dimensions = (aw, ah) => [
...d3
.rollup(
possible(aw, ah),
(r) => r[r.length - 1],
(d) => d.r
)
.values()
]
Insert cell
possible = (aw, ah) =>
d3
.cross(d3.range(1, 11), d3.range(2, 11))
.map(([columns, rows]) => {
const w = Math.floor(4096 / columns);
const h = Math.round((w / aw) * ah);
return {
n: columns * rows,
columns,
rows,
w,
h,
r: w * h,
ppi: w/aw, // 5120x2880
width: columns * w,
height: rows * h
};
})
.filter(({ height }) => height <= 4096)
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