)
    .text(d => d.type)
    .clone(true).lower()
    .attr('fill', 'none')
    .attr('stroke', 'white')
    .attr('stroke-width', 3)

  simulation.nodes(newNodes)
  simulation.force('link', d3.forceLink(newLinks).id(d => d.id).distance(100).strength(1.0))
  simulation.alpha(first ? 1.0 : 0.5).restart()
}

function updateSize () {
  const bb = d3.select('#container').node().getBoundingClientRect()
  width = bb.width
  height = bb.height
}

function updateTitle () {
  d3.select('head').append('title').text(t