Categorizing an array into different buckets in d3js with d3.nest.
For example, consider a dataset that contains an array of integers ranging values from 1 to 200. If we had to group this array into the following four buckets, as defined as;
- value >= 150, categorize as excess-heat
- value >= 140 …