viewof data = Generators.queue(
worker(
async function P({ url }) {
const data = await d3.csv(url, d3.autoType);
return {
svg: Plot.dot(data, {
x: "body_mass_g",
y: "species",
fill: "sex"
}).plot({ marginLeft: 100 }).outerHTML,
data
};
},
{ url },
preamble
)
)
.next()
.value.then((d) => Object.assign(svg`${d.svg}`, { value: d.data }))