Public
Edited
Feb 19, 2023
Insert cell
Insert cell
data = FileAttachment("optdigits.csv.csv")
.csv()
.then((res) => res.map((d) => Object.values(d).map((x) => parseInt(x))))
Insert cell
function intToBitmap(ints) {
return new Uint8ClampedArray(ints);
let id = new ImageData(new Uint8ClampedArray(ints), 8, 8);
return id;
}
Insert cell
intToBitmap(data[0])
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