rects = {
svg.append('g')
.attr('id', 'manyDots')
.attr('clip-path', 'url(#scatterclip)')
.selectAll('circle')
.data(peoples)
.enter()
.append('circle')
.attr('cx', function(d, i){
return x_scale(d.Country)
})
.attr('cy', function(d){
return y_scale(d.Flight_of_refugees_and_IDPs)
})
.attr('r', 4)
.attr('fill', 'red')
.on('mouseenter', function(d){
d3.select(this)
.transition()
.duration(100)
.attr('fill', 'blue')
.attr('r', 10)
})
.on('mouseleave', function(d){
d3.select(this)
.transition()
.duration(100)
.attr('fill', 'red')
.attr('r', 4)
})
.append('title')
.text(function(d){
return d.Country + " " + d.Flight_of_refugees_and_IDPs
})
return svg.node()
}