Tag : aggregate

Read more

So, we have a dashboard page where a lot of different values are aggregated and presented. These values are calculated based on roughly 500k data points and presents different index values based on surveys. To calculate a certain index we need to aggregate all data points (these are divided by question number and user id) and then we run a WMA (weighted moving average) for each question and user pair sorted by date, making the date closest to the current date having the most weight. Basically we then put this together by transforming our survey scale (0-3) to a 10 scale. This we do by taking all the answers and then divide by the highest possible outcome, for example: if a user has provided this set of answers to a survey: 2,3,3,1. Then this is transformed to our scale by doing: ((2+3+3+1)/(4*3))*10 =..

Read more