title: Selecting a subset of circles using D3
body: <p>When creating circles using D3, is it possible to create a group such that they can be selected at a later stage? For example, if circles are created using the following approach:</p>
  
  <pre><code>var dataset = [   [ 30, 50, 20],
                    [ 100, 50, 20],
                    [ 150, 50, 30]];
  
  
  //Create SVG element
  var svg = d3.select("#chart")
              .append("svg")
              .attr("width",  200)
              .attr("height", 200);
  
  // generate circles 
  svg.selectAll("circle")
     .data(dataset)
     .enter()
     .append("circle")
     .attr("cx", function(d){
                  return d[0];
                  })
     .attr("cy", function(d){
                  return d[1];
                  })
     .attr("r",  function(d){
                  return d[2];
                  });
  </code></pre>
  
  <p>Can I tag the circle created from the first array element with <code>circle1</code> and the second two circles as <code>circle2</code>? </p>