Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Incorrect stats calculations #47

Open
ljden opened this issue Nov 18, 2020 · 1 comment
Open

Incorrect stats calculations #47

ljden opened this issue Nov 18, 2020 · 1 comment

Comments

@ljden
Copy link

ljden commented Nov 18, 2020

The calculations for trends are incorrect, the calculations have been simplified in a way that will probably only hold after a long period of time, and definitely don't hold in a short period of time.

image

As I started on a Sunday, in the previous week, the divider should be 4/7, although the code seems to calculate this as 5 days not 4 (see calc below?)

timeTrend: calculateTrend(total.time, week.time, daysDiff / 7),

This will then result in the percent = (820' / (935'/(4/7)))100 = 820'/9*35' * 5/7 * 100% = 62% (as seen above)

const d = divider || 1
const avgSeconds = total / d
const percent = (period * 100) / avgSeconds

@Ayesha-Sadiq
Copy link

Hello! Love the app @sasa95 , thank you so much! Very useful! I am not sure what other platform to use, so messaging here. How do I interpret the statistics? What does it mean when it indicated I have gone up by 73.9% on my "Today" tab? I did 4 sessions yesterday and 3 today, 45 min each (and it indicates going up by 73.9%). Could you also help me interpret the 42% down in "week" tab and 86.5% down in "month" tab? Thank you so much once again!

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants