Just a quick example to show one way to use a checkbox or other form element to trigger a D3 data update. There are probably better ways, but this seems to work.
All row creation is pushed into the update() function and it is called once at the beginning. Then upon changing the checkbox, it is re-run and the checkbox state determines how the data is filtered before being rebound to the rows.