{
const width = 800
const height = 500
const svg = d3.create('svg')
.attr("width",width)
.attr("height",height);
const group = svg.append("g")
const bubble = d3.pack(datos[0])
.size([400,400])
.padding(5)
const nodes = d3.hierarchy(datos[0])
.sum(d => d.avgCount)
const node = group.selectAll(".node")
.data(bubble(nodes).descendants())
.enter()
.filter(d => !d.children)
.append("g")
.attr("class", "node")
.attr("transform", d => "translate(" + d.x + "," + d.y + ")");
node.append("circle")
.attr("r", d => d.r)
.style("stroke", "none")
.style("fill", "#3397B5")
.style("fill", function(d,i){return d3.rgb(10,225-i*20,255-i*20);})
node.append("text")
.text(d => d.data.normalizedQuery)
.attr("font-family", "Gill Sans, Century Gothic, sans-serif")
.style("text-anchor", "middle")
.style("font-size", d => d.r / 4)
.attr("fill", "black");
return svg.node();
}