Published
Edited
Oct 9, 2018
1 fork
Importers
78 stars
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
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// function drawAnimation(states, { zoom = 10 } = {}) {
// return drawBubbleTea(states[Math.floor(now/200)%states.length].bubbleTea, { zoom }).node();
// }
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// packedBubbles = {
// const paddingLeft = 10;
// const paddingRight = 10;
// const paddingBottom = 10;
// const paddingTop = 10;
// const zoom = 10;
// const innerWidth = 14 * zoom;
// const innerHeight = 14 * zoom;
// const width = innerWidth + paddingLeft + paddingRight;
// const height = innerHeight + paddingTop + paddingBottom;
// const svg = d3.select(DOM.svg(width, height));
// const g = svg.append('g')
// .attr('transform', `translate(${width/2}, ${height/2})scale(${zoom})`);

// g.append('circle')
// .attr('r', 6)
// .style('fill', '#D2B799')
// g.append('g').selectAll('circle')
// .data(circles)
// .enter().append('circle')
// .attr('cx', d => d.x)
// .attr('cy', d => d.y)
// .attr('r', d => d.radius);
// return svg.node()
// }
Insert cell
// drawBubbleTea(simulationStates.original[0].bubbleTea, {zoom: 10}).node()
Insert cell
// canv = convertSvgToCanvas(drawBubbleTea(simulationStates.original[0].bubbleTea, {zoom: 10}))
Insert cell
Insert cell
Insert cell
Insert cell
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