title: D3 Choropleth, get element with zoom/view
body: <p>So I have a choropleth that is very similar to <a href="https://gist.github.com/mbostock/9656675" rel="nofollow noreferrer">https://gist.github.com/mbostock/9656675</a>. The only real difference is that I am display all the us counties, not states.</p>
  
  <p>What I want to do display data related to what counties are in the view. This would be done outside of d3, I would display a more granular level related to those counties. So as they zoom in further to the map, the dataset would update and only display data related to the counties zoomed in on. This is easy to do with the click on a single county, however I am unsure of how to do it for the manual zoom and are viewing a lot of counties.</p>
  
  <p>As I see it there are two ways that I could accomplish this:
  1) Somehow via d3.selectAll I am able to grab only elements(counties) that are in the current view, however with my current searching I am unsure of how to do this.
  2) Some how I pull from the svg transformation and projection the latitude and longitude bounds of the current zoom, and then use that lat/long to filter my data.</p>
  
  <p>Anyone provide any insight on this or point me in the right direction? I did some digging however wasn't really able to come up with anything useful?</p>
  
  <p>I am using d3v3.</p>
  
  <p>Thanks.</p>