How does RetailMeNot calculate success trends?

I am developing a rails application where I need a "success" system like RetailMeNot. I noticed that they are using the jQuery Sparkline library ( http://omnipotent.net/jquery.sparkline/ ) to create a success rate trend for each coupon.

For example, in the source code:

<em>84%</em> Success<br/><span class="trend">14,18,18,22,19,16,15,28,21,17</span>

<em>20%</em> Success<br/><span class="trend">-1,1,-1,-1,-2,-2,1,-1,1,-1</span>

      

Can someone please explain to me the best way to design a trending system like this for success?

+2


source to share


1 answer


A trend is simply a number calculated at regular intervals. In this case, it looks like the site is just downloading the data from "Does this coupon work for you?" question and then plotting those values ​​on a chart. In other words, they take the number (successes - failures) for a certain period of time (for example, 12 hours) and schedule this number for each interval.



Over time, they are likely to realign to maintain the allowed number of bars on the x-axis. For example, if they want to show only 8 bars on the chart, then after 4 hours they will have to expand the bins.

+2


source







All Articles