CartoDB has a great hexbin visualization wizard baked into the client dashboard:
However, I like using cartodb.js to customize events and interactions; in particular, I'd like to make styles dependent on map zoom level. Recognizing that the hexbin visualization is a combination of SQL and CartoCSS parameter configuration, what are the ideal functions to pass to CartoDB to return hexes with cartodb.js?