transforms = [["Overview", "#333", d3.zoomIdentity]].concat(d3.groups(formants, d => d[z_label]).map(([key, data]) => {
const [x0, x1] = d3.extent(data, d => parseFloat(d[x_label])).map(x);
const [y1, y0] = d3.extent(data, d => parseFloat(d[y_label])).map(y);
const k = 0.9 * Math.min(width / (x1 - x0), height / (y1 - y0));
const tx = (width - k * (x0 + x1)) / 2;
const ty = (height - k * (y0 + y1)) / 2;
return [`${key}`, z(key), d3.zoomIdentity.translate(tx, ty).scale(k)];
}))