delorean.js
delorean.js copied to clipboard
Highlight outliers
I'd like to see support for not only graphing points, but also visualizing statistical outliers using the data from previous weeks at the same time of day. If I have hourly data points for total_sales and the value for the last 5 previous weeks is [400, 450, 500, 450, 400], I can calculate the mean and stddev. If the current value is more than 2 stddevs away from the mean, we should color that data point differently so as to highlight it as something that needs to be looked at in case there is an operational issue.
stddev = http://warrenseen.com/blog/2006/03/13/how-to-calculate-standard-deviation/
mean = values.sum / values.size
I'm thinking normal values would be green, 2 stddev away would be yellow and 3 stddev would be red.