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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more