Published
Edited
Oct 5, 2022
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dog_data = {
let dogZip = await FileAttachment("Dog_Photos@3.zip").zip();
let breeds = d3
.sort(
(await dogZip.file("Readme.txt").text())
.split("\r")
.slice(3, -1)
.map((s) => s.split("\t")),
(a) => a[0]
)
.map((a) => a[1]);
let urls = await Promise.all(
dogZip.filenames
.filter((f) => f.slice(-4) == ".jpg")
.map(async function (name, i) {
return dogZip.file(name).url();
})
);
return d3.zip(breeds, urls).map((a) => ({ breed: a[0], url: a[1] }));
}
Insert cell
tippy_style = html`<div style="display: none"><link rel="stylesheet" href="${await require.resolve(
`tippy.js/themes/light.css`
)}"></div>`
Insert cell
tippy = require("tippy.js@6")
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