I have a time series where the x-axis represents hour of the day and the y-axis represents the avgerage value of some variable, say speed of all the cars in New York. I want to bucketise this data (or say cluster) on their Y-axis value. How can I decide the optimal number of buckets and what parameters should I consider to find out these optimal buckets. One simple way might be to bucket according to the speed range like 0-20 miles per hour is bucket 1, 21-30 is bucket 2, and so on. But I want to decide these ranges using the time-series.
If you want to cluster your data and don't know how many clusters you need, see this answer, including this Wikipedia article:
And there is also this question: How to define number of clusters in K-means clustering?