Published
Edited
Jan 3, 2022
Insert cell
md`# remove paths shorter than X`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
img = renderSvgText(svgText, visibility)
Insert cell
filteredImg = renderSvgText(filteredSVGtext, visibility)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
await imgFile.text()
Insert cell
import {poissonDiscSampler} from '@mbostock/the-delaunays-dual'
Insert cell
import {findClosestColorFrom} from '@tstodter/cmyk-rgb-separation'
Insert cell
import {humanName} from '@tstodter/pretty-color-name'
Insert cell
R = require('ramda')
Insert cell
svg = htl.svg
Insert cell
renderSvgText = async (text, vis) => {
await vis();
return html`${text.replace('viewBox="0 0 0 0"', "")}`;
}
Insert cell
theSvg2 = {
const text = `<svg width="${100}" height="${100}">
<path d=""></path>
<path d=""></path>
<path d=""></path>
<path d=""></path>
</svg>`;

const document = new DOMParser().parseFromString(text, "image/svg+xml");
const svg = d3.select(document.documentElement).remove();

return svg;
}
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