// return i > 0 ? String(result) : result.toFixed(-i);
// }
// find pre-image "numerically" (instead of analytically)
d3.rollups(
d3
.range(0,1,0.01)
.slice(1)
.map((n)=>[n,roundTo(n,-1)]),
(arr)=>d3.extent(arr,(d)=>d[0]),
(d)=>d[1]
)
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.