Group timestamps into "buckets" by applying a granularity to a discrete value