Right, this is confounding me - not necessarily technically but logically.
I have returned a search of products, and one of the things I have brought back is a dataset of prices with a count of products against each.
I have already rounded these up, but can undo that:
Price - Count(Products)
1 - 6
2 - 18
3 - 88
4 - 106
5 - 97
6 - 801
7 - 891
10 - 345
11 - 678
...
5999 - 1
8999 - 1
Not every integer is represented as we may sell no products at that price level. Also the range may be very inconsistent, as demontrated by the single product based at 8999, whereas the median may be in the low hundreds...
OK, follow so far?
What I want to do is write a function that takes these values and displays them in useful brackets. A starting point I was looking at was to simply split the range by 4 and show the products in each quarter - but that is a toss way to do things, as one bracket (the maximum) would contain a single item, it completely ignores the product count per value.
Can someone suggest a logical way to proceed with this?
Question
+Dick Montage Subscriber²
Right, this is confounding me - not necessarily technically but logically.
I have returned a search of products, and one of the things I have brought back is a dataset of prices with a count of products against each.
I have already rounded these up, but can undo that:
Price - Count(Products)
1 - 6
2 - 18
3 - 88
4 - 106
5 - 97
6 - 801
7 - 891
10 - 345
11 - 678
...
5999 - 1
8999 - 1
Not every integer is represented as we may sell no products at that price level. Also the range may be very inconsistent, as demontrated by the single product based at 8999, whereas the median may be in the low hundreds...
OK, follow so far?
What I want to do is write a function that takes these values and displays them in useful brackets. A starting point I was looking at was to simply split the range by 4 and show the products in each quarter - but that is a toss way to do things, as one bracket (the maximum) would contain a single item, it completely ignores the product count per value.
Can someone suggest a logical way to proceed with this?
Thanks
Link to comment
Share on other sites
4 answers to this question
Recommended Posts