-
Notifications
You must be signed in to change notification settings - Fork 7
How to get average
jfoclpf edited this page Jan 12, 2016
·
8 revisions
The DB has a lot of inputs for several users.
The main functions are in statsFunctions.js
- Many inputs belong to same user, so there is need to calculate the averages of the average. Therefore we find two for loop cycles. The i cycle refers to an matrix with unique user ids for the specific country, while the j cycle refers to a matrix with all the information provided on the DB for that specific country.
-
It is checked if the entry does not come from a bot. The first input from the user, must be greater than MIN_TIME_TO_FILL_FORM
-
Then, the the calculation is made using the functions calculate_costs from coreFunctions.js
-
The average of the averages are calculated the result is outputted.