Feature suggestion: user-defined bins in JavaScript Histogram node

Hi,

The JavaScript Histogram node currently generates bins based on the actual data interval, which in many cases leads to non-intuitive and non-integer binning intervals. The example below shows this when dividing ages in 5 bins: it uses the minimum and maximum ages as outer borders and then divides the range into 5 bins of equal width (14.6 years).

An enhancement would be to allow the user to set the bin width and the lower starting value (and optionally max value also). In the age example one would like to be able to set bin width to 10, and start at say 10 as lowest value, thus dividing the data into 8 bins.

Thx/Evert

2 Likes

Hi Evert

I agree that “intuitive” bins would be an enhancement - setting the minimum and maximum bounds would help a lot there. This was already requested for the “Auto Binner” node, but since the dialog is quite the same I’ll note that down as a +1 (internal reference: AP-10021) and ask to update the “histogram node” accordingly.

Two things I can recommend for now:

  1. the “Force integer bounds” option in the Binning tab:

    This gives somewhat nicer bins already.
  2. You can use a combination of the “Numeric Binner” with a “Bar Chart”. This gives you maximum flexibility when defining the bins (but can also be a bit tedious):

Thanks for your feedback!
Best regards,
Lukas

2 Likes