$bucketAuto
Reference group: Pipeline stages
What it does
Chooses boundaries for a requested number of buckets.
Syntax
{$bucketAuto: { groupBy, buckets }}
Use case
Exploratory distributions.
$bucketAuto: practical example
{ $bucketAuto: { groupBy: "$total", buckets: 5 } }💡 Explanation
Chooses boundaries for a requested number of buckets.
When to use it
Exploratory distributions.
Key Takeaways
- Chooses boundaries for a requested number of buckets.
- Typical use: Exploratory distributions.