tcgoetz / GarminDB

Download and parse data from Garmin Connect or a Garmin watch, FitBit CSV, and MS Health CSV files into and analyze data in Sqlite serverless databases with Jupyter notebooks.
GNU General Public License v2.0
1.1k stars 138 forks source link

Time values in summary tables #237

Open HenningoDK opened 2 months ago

HenningoDK commented 2 months ago

I have a few issues with the summarized time values in 'garmin_summary.db'.

[weeks_summary].[intensity_time]: This appears to be calculated as an average of the non-zero values from [days_summary].[intensity_time]. Same issue applies to [weeks_summary].[moderate_activity_time]. I think the correct calculation for these would be the sum of the values found in the [days_summary] table. The field [weeks_summary].[vigorous_activity_time] is already calculated correctly as the sum.

In tables [months_summary] and [years_summary] there is an issue when the summarized values (intensity_time, moderate_activity_time, vigorous_activity_time) exceed 24 hours.