Merge remote-tracking branch 'origin/gramic'
commit
6ff940dbfe
17
README.md
17
README.md
|
@ -18,4 +18,19 @@ Für die folgenden Aufträge dürfen Sie je nach Vorkenntnisse beliebige Tools (
|
|||
## Problems
|
||||
- Garmin Weekly Algorithmus unknown.
|
||||
Reverse Engineering necessery
|
||||
- Comparison between Garmin (Instict Solar 2X) and Withings (Steel HR Sport) not necessarely given
|
||||
- Comparition between Garmin (Instict Solar 2X) and Withings (Steel HR Sport) not necessarely given
|
||||
|
||||
## Python Depencencis
|
||||
-
|
||||
|
||||
```shell
|
||||
pip install --upgrade pip
|
||||
pip install matplotlib
|
||||
pip install pandas
|
||||
pip install pybtex
|
||||
pip install requests
|
||||
pip install pyyaml
|
||||
pip install setuptools
|
||||
pip install bs4
|
||||
pip install requests
|
||||
```
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
Datum,Ø Score,Ø Qualität,Durchschnittliche Dauer,Ø Schlafenszeit,Ø Aufstehzeit
|
||||
Okt 11-17,45,Schlecht,5h 59min,1:40,7:50
|
||||
Okt 4-10,52,Schlecht,6h 38min,0:29,7:25
|
||||
Sep 27 - Okt 3,53,Schlecht,6h 5min,0:14,6:31
|
||||
Sep 20-26,60,Ausreichend,7h 5min,0:12,7:23
|
||||
Sep 13-19,61,Ausreichend,6h 27min,0:44,7:18
|
||||
Sep 6-12,53,Schlecht,6h 8min,1:08,7:22
|
||||
Aug 30 - Sep 5,66,Ausreichend,6h 59min,0:11,7:19
|
||||
Aug 23-29,61,Ausreichend,6h 39min,0:35,7:19
|
||||
Aug 16-22,67,Ausreichend,6h 25min,0:41,7:17
|
||||
Aug 9-15,57,Schlecht,5h 43min,0:17,6:04
|
||||
Aug 2-8,61,Ausreichend,6h 30min,0:31,7:24
|
||||
Jul 26 - Aug 1,62,Ausreichend,6h 55min,0:31,7:48
|
||||
Jul 19-25,55,Schlecht,7h 0min,2:35,10:14
|
||||
Jul 12-18,72,Ausreichend,6h 48min,0:03,7:05
|
||||
Jul 5-11,58,Schlecht,7h 42min,0:32,8:57
|
||||
Jun 28 - Jul 4,66,Ausreichend,6h 26min,1:24,7:57
|
||||
Jun 21-27,65,Ausreichend,6h 25min,0:39,7:17
|
||||
Jun 14-20,59,Schlecht,5h 43min,0:24,6:14
|
||||
Jun 7-13,61,Ausreichend,6h 34min,23:47,6:26
|
||||
Mai 31 - Jun 6,61,Ausreichend,6h 47min,0:35,7:33
|
||||
Mai 24-30,52,Schlecht,6h 33min,1:00,7:38
|
||||
Mai 17-23,51,Schlecht,6h 11min,1:12,7:30
|
||||
Mai 10-16,48,Schlecht,5h 44min,0:48,6:39
|
||||
Mai 3-9,45,Schlecht,5h 55min,0:49,6:48
|
||||
Apr 26 - Mai 2,56,Schlecht,6h 11min,1:26,7:41
|
||||
Apr 19-25,51,Schlecht,6h 19min,2:55,9:31
|
||||
Apr 12-18,57,Schlecht,6h 24min,1:28,8:03
|
||||
Apr 5-11,62,Ausreichend,6h 4min,0:56,7:09
|
||||
Mrz 29 - Apr 4,73,Ausreichend,6h 59min,1:34,8:53
|
||||
Mrz 22-28,59,Schlecht,5h 59min,1:05,7:11
|
||||
Mrz 15-21,55,Schlecht,6h 25min,0:47,7:23
|
||||
Mrz 8-14,53,Schlecht,6h 22min,0:56,7:25
|
||||
Mrz 1-7,47,Schlecht,5h 56min,0:51,6:56
|
||||
Feb 23-29,64,Ausreichend,7h 11min,0:09,7:27
|
||||
Feb 16-22,46,Schlecht,6h 56min,0:24,7:52
|
||||
Feb 9-15,50,Schlecht,8h 26min,23:58,8:48
|
||||
Feb 2-8,43,Schlecht,6h 13min,1:06,7:26
|
||||
Jan 26 - Feb 1,55,Schlecht,7h 17min,1:12,8:32
|
||||
Jan 19-25,55,Schlecht,6h 33min,0:59,7:37
|
||||
Jan 12-18,49,Schlecht,6h 16min,1:39,8:04
|
||||
Jan 5-11,54,Schlecht,6h 35min,1:28,8:14
|
||||
Dez 29, 2023 - Jan 4, 2024,55,Schlecht,7h 15min,0:52,8:34
|
||||
Dez 22-28, 2023,56,Schlecht,7h 10min,1:02,8:33
|
||||
Dez 15-21, 2023,61,Ausreichend,7h 40min,0:18,8:18
|
||||
Dez 8-14, 2023,43,Schlecht,7h 45min,23:45,8:52
|
||||
Dez 1-7, 2023,47,Schlecht,6h 51min,0:31,7:25
|
||||
Nov 24-30, 2023,48,Schlecht,7h 5min,0:29,8:01
|
||||
Nov 17-23, 2023,53,Schlecht,7h 1min,0:26,7:34
|
||||
Nov 10-16, 2023,47,Schlecht,7h 5min,0:19,7:28
|
||||
Nov 3-9, 2023,49,Schlecht,6h 10min,23:58,7:12
|
||||
Okt 27 - Nov 2, 2023,61,Ausreichend,6h 33min,0:08,6:50
|
||||
Okt 20-26, 2023,47,Schlecht,6h 11min,0:41,7:14
|
Can't render this file because it has a wrong number of fields in line 43.
|
|
@ -0,0 +1,53 @@
|
|||
Datum;In Ruhe;Hoch
|
||||
Okt 4-10;67 bpm;130 bpm
|
||||
Sep 27 - Okt 3;67 bpm;143 bpm
|
||||
Sep 20-26;66 bpm;149 bpm
|
||||
Sep 13-19;66 bpm;144 bpm
|
||||
Sep 6-12;62 bpm;132 bpm
|
||||
Aug 30 - Sep 5;64 bpm;141 bpm
|
||||
Aug 23-29;67 bpm;150 bpm
|
||||
Aug 16-22;63 bpm;143 bpm
|
||||
Aug 9-15;69 bpm;141 bpm
|
||||
Aug 2-8;67 bpm;140 bpm
|
||||
Jul 26 - Aug 1;67 bpm;147 bpm
|
||||
Jul 19-25;69 bpm;136 bpm
|
||||
Jul 12-18;66 bpm;151 bpm
|
||||
Jul 5-11;67 bpm;146 bpm
|
||||
Jun 28 - Jul 4;66 bpm;157 bpm
|
||||
Jun 21-27;64 bpm;141 bpm
|
||||
Jun 14-20;70 bpm;145 bpm
|
||||
Jun 7-13;69 bpm;134 bpm
|
||||
Mai 31 - Jun 6;70 bpm;139 bpm
|
||||
Mai 24-30;72 bpm;142 bpm
|
||||
Mai 17-23;72 bpm;135 bpm
|
||||
Mai 10-16;71 bpm;147 bpm
|
||||
Mai 3-9;73 bpm;142 bpm
|
||||
Apr 26 - Mai 2;69 bpm;151 bpm
|
||||
Apr 19-25;61 bpm;135 bpm
|
||||
Apr 12-18;58 bpm;140 bpm
|
||||
Apr 5-11;64 bpm;131 bpm
|
||||
Mrz 29 - Apr 4;63 bpm;139 bpm
|
||||
Mrz 22-28;65 bpm;135 bpm
|
||||
Mrz 15-21;66 bpm;137 bpm
|
||||
Mrz 8-14;62 bpm;136 bpm
|
||||
Mrz 1-7;70 bpm;134 bpm
|
||||
Feb 23-29;68 bpm;144 bpm
|
||||
Feb 16-22;71 bpm;132 bpm
|
||||
Feb 9-15;65 bpm;143 bpm
|
||||
Feb 2-8;66 bpm;133 bpm
|
||||
Jan 26 - Feb 1;59 bpm;142 bpm
|
||||
Jan 19-25;62 bpm;136 bpm
|
||||
Jan 12-18;60 bpm;134 bpm
|
||||
Jan 5-11;56 bpm;139 bpm
|
||||
Dez 29, 2023 - Jan 4, 2024;59 bpm;128 bpm
|
||||
Dez 22-28, 2023;52 bpm;124 bpm
|
||||
Dez 15-21, 2023;57 bpm;133 bpm
|
||||
Dez 8-14, 2023;65 bpm;133 bpm
|
||||
Dez 1-7, 2023;69 bpm;134 bpm
|
||||
Nov 24-30, 2023;68 bpm;139 bpm
|
||||
Nov 17-23, 2023;68 bpm;143 bpm
|
||||
Nov 10-16, 2023;64 bpm;144 bpm
|
||||
Nov 3-9, 2023;63 bpm;140 bpm
|
||||
Okt 27 - Nov 2, 2023;57 bpm;133 bpm
|
||||
Okt 20-26, 2023;55 bpm;138 bpm
|
||||
Okt 13-19, 2023;50 bpm;121 bpm
|
|
|
@ -0,0 +1,53 @@
|
|||
Datum,Ø Score,Ø Qualität,Durchschnittliche Dauer,Ø Schlafenszeit,Ø Aufstehzeit
|
||||
Okt 10-16,46,Schlecht,6h 11min,1:28,7:50
|
||||
Okt 3-9,56,Schlecht,6h 34min,0:33,7:22
|
||||
Sep 26 - Okt 2,52,Schlecht,6h 23min,0:00,6:37
|
||||
Sep 19-25,59,Schlecht,6h 41min,0:27,7:16
|
||||
Sep 12-18,59,Schlecht,6h 18min,0:48,7:12
|
||||
Sep 5-11,55,Schlecht,6h 19min,0:56,7:22
|
||||
Aug 29 - Sep 4,66,Ausreichend,7h 1min,0:21,7:31
|
||||
Aug 22-28,57,Schlecht,6h 17min,0:35,6:59
|
||||
Aug 15-21,72,Ausreichend,6h 36min,0:38,7:25
|
||||
Aug 8-14,56,Schlecht,5h 45min,0:16,6:06
|
||||
Aug 1-7,64,Ausreichend,7h 4min,0:39,8:10
|
||||
Jul 25-31,61,Ausreichend,6h 52min,0:40,7:56
|
||||
Jul 18-24,54,Schlecht,6h 26min,2:16,9:19
|
||||
Jul 11-17,74,Ausreichend,7h 10min,0:06,7:26
|
||||
Jul 4-10,58,Schlecht,7h 35min,0:45,9:05
|
||||
Jun 27 - Jul 3,60,Ausreichend,6h 8min,1:22,7:42
|
||||
Jun 20-26,69,Ausreichend,6h 30min,0:19,6:58
|
||||
Jun 13-19,59,Schlecht,6h 1min,0:25,6:33
|
||||
Jun 6-12,60,Ausreichend,6h 22min,0:02,6:30
|
||||
Mai 30 - Jun 5,60,Ausreichend,6h 33min,0:34,7:15
|
||||
Mai 23-29,51,Schlecht,6h 47min,0:56,7:54
|
||||
Mai 16-22,50,Schlecht,5h 51min,1:13,7:08
|
||||
Mai 9-15,55,Schlecht,6h 21min,0:58,7:23
|
||||
Mai 2-8,40,Schlecht,5h 36min,0:39,6:19
|
||||
Apr 25 - Mai 1,55,Schlecht,6h 2min,1:18,7:26
|
||||
Apr 18-24,56,Schlecht,6h 28min,3:11,9:55
|
||||
Apr 11-17,56,Schlecht,6h 17min,1:23,7:51
|
||||
Apr 4-10,62,Ausreichend,6h 18min,0:39,7:10
|
||||
Mrz 28 - Apr 3,68,Ausreichend,6h 50min,1:45,8:51
|
||||
Mrz 21-27,60,Ausreichend,6h 9min,0:56,7:13
|
||||
Mrz 14-20,54,Schlecht,6h 11min,1:03,7:24
|
||||
Mrz 7-13,54,Schlecht,6h 22min,0:49,7:17
|
||||
Feb 29 - Mrz 6,50,Schlecht,6h 4min,0:56,7:09
|
||||
Feb 22-28,61,Ausreichend,7h 11min,0:08,7:25
|
||||
Feb 15-21,44,Schlecht,6h 58min,0:19,7:51
|
||||
Feb 8-14,50,Schlecht,8h 17min,0:09,8:47
|
||||
Feb 1-7,43,Schlecht,6h 12min,1:06,7:25
|
||||
Jan 25-31,57,Schlecht,7h 21min,1:17,8:40
|
||||
Jan 18-24,51,Schlecht,6h 25min,0:56,7:26
|
||||
Jan 11-17,50,Schlecht,6h 27min,1:36,8:12
|
||||
Jan 4-10,59,Schlecht,6h 44min,1:26,8:24
|
||||
Dez 28, 2023 - Jan 3, 2024,54,Schlecht,7h 2min
|
||||
Dez 21-27, 2023,55,Schlecht,7h 16min,0:38
|
||||
Dez 14-20, 2023,56,Schlecht,7h 17min,0:31
|
||||
Dez 7-13, 2023,44,Schlecht,7h 53min,23:46
|
||||
Nov 30 - Dez 6, 2023,48,Schlecht,6h 51min,0:33
|
||||
Nov 23-29, 2023,48,Schlecht,7h 11min,0:21
|
||||
Nov 16-22, 2023,53,Schlecht,7h 7min,0:23
|
||||
Nov 9-15, 2023,47,Schlecht,7h 5min,0:19
|
||||
Nov 2-8, 2023,50,Schlecht,6h 2min,0:00
|
||||
Okt 26 - Nov 1, 2023,59,Schlecht,6h 39min,0:14
|
||||
Okt 19-25, 2023,48,Schlecht,6h 17min,0:46
|
|
|
@ -0,0 +1,52 @@
|
|||
Woche,avg_hr,Durchschnittliche Dauer
|
||||
W40-2024,98.5,6.566666666666666
|
||||
W39-2024,105.0,6.383333333333334
|
||||
W38-2024,107.5,6.683333333333334
|
||||
W37-2024,105.0,6.3
|
||||
W36-2024,97.0,6.316666666666666
|
||||
W35-2024,102.5,7.016666666666667
|
||||
W34-2024,108.5,6.283333333333333
|
||||
W33-2024,103.0,6.6
|
||||
W32-2024,105.0,5.75
|
||||
W31-2024,103.5,7.066666666666666
|
||||
W30-2024,107.0,6.866666666666667
|
||||
W29-2024,102.5,6.433333333333334
|
||||
W28-2024,108.5,7.166666666666667
|
||||
W27-2024,106.5,7.583333333333333
|
||||
W26-2024,111.5,6.133333333333334
|
||||
W25-2024,102.5,6.5
|
||||
W24-2024,107.5,6.016666666666667
|
||||
W23-2024,101.5,6.366666666666666
|
||||
W22-2024,104.5,6.55
|
||||
W21-2024,107.0,6.783333333333333
|
||||
W20-2024,103.5,5.85
|
||||
W19-2024,109.0,6.35
|
||||
W18-2024,107.5,5.6
|
||||
W17-2024,110.0,6.033333333333333
|
||||
W16-2024,98.0,6.466666666666667
|
||||
W15-2024,99.0,6.283333333333333
|
||||
W14-2024,97.5,6.3
|
||||
W13-2024,101.0,6.833333333333333
|
||||
W12-2024,100.0,6.15
|
||||
W11-2024,101.5,6.183333333333334
|
||||
W10-2024,99.0,6.366666666666666
|
||||
W9-2024,102.0,6.066666666666666
|
||||
W8-2024,106.0,7.183333333333334
|
||||
W7-2024,101.5,6.966666666666667
|
||||
W6-2024,104.0,8.283333333333333
|
||||
W5-2024,99.5,6.2
|
||||
W4-2024,100.5,7.35
|
||||
W3-2024,99.0,6.416666666666667
|
||||
W2-2024,97.0,6.45
|
||||
W1-2024,97.5,6.733333333333333
|
||||
W52-2024,93.5,7.033333333333333
|
||||
W51-2023,88.0,7.266666666666667
|
||||
W50-2023,95.0,7.283333333333333
|
||||
W49-2023,99.0,7.883333333333333
|
||||
W48-2023,101.5,6.85
|
||||
W47-2023,103.5,7.183333333333334
|
||||
W46-2023,105.5,7.116666666666666
|
||||
W45-2023,104.0,7.083333333333333
|
||||
W44-2023,101.5,6.033333333333333
|
||||
W43-2023,95.0,6.65
|
||||
W42-2023,96.5,6.283333333333333
|
|
|
@ -0,0 +1,53 @@
|
|||
Woche,avg_hr
|
||||
W40-2024,98.5
|
||||
W39-2024,105.0
|
||||
W38-2024,107.5
|
||||
W37-2024,105.0
|
||||
W36-2024,97.0
|
||||
W35-2024,102.5
|
||||
W34-2024,108.5
|
||||
W33-2024,103.0
|
||||
W32-2024,105.0
|
||||
W31-2024,103.5
|
||||
W30-2024,107.0
|
||||
W29-2024,102.5
|
||||
W28-2024,108.5
|
||||
W27-2024,106.5
|
||||
W26-2024,111.5
|
||||
W25-2024,102.5
|
||||
W24-2024,107.5
|
||||
W23-2024,101.5
|
||||
W22-2024,104.5
|
||||
W21-2024,107.0
|
||||
W20-2024,103.5
|
||||
W19-2024,109.0
|
||||
W18-2024,107.5
|
||||
W17-2024,110.0
|
||||
W16-2024,98.0
|
||||
W15-2024,99.0
|
||||
W14-2024,97.5
|
||||
W13-2024,101.0
|
||||
W12-2024,100.0
|
||||
W11-2024,101.5
|
||||
W10-2024,99.0
|
||||
W9-2024,102.0
|
||||
W8-2024,106.0
|
||||
W7-2024,101.5
|
||||
W6-2024,104.0
|
||||
W5-2024,99.5
|
||||
W4-2024,100.5
|
||||
W3-2024,99.0
|
||||
W2-2024,97.0
|
||||
W1-2024,97.5
|
||||
W52-2024,93.5
|
||||
W51-2023,88.0
|
||||
W50-2023,95.0
|
||||
W49-2023,99.0
|
||||
W48-2023,101.5
|
||||
W47-2023,103.5
|
||||
W46-2023,105.5
|
||||
W45-2023,104.0
|
||||
W44-2023,101.5
|
||||
W43-2023,95.0
|
||||
W42-2023,96.5
|
||||
W41-2023,85.5
|
|
|
@ -0,0 +1,53 @@
|
|||
Woche,Durchschnittliche Dauer
|
||||
W41-2024,6.183333333333334
|
||||
W40-2024,6.566666666666666
|
||||
W39-2024,6.383333333333334
|
||||
W38-2024,6.683333333333334
|
||||
W37-2024,6.3
|
||||
W36-2024,6.316666666666666
|
||||
W35-2024,7.016666666666667
|
||||
W34-2024,6.283333333333333
|
||||
W33-2024,6.6
|
||||
W32-2024,5.75
|
||||
W31-2024,7.066666666666666
|
||||
W30-2024,6.866666666666667
|
||||
W29-2024,6.433333333333334
|
||||
W28-2024,7.166666666666667
|
||||
W27-2024,7.583333333333333
|
||||
W26-2024,6.133333333333334
|
||||
W25-2024,6.5
|
||||
W24-2024,6.016666666666667
|
||||
W23-2024,6.366666666666666
|
||||
W22-2024,6.55
|
||||
W21-2024,6.783333333333333
|
||||
W20-2024,5.85
|
||||
W19-2024,6.35
|
||||
W18-2024,5.6
|
||||
W17-2024,6.033333333333333
|
||||
W16-2024,6.466666666666667
|
||||
W15-2024,6.283333333333333
|
||||
W14-2024,6.3
|
||||
W13-2024,6.833333333333333
|
||||
W12-2024,6.15
|
||||
W11-2024,6.183333333333334
|
||||
W10-2024,6.366666666666666
|
||||
W9-2024,6.066666666666666
|
||||
W8-2024,7.183333333333334
|
||||
W7-2024,6.966666666666667
|
||||
W6-2024,8.283333333333333
|
||||
W5-2024,6.2
|
||||
W4-2024,7.35
|
||||
W3-2024,6.416666666666667
|
||||
W2-2024,6.45
|
||||
W1-2024,6.733333333333333
|
||||
W52-2024,7.033333333333333
|
||||
W51-2023,7.266666666666667
|
||||
W50-2023,7.283333333333333
|
||||
W49-2023,7.883333333333333
|
||||
W48-2023,6.85
|
||||
W47-2023,7.183333333333334
|
||||
W46-2023,7.116666666666666
|
||||
W45-2023,7.083333333333333
|
||||
W44-2023,6.033333333333333
|
||||
W43-2023,6.65
|
||||
W42-2023,6.283333333333333
|
|
|
@ -0,0 +1,53 @@
|
|||
Datum;Ø Score;Ø Qualität;Durchschnittliche Dauer;Ø Schlafenszeit;Ø Aufstehzeit
|
||||
Okt 10-16;46;Schlecht;6h 11min;1:28;7:50
|
||||
Okt 3-9;56;Schlecht;6h 34min;0:33;7:22
|
||||
Sep 26 - Okt 2;52;Schlecht;6h 23min;0:00;6:37
|
||||
Sep 19-25;59;Schlecht;6h 41min;0:27;7:16
|
||||
Sep 12-18;59;Schlecht;6h 18min;0:48;7:12
|
||||
Sep 5-11;55;Schlecht;6h 19min;0:56;7:22
|
||||
Aug 29 - Sep 4;66;Ausreichend;7h 1min;0:21;7:31
|
||||
Aug 22-28;57;Schlecht;6h 17min;0:35;6:59
|
||||
Aug 15-21;72;Ausreichend;6h 36min;0:38;7:25
|
||||
Aug 8-14;56;Schlecht;5h 45min;0:16;6:06
|
||||
Aug 1-7;64;Ausreichend;7h 4min;0:39;8:10
|
||||
Jul 25-31;61;Ausreichend;6h 52min;0:40;7:56
|
||||
Jul 18-24;54;Schlecht;6h 26min;2:16;9:19
|
||||
Jul 11-17;74;Ausreichend;7h 10min;0:06;7:26
|
||||
Jul 4-10;58;Schlecht;7h 35min;0:45;9:05
|
||||
Jun 27 - Jul 3;60;Ausreichend;6h 8min;1:22;7:42
|
||||
Jun 20-26;69;Ausreichend;6h 30min;0:19;6:58
|
||||
Jun 13-19;59;Schlecht;6h 1min;0:25;6:33
|
||||
Jun 6-12;60;Ausreichend;6h 22min;0:02;6:30
|
||||
Mai 30 - Jun 5;60;Ausreichend;6h 33min;0:34;7:15
|
||||
Mai 23-29;51;Schlecht;6h 47min;0:56;7:54
|
||||
Mai 16-22;50;Schlecht;5h 51min;1:13;7:08
|
||||
Mai 9-15;55;Schlecht;6h 21min;0:58;7:23
|
||||
Mai 2-8;40;Schlecht;5h 36min;0:39;6:19
|
||||
Apr 25 - Mai 1;55;Schlecht;6h 2min;1:18;7:26
|
||||
Apr 18-24;56;Schlecht;6h 28min;3:11;9:55
|
||||
Apr 11-17;56;Schlecht;6h 17min;1:23;7:51
|
||||
Apr 4-10;62;Ausreichend;6h 18min;0:39;7:10
|
||||
Mrz 28 - Apr 3;68;Ausreichend;6h 50min;1:45;8:51
|
||||
Mrz 21-27;60;Ausreichend;6h 9min;0:56;7:13
|
||||
Mrz 14-20;54;Schlecht;6h 11min;1:03;7:24
|
||||
Mrz 7-13;54;Schlecht;6h 22min;0:49;7:17
|
||||
Feb 29 - Mrz 6;50;Schlecht;6h 4min;0:56;7:09
|
||||
Feb 22-28;61;Ausreichend;7h 11min;0:08;7:25
|
||||
Feb 15-21;44;Schlecht;6h 58min;0:19;7:51
|
||||
Feb 8-14;50;Schlecht;8h 17min;0:09;8:47
|
||||
Feb 1-7;43;Schlecht;6h 12min;1:06;7:25
|
||||
Jan 25-31;57;Schlecht;7h 21min;1:17;8:40
|
||||
Jan 18-24;51;Schlecht;6h 25min;0:56;7:26
|
||||
Jan 11-17;50;Schlecht;6h 27min;1:36;8:12
|
||||
Jan 4-10;59;Schlecht;6h 44min;1:26;8:24
|
||||
Dez 28, 2023 - Jan 3, 2024;54;Schlecht;7h 2min
|
||||
Dez 21-27, 2023;55;Schlecht;7h 16min;0:38
|
||||
Dez 14-20, 2023;56;Schlecht;7h 17min;0:31
|
||||
Dez 7-13, 2023;44;Schlecht;7h 53min;23:46
|
||||
Nov 30 - Dez 6, 2023;48;Schlecht;6h 51min;0:33
|
||||
Nov 23-29, 2023;48;Schlecht;7h 11min;0:21
|
||||
Nov 16-22, 2023;53;Schlecht;7h 7min;0:23
|
||||
Nov 9-15, 2023;47;Schlecht;7h 5min;0:19
|
||||
Nov 2-8, 2023;50;Schlecht;6h 2min;0:00
|
||||
Okt 26 - Nov 1, 2023;59;Schlecht;6h 39min;0:14
|
||||
Okt 19-25, 2023;48;Schlecht;6h 17min;0:46
|
Can't render this file because it has a wrong number of fields in line 43.
|
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
|
@ -0,0 +1,161 @@
|
|||
import pandas as pd
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from datetime import datetime
|
||||
|
||||
# Manuelle Zuordnung der Monatsnamen von Deutsch auf Englisch
|
||||
month_translation = {
|
||||
'Jan': 'Jan', 'Feb': 'Feb', 'Mär': 'Mar', 'Mrz': 'Mar', 'Apr': 'Apr', 'Mai': 'May', 'Jun': 'Jun',
|
||||
'Jul': 'Jul', 'Aug': 'Aug', 'Sep': 'Sep', 'Okt': 'Oct', 'Nov': 'Nov', 'Dez': 'Dec'
|
||||
}
|
||||
|
||||
# Funktion zur Umwandlung von '6h 11min' in numerische Stundenwerte
|
||||
def convert_sleep_duration(sleep_duration_str):
|
||||
hours = 0
|
||||
minutes = 0
|
||||
if 'h' in sleep_duration_str:
|
||||
hours_part = sleep_duration_str.split('h')[0].strip()
|
||||
hours = int(hours_part)
|
||||
if 'min' in sleep_duration_str:
|
||||
minutes_part = sleep_duration_str.split('h')[-1].replace('min', '').strip()
|
||||
minutes = int(minutes_part)
|
||||
return hours + (minutes / 60)
|
||||
|
||||
# Funktion, um Datumsbereiche in Kalenderwoche und Jahr zu konvertieren
|
||||
def convert_to_week_and_year(date_range_str):
|
||||
date_range_str = date_range_str.replace(" - ", "-").replace(",", "")
|
||||
|
||||
if "-" not in date_range_str and len(date_range_str.split(" ")) == 2:
|
||||
month_str, day_str = date_range_str.split(" ")
|
||||
day = int(day_str.strip())
|
||||
year_str = str(datetime.now().year)
|
||||
|
||||
if month_str in month_translation:
|
||||
month_str = month_translation[month_str]
|
||||
|
||||
start_date = datetime.strptime(f"{month_str} {day} {year_str}", "%b %d %Y")
|
||||
week_number = start_date.isocalendar()[1]
|
||||
year = start_date.year
|
||||
|
||||
return f"W{week_number}-{year}"
|
||||
|
||||
if date_range_str[-4:].isdigit():
|
||||
year_str = date_range_str[-4:]
|
||||
date_range_str = date_range_str[:-5]
|
||||
else:
|
||||
year_str = str(datetime.now().year)
|
||||
|
||||
start_part, end_part = date_range_str.split("-")
|
||||
start_parts = start_part.split(" ")
|
||||
start_month_str = start_parts[0]
|
||||
start_day = int(start_parts[1].strip())
|
||||
end_parts = end_part.split(" ")
|
||||
|
||||
if len(end_parts) == 2:
|
||||
end_month_str = end_parts[0]
|
||||
end_day = int(end_parts[1].strip())
|
||||
else:
|
||||
end_month_str = start_month_str
|
||||
end_day = int(end_parts[0].strip())
|
||||
|
||||
if start_month_str in month_translation:
|
||||
start_month_str = month_translation[start_month_str]
|
||||
if end_month_str in month_translation:
|
||||
end_month_str = month_translation[end_month_str]
|
||||
|
||||
start_date = datetime.strptime(f"{start_month_str} {start_day} {year_str}", "%b %d %Y")
|
||||
week_number = start_date.isocalendar()[1]
|
||||
year = start_date.year
|
||||
|
||||
return f"W{week_number}-{year}"
|
||||
|
||||
# Datei Pfade
|
||||
hr_data_path = '/home/gra/PycharmProjects/cds_introduction_data_science_assignment/data/raw/hr_gramic.csv'
|
||||
sleep_data_path = '/home/gra/PycharmProjects/cds_introduction_data_science_assignment/data/sandbox/sleep_gramic.csv'
|
||||
hr_clean_path = '/home/gra/PycharmProjects/cds_introduction_data_science_assignment/data/sandbox/hr_data_clean.csv'
|
||||
sleep_clean_path = '/home/gra/PycharmProjects/cds_introduction_data_science_assignment/data/sandbox/sleep_data_clean.csv'
|
||||
combined_data_path = '/home/gra/PycharmProjects/cds_introduction_data_science_assignment/data/sandbox/combined_data.csv'
|
||||
graphic_corr_path = '/home/gra/PycharmProjects/cds_introduction_data_science_assignment/data/final/gramic_sleep_hr_correlation.png'
|
||||
graphic_weekly_path = '/home/gra/PycharmProjects/cds_introduction_data_science_assignment/data/final/weekly_hr_sleep.png'
|
||||
|
||||
# Schritt 1: Lade die HR-Daten und entferne 'bpm'
|
||||
hr_data = pd.read_csv(hr_data_path, sep=';')
|
||||
hr_data['In Ruhe'] = hr_data['In Ruhe'].str.replace(' bpm', '').astype(float)
|
||||
hr_data['Hoch'] = hr_data['Hoch'].str.replace(' bpm', '').astype(float)
|
||||
hr_data['Woche'] = hr_data['Datum'].apply(convert_to_week_and_year)
|
||||
hr_data['avg_hr'] = hr_data[['In Ruhe', 'Hoch']].mean(axis=1)
|
||||
hr_data_clean = hr_data[['Woche', 'avg_hr']]
|
||||
hr_data_clean.to_csv(hr_clean_path, index=False)
|
||||
|
||||
# Schritt 2: Lade die Schlafdaten
|
||||
sleep_data = pd.read_csv(sleep_data_path, sep=';')
|
||||
sleep_data['Woche'] = sleep_data['Datum'].apply(convert_to_week_and_year)
|
||||
sleep_data['Durchschnittliche Dauer'] = sleep_data['Durchschnittliche Dauer'].apply(convert_sleep_duration)
|
||||
sleep_data_clean = sleep_data[['Woche', 'Durchschnittliche Dauer']]
|
||||
sleep_data_clean.to_csv(sleep_clean_path, index=False)
|
||||
|
||||
# Schritt 3: Kombiniere die HR- und Schlafdaten
|
||||
combined_data = pd.merge(hr_data_clean, sleep_data_clean, on='Woche', how='inner')
|
||||
combined_data.to_csv(combined_data_path, index=False)
|
||||
|
||||
# Schritt 4: Berechne die Korrelation
|
||||
correlation = combined_data['avg_hr'].corr(combined_data['Durchschnittliche Dauer'])
|
||||
print(f"Die Korrelation zwischen der durchschnittlichen Herzfrequenz und der Schlafdauer ist: {correlation}")
|
||||
|
||||
# # Schritt 5: Visualisiere den Zusammenhang zwischen Herzfrequenz und Schlafdauer (invertierte x-Achse)
|
||||
# plt.figure(figsize=(10, 6))
|
||||
# plt.scatter(combined_data['avg_hr'], combined_data['Durchschnittliche Dauer'], color='blue', label='Datenpunkte')
|
||||
# plt.title('Zusammenhang zwischen Herzfrequenz (Durchschnitt) und Schlafdauer')
|
||||
# plt.xlabel('Durchschnittliche Herzfrequenz (bpm)')
|
||||
# plt.ylabel('Schlafdauer (Stunden)')
|
||||
# plt.grid(True)
|
||||
# m, b = np.polyfit(combined_data['avg_hr'], combined_data['Durchschnittliche Dauer'], 1)
|
||||
# plt.plot(combined_data['avg_hr'], m * combined_data['avg_hr'] + b, color='red', label=f'Trendlinie (Kor = {correlation:.2f})')
|
||||
# plt.gca().invert_xaxis() # X-Achse invertieren
|
||||
# plt.legend()
|
||||
# plt.savefig(graphic_corr_path)
|
||||
# plt.show()
|
||||
|
||||
# Schritt 5: Visualisiere den Zusammenhang zwischen Schlafdauer und Herzfrequenz
|
||||
plt.figure(figsize=(10, 6))
|
||||
plt.scatter(combined_data['Durchschnittliche Dauer'], combined_data['avg_hr'], color='blue', label='Datenpunkte')
|
||||
plt.title('Zusammenhang zwischen Schlafdauer und Herzfrequenz (Durchschnitt)')
|
||||
plt.xlabel('Schlafdauer (Stunden)')
|
||||
plt.ylabel('Durchschnittliche Herzfrequenz (bpm)')
|
||||
plt.grid(True)
|
||||
|
||||
# Berechne und zeichne die Trendlinie
|
||||
m, b = np.polyfit(combined_data['Durchschnittliche Dauer'], combined_data['avg_hr'], 1)
|
||||
plt.plot(combined_data['Durchschnittliche Dauer'], m * combined_data['Durchschnittliche Dauer'] + b, color='red', label=f'Trendlinie (Kor = {correlation:.2f})')
|
||||
|
||||
plt.legend()
|
||||
plt.savefig(graphic_corr_path)
|
||||
plt.show()
|
||||
|
||||
# Schritt 6: Erstelle eine Grafik pro Kalenderwoche (HR und Schlafdaten)
|
||||
fig, ax1 = plt.subplots(figsize=(30, 8)) # Breitere Darstellung
|
||||
|
||||
# Erste Achse: Herzfrequenz
|
||||
ax1.bar(combined_data['Woche'], combined_data['avg_hr'], width=0.4, label='Durchschnittliche Herzfrequenz', align='center', color='b')
|
||||
ax1.set_xlabel('Kalenderwoche')
|
||||
ax1.set_ylabel('Durchschnittliche Herzfrequenz (bpm)', color='b')
|
||||
ax1.tick_params(axis='y', labelcolor='b')
|
||||
|
||||
# Zweite Achse: Schlafdauer
|
||||
ax2 = ax1.twinx()
|
||||
ax2.bar(combined_data['Woche'], combined_data['Durchschnittliche Dauer'], width=0.4, label='Schlafdauer', align='edge', color='g')
|
||||
ax2.set_ylabel('Schlafdauer (Stunden)', color='g')
|
||||
ax2.tick_params(axis='y', labelcolor='g')
|
||||
|
||||
plt.title('Durchschnittliche Herzfrequenz und Schlafdauer pro Kalenderwoche')
|
||||
|
||||
# Anpassung der x-Achse für bessere Lesbarkeit
|
||||
plt.xticks(rotation=90, ha='center', fontsize=12) # Schriftgröße auf 12 erhöht
|
||||
|
||||
# Zeige nur jede zweite Woche
|
||||
ax1.set_xticks(ax1.get_xticks()[::2])
|
||||
|
||||
fig.tight_layout()
|
||||
|
||||
plt.savefig(graphic_weekly_path)
|
||||
plt.show()
|
Loading…
Reference in New Issue