title: How to turn a raw DOM element in to a D3 selection?
body: <p>Scenario: I have several <code>svg</code> elements on a page, each displaying a different graph. When a graph receives a mouse click it triggers an event handler wherein <code>this</code> corresponds to the <em>raw</em> <code>svg</code> element that was clicked. When this happens, I want to select the graph's <code>path</code> element with D3 in order modify it.</p>
  
  <p>I know that I could give each graph an ID and then use that to make a D3 selection, e.g.</p>
  
  <pre><code>function on_click( event ) {
    var path = d3.select( '#' + this.id ).select( 'path' );
    path.do_stuff...
  }
  </code></pre>
  
  <p>but I wondered whether there was an equivalent of jQuery's feature of turning raw DOM elements in to a jQuery object, e.g.</p>
  
  <pre><code>jQuery( my_raw_dom_element ).do_stuff...
  </code></pre>