CBACABLab 0.0.3__tar.gz → 0.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {cbacablab-0.0.3 → cbacablab-0.0.4}/Analysis.ipynb +90 -82
  2. {cbacablab-0.0.3 → cbacablab-0.0.4}/AnalysisTesting.ipynb +267 -139
  3. {cbacablab-0.0.3 → cbacablab-0.0.4}/PKG-INFO +1 -1
  4. {cbacablab-0.0.3 → cbacablab-0.0.4}/pyproject.toml +1 -1
  5. {cbacablab-0.0.3 → cbacablab-0.0.4}/src/CBACABLab/LoadSQLData.py +51 -0
  6. {cbacablab-0.0.3 → cbacablab-0.0.4}/src/CBACABLab/__init__.py +2 -2
  7. {cbacablab-0.0.3 → cbacablab-0.0.4}/.gitattributes +0 -0
  8. {cbacablab-0.0.3 → cbacablab-0.0.4}/.github/workflows/tests.yml +0 -0
  9. {cbacablab-0.0.3 → cbacablab-0.0.4}/.gitignore +0 -0
  10. {cbacablab-0.0.3 → cbacablab-0.0.4}/.pylintrc +0 -0
  11. {cbacablab-0.0.3 → cbacablab-0.0.4}/LICENSE +0 -0
  12. {cbacablab-0.0.3 → cbacablab-0.0.4}/README.md +0 -0
  13. {cbacablab-0.0.3 → cbacablab-0.0.4}/SECURITY.md +0 -0
  14. {cbacablab-0.0.3 → cbacablab-0.0.4}/Survey.csv +0 -0
  15. {cbacablab-0.0.3 → cbacablab-0.0.4}/Survey.xlsx +0 -0
  16. {cbacablab-0.0.3 → cbacablab-0.0.4}/qualtrics_script/standard_question.js +0 -0
  17. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/001_00010.csv +0 -0
  18. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/002_00009.csv +0 -0
  19. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/003_00008.csv +0 -0
  20. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/004_00007.csv +0 -0
  21. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/005_00006.csv +0 -0
  22. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/006_00005.csv +0 -0
  23. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/007_00004.csv +0 -0
  24. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/008_00003.csv +0 -0
  25. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/009_00002.csv +0 -0
  26. {cbacablab-0.0.3 → cbacablab-0.0.4}/sensorData/010_00001.csv +0 -0
  27. {cbacablab-0.0.3 → cbacablab-0.0.4}/src/CBACABLab/LikertPrep.py +0 -0
  28. {cbacablab-0.0.3 → cbacablab-0.0.4}/src/CBACABLab/LoadRawData.py +0 -0
  29. {cbacablab-0.0.3 → cbacablab-0.0.4}/src/CBACABLab/Plots.py +0 -0
  30. {cbacablab-0.0.3 → cbacablab-0.0.4}/src/CBACABLab/Util.py +0 -0
  31. {cbacablab-0.0.3 → cbacablab-0.0.4}/src/CBACABLab/settings.json +0 -0
  32. {cbacablab-0.0.3 → cbacablab-0.0.4}/tests/dummy-data +0 -0
  33. {cbacablab-0.0.3 → cbacablab-0.0.4}/tests/scripts +0 -0
  34. {cbacablab-0.0.3 → cbacablab-0.0.4}/tests/test_public_api.py +0 -0
@@ -33,7 +33,7 @@
33
33
  },
34
34
  {
35
35
  "cell_type": "code",
36
- "execution_count": 2,
36
+ "execution_count": 1,
37
37
  "id": "2a4d7871",
38
38
  "metadata": {},
39
39
  "outputs": [],
@@ -54,7 +54,7 @@
54
54
  },
55
55
  {
56
56
  "cell_type": "code",
57
- "execution_count": 3,
57
+ "execution_count": 2,
58
58
  "id": "95f44874",
59
59
  "metadata": {},
60
60
  "outputs": [],
@@ -117,10 +117,18 @@
117
117
  },
118
118
  {
119
119
  "cell_type": "code",
120
- "execution_count": 4,
120
+ "execution_count": 3,
121
121
  "id": "4fb866d6",
122
122
  "metadata": {},
123
123
  "outputs": [
124
+ {
125
+ "name": "stderr",
126
+ "output_type": "stream",
127
+ "text": [
128
+ "Processing sensor files: 100%|██████████| 10/10 [00:02<00:00, 4.03it/s]\n",
129
+ "Processing sensor files: 100%|██████████| 10/10 [00:02<00:00, 4.27it/s]\n"
130
+ ]
131
+ },
124
132
  {
125
133
  "data": {
126
134
  "text/plain": [
@@ -136,7 +144,7 @@
136
144
  " 'iMotionsStudy']"
137
145
  ]
138
146
  },
139
- "execution_count": 4,
147
+ "execution_count": 3,
140
148
  "metadata": {},
141
149
  "output_type": "execute_result"
142
150
  }
@@ -184,7 +192,7 @@
184
192
  },
185
193
  {
186
194
  "cell_type": "code",
187
- "execution_count": 5,
195
+ "execution_count": 4,
188
196
  "id": "e474ba37",
189
197
  "metadata": {},
190
198
  "outputs": [
@@ -461,7 +469,7 @@
461
469
  "9 Master's Degree "
462
470
  ]
463
471
  },
464
- "execution_count": 5,
472
+ "execution_count": 4,
465
473
  "metadata": {},
466
474
  "output_type": "execute_result"
467
475
  }
@@ -487,7 +495,7 @@
487
495
  },
488
496
  {
489
497
  "cell_type": "code",
490
- "execution_count": 6,
498
+ "execution_count": 5,
491
499
  "id": "a0ef6d84",
492
500
  "metadata": {},
493
501
  "outputs": [
@@ -511,7 +519,7 @@
511
519
  " 'Q7']"
512
520
  ]
513
521
  },
514
- "execution_count": 6,
522
+ "execution_count": 5,
515
523
  "metadata": {},
516
524
  "output_type": "execute_result"
517
525
  }
@@ -532,7 +540,7 @@
532
540
  },
533
541
  {
534
542
  "cell_type": "code",
535
- "execution_count": 7,
543
+ "execution_count": 6,
536
544
  "id": "97206ab8",
537
545
  "metadata": {},
538
546
  "outputs": [
@@ -578,7 +586,7 @@
578
586
  },
579
587
  {
580
588
  "cell_type": "code",
581
- "execution_count": 8,
589
+ "execution_count": 7,
582
590
  "id": "d8323fd9",
583
591
  "metadata": {},
584
592
  "outputs": [
@@ -591,8 +599,8 @@
591
599
  "Dep. Variable: pupil_left R-squared: 0.113\n",
592
600
  "Model: OLS Adj. R-squared: 0.047\n",
593
601
  "Method: Least Squares F-statistic: 1.619\n",
594
- "Date: Fri, 06 Nov 2026 Prob (F-statistic): 0.251\n",
595
- "Time: 05:27:20 Log-Likelihood: 38.452\n",
602
+ "Date: Sun, 15 Nov 2026 Prob (F-statistic): 0.251\n",
603
+ "Time: 06:43:30 Log-Likelihood: 38.452\n",
596
604
  "No. Observations: 30 AIC: -70.90\n",
597
605
  "Df Residuals: 27 BIC: -66.70\n",
598
606
  "Df Model: 2 \n",
@@ -637,7 +645,7 @@
637
645
  },
638
646
  {
639
647
  "cell_type": "code",
640
- "execution_count": 9,
648
+ "execution_count": 8,
641
649
  "id": "9bcb65ec",
642
650
  "metadata": {},
643
651
  "outputs": [
@@ -779,7 +787,7 @@
779
787
  "9 4 4 Q1 2.624093 3 4"
780
788
  ]
781
789
  },
782
- "execution_count": 9,
790
+ "execution_count": 8,
783
791
  "metadata": {},
784
792
  "output_type": "execute_result"
785
793
  }
@@ -989,7 +997,7 @@
989
997
  },
990
998
  {
991
999
  "cell_type": "code",
992
- "execution_count": 11,
1000
+ "execution_count": 9,
993
1001
  "id": "51c02ebc",
994
1002
  "metadata": {},
995
1003
  "outputs": [
@@ -998,13 +1006,13 @@
998
1006
  "text/html": [
999
1007
  "<style type=\"text/css\">\n",
1000
1008
  "</style>\n",
1001
- "<table id=\"T_d64c6\">\n",
1009
+ "<table id=\"T_09637\">\n",
1002
1010
  " <caption>Response distribution</caption>\n",
1003
1011
  " <thead>\n",
1004
1012
  " <tr>\n",
1005
1013
  " <th class=\"blank level0\" >&nbsp;</th>\n",
1006
- " <th id=\"T_d64c6_level0_col0\" class=\"col_heading level0 col0\" >Count</th>\n",
1007
- " <th id=\"T_d64c6_level0_col1\" class=\"col_heading level0 col1\" >Percent</th>\n",
1014
+ " <th id=\"T_09637_level0_col0\" class=\"col_heading level0 col0\" >Count</th>\n",
1015
+ " <th id=\"T_09637_level0_col1\" class=\"col_heading level0 col1\" >Percent</th>\n",
1008
1016
  " </tr>\n",
1009
1017
  " <tr>\n",
1010
1018
  " <th class=\"index_name level0\" >Category</th>\n",
@@ -1014,35 +1022,35 @@
1014
1022
  " </thead>\n",
1015
1023
  " <tbody>\n",
1016
1024
  " <tr>\n",
1017
- " <th id=\"T_d64c6_level0_row0\" class=\"row_heading level0 row0\" >Strongly agree</th>\n",
1018
- " <td id=\"T_d64c6_row0_col0\" class=\"data row0 col0\" >10</td>\n",
1019
- " <td id=\"T_d64c6_row0_col1\" class=\"data row0 col1\" >33.3%</td>\n",
1025
+ " <th id=\"T_09637_level0_row0\" class=\"row_heading level0 row0\" >Strongly agree</th>\n",
1026
+ " <td id=\"T_09637_row0_col0\" class=\"data row0 col0\" >10</td>\n",
1027
+ " <td id=\"T_09637_row0_col1\" class=\"data row0 col1\" >33.3%</td>\n",
1020
1028
  " </tr>\n",
1021
1029
  " <tr>\n",
1022
- " <th id=\"T_d64c6_level0_row1\" class=\"row_heading level0 row1\" >Neither agree nor disagree</th>\n",
1023
- " <td id=\"T_d64c6_row1_col0\" class=\"data row1 col0\" >7</td>\n",
1024
- " <td id=\"T_d64c6_row1_col1\" class=\"data row1 col1\" >23.3%</td>\n",
1030
+ " <th id=\"T_09637_level0_row1\" class=\"row_heading level0 row1\" >Neither agree nor disagree</th>\n",
1031
+ " <td id=\"T_09637_row1_col0\" class=\"data row1 col0\" >7</td>\n",
1032
+ " <td id=\"T_09637_row1_col1\" class=\"data row1 col1\" >23.3%</td>\n",
1025
1033
  " </tr>\n",
1026
1034
  " <tr>\n",
1027
- " <th id=\"T_d64c6_level0_row2\" class=\"row_heading level0 row2\" >Strongly disagree</th>\n",
1028
- " <td id=\"T_d64c6_row2_col0\" class=\"data row2 col0\" >5</td>\n",
1029
- " <td id=\"T_d64c6_row2_col1\" class=\"data row2 col1\" >16.7%</td>\n",
1035
+ " <th id=\"T_09637_level0_row2\" class=\"row_heading level0 row2\" >Strongly disagree</th>\n",
1036
+ " <td id=\"T_09637_row2_col0\" class=\"data row2 col0\" >5</td>\n",
1037
+ " <td id=\"T_09637_row2_col1\" class=\"data row2 col1\" >16.7%</td>\n",
1030
1038
  " </tr>\n",
1031
1039
  " <tr>\n",
1032
- " <th id=\"T_d64c6_level0_row3\" class=\"row_heading level0 row3\" >Somewhat disagree</th>\n",
1033
- " <td id=\"T_d64c6_row3_col0\" class=\"data row3 col0\" >5</td>\n",
1034
- " <td id=\"T_d64c6_row3_col1\" class=\"data row3 col1\" >16.7%</td>\n",
1040
+ " <th id=\"T_09637_level0_row3\" class=\"row_heading level0 row3\" >Somewhat disagree</th>\n",
1041
+ " <td id=\"T_09637_row3_col0\" class=\"data row3 col0\" >5</td>\n",
1042
+ " <td id=\"T_09637_row3_col1\" class=\"data row3 col1\" >16.7%</td>\n",
1035
1043
  " </tr>\n",
1036
1044
  " <tr>\n",
1037
- " <th id=\"T_d64c6_level0_row4\" class=\"row_heading level0 row4\" >Somewhat agree</th>\n",
1038
- " <td id=\"T_d64c6_row4_col0\" class=\"data row4 col0\" >3</td>\n",
1039
- " <td id=\"T_d64c6_row4_col1\" class=\"data row4 col1\" >10.0%</td>\n",
1045
+ " <th id=\"T_09637_level0_row4\" class=\"row_heading level0 row4\" >Somewhat agree</th>\n",
1046
+ " <td id=\"T_09637_row4_col0\" class=\"data row4 col0\" >3</td>\n",
1047
+ " <td id=\"T_09637_row4_col1\" class=\"data row4 col1\" >10.0%</td>\n",
1040
1048
  " </tr>\n",
1041
1049
  " </tbody>\n",
1042
1050
  "</table>\n"
1043
1051
  ],
1044
1052
  "text/plain": [
1045
- "<pandas.io.formats.style.Styler at 0x1774c6120>"
1053
+ "<pandas.io.formats.style.Styler at 0x16feea900>"
1046
1054
  ]
1047
1055
  },
1048
1056
  "metadata": {},
@@ -1053,52 +1061,52 @@
1053
1061
  "text/html": [
1054
1062
  "<style type=\"text/css\">\n",
1055
1063
  "</style>\n",
1056
- "<table id=\"T_eea0c\">\n",
1064
+ "<table id=\"T_087a9\">\n",
1057
1065
  " <caption>Pupil_Left distribution</caption>\n",
1058
1066
  " <thead>\n",
1059
1067
  " <tr>\n",
1060
1068
  " <th class=\"blank level0\" >&nbsp;</th>\n",
1061
- " <th id=\"T_eea0c_level0_col0\" class=\"col_heading level0 col0\" >pupil_left</th>\n",
1069
+ " <th id=\"T_087a9_level0_col0\" class=\"col_heading level0 col0\" >pupil_left</th>\n",
1062
1070
  " </tr>\n",
1063
1071
  " </thead>\n",
1064
1072
  " <tbody>\n",
1065
1073
  " <tr>\n",
1066
- " <th id=\"T_eea0c_level0_row0\" class=\"row_heading level0 row0\" >count</th>\n",
1067
- " <td id=\"T_eea0c_row0_col0\" class=\"data row0 col0\" >30.00</td>\n",
1074
+ " <th id=\"T_087a9_level0_row0\" class=\"row_heading level0 row0\" >count</th>\n",
1075
+ " <td id=\"T_087a9_row0_col0\" class=\"data row0 col0\" >30.00</td>\n",
1068
1076
  " </tr>\n",
1069
1077
  " <tr>\n",
1070
- " <th id=\"T_eea0c_level0_row1\" class=\"row_heading level0 row1\" >mean</th>\n",
1071
- " <td id=\"T_eea0c_row1_col0\" class=\"data row1 col0\" >2.68</td>\n",
1078
+ " <th id=\"T_087a9_level0_row1\" class=\"row_heading level0 row1\" >mean</th>\n",
1079
+ " <td id=\"T_087a9_row1_col0\" class=\"data row1 col0\" >2.68</td>\n",
1072
1080
  " </tr>\n",
1073
1081
  " <tr>\n",
1074
- " <th id=\"T_eea0c_level0_row2\" class=\"row_heading level0 row2\" >std</th>\n",
1075
- " <td id=\"T_eea0c_row2_col0\" class=\"data row2 col0\" >0.07</td>\n",
1082
+ " <th id=\"T_087a9_level0_row2\" class=\"row_heading level0 row2\" >std</th>\n",
1083
+ " <td id=\"T_087a9_row2_col0\" class=\"data row2 col0\" >0.07</td>\n",
1076
1084
  " </tr>\n",
1077
1085
  " <tr>\n",
1078
- " <th id=\"T_eea0c_level0_row3\" class=\"row_heading level0 row3\" >min</th>\n",
1079
- " <td id=\"T_eea0c_row3_col0\" class=\"data row3 col0\" >2.53</td>\n",
1086
+ " <th id=\"T_087a9_level0_row3\" class=\"row_heading level0 row3\" >min</th>\n",
1087
+ " <td id=\"T_087a9_row3_col0\" class=\"data row3 col0\" >2.53</td>\n",
1080
1088
  " </tr>\n",
1081
1089
  " <tr>\n",
1082
- " <th id=\"T_eea0c_level0_row4\" class=\"row_heading level0 row4\" >25%</th>\n",
1083
- " <td id=\"T_eea0c_row4_col0\" class=\"data row4 col0\" >2.62</td>\n",
1090
+ " <th id=\"T_087a9_level0_row4\" class=\"row_heading level0 row4\" >25%</th>\n",
1091
+ " <td id=\"T_087a9_row4_col0\" class=\"data row4 col0\" >2.62</td>\n",
1084
1092
  " </tr>\n",
1085
1093
  " <tr>\n",
1086
- " <th id=\"T_eea0c_level0_row5\" class=\"row_heading level0 row5\" >50%</th>\n",
1087
- " <td id=\"T_eea0c_row5_col0\" class=\"data row5 col0\" >2.68</td>\n",
1094
+ " <th id=\"T_087a9_level0_row5\" class=\"row_heading level0 row5\" >50%</th>\n",
1095
+ " <td id=\"T_087a9_row5_col0\" class=\"data row5 col0\" >2.68</td>\n",
1088
1096
  " </tr>\n",
1089
1097
  " <tr>\n",
1090
- " <th id=\"T_eea0c_level0_row6\" class=\"row_heading level0 row6\" >75%</th>\n",
1091
- " <td id=\"T_eea0c_row6_col0\" class=\"data row6 col0\" >2.74</td>\n",
1098
+ " <th id=\"T_087a9_level0_row6\" class=\"row_heading level0 row6\" >75%</th>\n",
1099
+ " <td id=\"T_087a9_row6_col0\" class=\"data row6 col0\" >2.74</td>\n",
1092
1100
  " </tr>\n",
1093
1101
  " <tr>\n",
1094
- " <th id=\"T_eea0c_level0_row7\" class=\"row_heading level0 row7\" >max</th>\n",
1095
- " <td id=\"T_eea0c_row7_col0\" class=\"data row7 col0\" >2.82</td>\n",
1102
+ " <th id=\"T_087a9_level0_row7\" class=\"row_heading level0 row7\" >max</th>\n",
1103
+ " <td id=\"T_087a9_row7_col0\" class=\"data row7 col0\" >2.82</td>\n",
1096
1104
  " </tr>\n",
1097
1105
  " </tbody>\n",
1098
1106
  "</table>\n"
1099
1107
  ],
1100
1108
  "text/plain": [
1101
- "<pandas.io.formats.style.Styler at 0x7076d57750>"
1109
+ "<pandas.io.formats.style.Styler at 0x16fc2f750>"
1102
1110
  ]
1103
1111
  },
1104
1112
  "metadata": {},
@@ -1109,52 +1117,52 @@
1109
1117
  "text/html": [
1110
1118
  "<style type=\"text/css\">\n",
1111
1119
  "</style>\n",
1112
- "<table id=\"T_07baf\">\n",
1120
+ "<table id=\"T_9f40f\">\n",
1113
1121
  " <caption>Pupil_Right distribution</caption>\n",
1114
1122
  " <thead>\n",
1115
1123
  " <tr>\n",
1116
1124
  " <th class=\"blank level0\" >&nbsp;</th>\n",
1117
- " <th id=\"T_07baf_level0_col0\" class=\"col_heading level0 col0\" >pupil_right</th>\n",
1125
+ " <th id=\"T_9f40f_level0_col0\" class=\"col_heading level0 col0\" >pupil_right</th>\n",
1118
1126
  " </tr>\n",
1119
1127
  " </thead>\n",
1120
1128
  " <tbody>\n",
1121
1129
  " <tr>\n",
1122
- " <th id=\"T_07baf_level0_row0\" class=\"row_heading level0 row0\" >count</th>\n",
1123
- " <td id=\"T_07baf_row0_col0\" class=\"data row0 col0\" >29.00</td>\n",
1130
+ " <th id=\"T_9f40f_level0_row0\" class=\"row_heading level0 row0\" >count</th>\n",
1131
+ " <td id=\"T_9f40f_row0_col0\" class=\"data row0 col0\" >29.00</td>\n",
1124
1132
  " </tr>\n",
1125
1133
  " <tr>\n",
1126
- " <th id=\"T_07baf_level0_row1\" class=\"row_heading level0 row1\" >mean</th>\n",
1127
- " <td id=\"T_07baf_row1_col0\" class=\"data row1 col0\" >2.70</td>\n",
1134
+ " <th id=\"T_9f40f_level0_row1\" class=\"row_heading level0 row1\" >mean</th>\n",
1135
+ " <td id=\"T_9f40f_row1_col0\" class=\"data row1 col0\" >2.70</td>\n",
1128
1136
  " </tr>\n",
1129
1137
  " <tr>\n",
1130
- " <th id=\"T_07baf_level0_row2\" class=\"row_heading level0 row2\" >std</th>\n",
1131
- " <td id=\"T_07baf_row2_col0\" class=\"data row2 col0\" >0.10</td>\n",
1138
+ " <th id=\"T_9f40f_level0_row2\" class=\"row_heading level0 row2\" >std</th>\n",
1139
+ " <td id=\"T_9f40f_row2_col0\" class=\"data row2 col0\" >0.10</td>\n",
1132
1140
  " </tr>\n",
1133
1141
  " <tr>\n",
1134
- " <th id=\"T_07baf_level0_row3\" class=\"row_heading level0 row3\" >min</th>\n",
1135
- " <td id=\"T_07baf_row3_col0\" class=\"data row3 col0\" >2.52</td>\n",
1142
+ " <th id=\"T_9f40f_level0_row3\" class=\"row_heading level0 row3\" >min</th>\n",
1143
+ " <td id=\"T_9f40f_row3_col0\" class=\"data row3 col0\" >2.52</td>\n",
1136
1144
  " </tr>\n",
1137
1145
  " <tr>\n",
1138
- " <th id=\"T_07baf_level0_row4\" class=\"row_heading level0 row4\" >25%</th>\n",
1139
- " <td id=\"T_07baf_row4_col0\" class=\"data row4 col0\" >2.61</td>\n",
1146
+ " <th id=\"T_9f40f_level0_row4\" class=\"row_heading level0 row4\" >25%</th>\n",
1147
+ " <td id=\"T_9f40f_row4_col0\" class=\"data row4 col0\" >2.61</td>\n",
1140
1148
  " </tr>\n",
1141
1149
  " <tr>\n",
1142
- " <th id=\"T_07baf_level0_row5\" class=\"row_heading level0 row5\" >50%</th>\n",
1143
- " <td id=\"T_07baf_row5_col0\" class=\"data row5 col0\" >2.71</td>\n",
1150
+ " <th id=\"T_9f40f_level0_row5\" class=\"row_heading level0 row5\" >50%</th>\n",
1151
+ " <td id=\"T_9f40f_row5_col0\" class=\"data row5 col0\" >2.71</td>\n",
1144
1152
  " </tr>\n",
1145
1153
  " <tr>\n",
1146
- " <th id=\"T_07baf_level0_row6\" class=\"row_heading level0 row6\" >75%</th>\n",
1147
- " <td id=\"T_07baf_row6_col0\" class=\"data row6 col0\" >2.79</td>\n",
1154
+ " <th id=\"T_9f40f_level0_row6\" class=\"row_heading level0 row6\" >75%</th>\n",
1155
+ " <td id=\"T_9f40f_row6_col0\" class=\"data row6 col0\" >2.79</td>\n",
1148
1156
  " </tr>\n",
1149
1157
  " <tr>\n",
1150
- " <th id=\"T_07baf_level0_row7\" class=\"row_heading level0 row7\" >max</th>\n",
1151
- " <td id=\"T_07baf_row7_col0\" class=\"data row7 col0\" >2.85</td>\n",
1158
+ " <th id=\"T_9f40f_level0_row7\" class=\"row_heading level0 row7\" >max</th>\n",
1159
+ " <td id=\"T_9f40f_row7_col0\" class=\"data row7 col0\" >2.85</td>\n",
1152
1160
  " </tr>\n",
1153
1161
  " </tbody>\n",
1154
1162
  "</table>\n"
1155
1163
  ],
1156
1164
  "text/plain": [
1157
- "<pandas.io.formats.style.Styler at 0x7076d57750>"
1165
+ "<pandas.io.formats.style.Styler at 0x16fc2f750>"
1158
1166
  ]
1159
1167
  },
1160
1168
  "metadata": {},
@@ -1178,7 +1186,7 @@
1178
1186
  },
1179
1187
  {
1180
1188
  "cell_type": "code",
1181
- "execution_count": 12,
1189
+ "execution_count": 10,
1182
1190
  "id": "3d9923db",
1183
1191
  "metadata": {},
1184
1192
  "outputs": [
@@ -1271,7 +1279,7 @@
1271
1279
  "4 Master's Degree "
1272
1280
  ]
1273
1281
  },
1274
- "execution_count": 12,
1282
+ "execution_count": 10,
1275
1283
  "metadata": {},
1276
1284
  "output_type": "execute_result"
1277
1285
  }
@@ -1296,7 +1304,7 @@
1296
1304
  },
1297
1305
  {
1298
1306
  "cell_type": "code",
1299
- "execution_count": 13,
1307
+ "execution_count": 11,
1300
1308
  "id": "b14230cf",
1301
1309
  "metadata": {},
1302
1310
  "outputs": [
@@ -1432,7 +1440,7 @@
1432
1440
  "4 0.025275 0.024139 "
1433
1441
  ]
1434
1442
  },
1435
- "execution_count": 13,
1443
+ "execution_count": 11,
1436
1444
  "metadata": {},
1437
1445
  "output_type": "execute_result"
1438
1446
  }
@@ -1449,7 +1457,7 @@
1449
1457
  },
1450
1458
  {
1451
1459
  "cell_type": "code",
1452
- "execution_count": 14,
1460
+ "execution_count": 12,
1453
1461
  "id": "c40f5402",
1454
1462
  "metadata": {},
1455
1463
  "outputs": [
@@ -1560,7 +1568,7 @@
1560
1568
  "4 358.868249 Joy 0.120167 "
1561
1569
  ]
1562
1570
  },
1563
- "execution_count": 14,
1571
+ "execution_count": 12,
1564
1572
  "metadata": {},
1565
1573
  "output_type": "execute_result"
1566
1574
  }
@@ -1587,7 +1595,7 @@
1587
1595
  },
1588
1596
  {
1589
1597
  "cell_type": "code",
1590
- "execution_count": 15,
1598
+ "execution_count": 13,
1591
1599
  "id": "8b1f24f1",
1592
1600
  "metadata": {},
1593
1601
  "outputs": [
@@ -1661,7 +1669,7 @@
1661
1669
  },
1662
1670
  {
1663
1671
  "cell_type": "code",
1664
- "execution_count": 16,
1672
+ "execution_count": 14,
1665
1673
  "id": "f2a2ca1c",
1666
1674
  "metadata": {},
1667
1675
  "outputs": [
@@ -1825,7 +1833,7 @@
1825
1833
  },
1826
1834
  {
1827
1835
  "cell_type": "code",
1828
- "execution_count": 17,
1836
+ "execution_count": 15,
1829
1837
  "id": "9bb85722",
1830
1838
  "metadata": {},
1831
1839
  "outputs": [
@@ -1857,7 +1865,7 @@
1857
1865
  },
1858
1866
  {
1859
1867
  "cell_type": "code",
1860
- "execution_count": 18,
1868
+ "execution_count": 16,
1861
1869
  "id": "ed731078",
1862
1870
  "metadata": {},
1863
1871
  "outputs": [
@@ -92,8 +92,8 @@
92
92
  "name": "stderr",
93
93
  "output_type": "stream",
94
94
  "text": [
95
- "Processing sensor files: 100%|██████████| 10/10 [00:02<00:00, 4.02it/s]\n",
96
- "Processing sensor files: 100%|██████████| 10/10 [00:02<00:00, 4.23it/s]\n"
95
+ "Processing sensor files: 100%|██████████| 10/10 [00:02<00:00, 3.69it/s]\n",
96
+ "Processing sensor files: 100%|██████████| 10/10 [00:02<00:00, 4.00it/s]\n"
97
97
  ]
98
98
  }
99
99
  ],
@@ -301,96 +301,6 @@
301
301
  " <td>White/ Caucasian</td>\n",
302
302
  " <td>Prefer not to say</td>\n",
303
303
  " </tr>\n",
304
- " <tr>\n",
305
- " <th>5</th>\n",
306
- " <td>2</td>\n",
307
- " <td>Q3</td>\n",
308
- " <td>Somewhat disagree</td>\n",
309
- " <td>736.664201</td>\n",
310
- " <td>NaN</td>\n",
311
- " <td>2.752320</td>\n",
312
- " <td>NaN</td>\n",
313
- " <td>97.902746</td>\n",
314
- " <td>NaN</td>\n",
315
- " <td>25.002819</td>\n",
316
- " <td>NaN</td>\n",
317
- " <td>89.207</td>\n",
318
- " <td>94.341</td>\n",
319
- " <td>White/ Caucasian</td>\n",
320
- " <td>Prefer not to say</td>\n",
321
- " </tr>\n",
322
- " <tr>\n",
323
- " <th>6</th>\n",
324
- " <td>3</td>\n",
325
- " <td>Q1</td>\n",
326
- " <td>Neither agree nor disagree</td>\n",
327
- " <td>380.960150</td>\n",
328
- " <td>264.400428</td>\n",
329
- " <td>2.719926</td>\n",
330
- " <td>2.847198</td>\n",
331
- " <td>98.039979</td>\n",
332
- " <td>98.498688</td>\n",
333
- " <td>26.620419</td>\n",
334
- " <td>0.036503</td>\n",
335
- " <td>100.000</td>\n",
336
- " <td>2.458</td>\n",
337
- " <td>White/ Caucasian</td>\n",
338
- " <td>High school diploma / GED</td>\n",
339
- " </tr>\n",
340
- " <tr>\n",
341
- " <th>7</th>\n",
342
- " <td>3</td>\n",
343
- " <td>Q2</td>\n",
344
- " <td>Strongly disagree</td>\n",
345
- " <td>591.957592</td>\n",
346
- " <td>438.112677</td>\n",
347
- " <td>2.702798</td>\n",
348
- " <td>2.532557</td>\n",
349
- " <td>97.798824</td>\n",
350
- " <td>98.661983</td>\n",
351
- " <td>90.557137</td>\n",
352
- " <td>0.024104</td>\n",
353
- " <td>100.000</td>\n",
354
- " <td>2.458</td>\n",
355
- " <td>White/ Caucasian</td>\n",
356
- " <td>High school diploma / GED</td>\n",
357
- " </tr>\n",
358
- " <tr>\n",
359
- " <th>8</th>\n",
360
- " <td>3</td>\n",
361
- " <td>Q3</td>\n",
362
- " <td>Somewhat disagree</td>\n",
363
- " <td>733.998717</td>\n",
364
- " <td>257.911149</td>\n",
365
- " <td>2.662162</td>\n",
366
- " <td>2.658208</td>\n",
367
- " <td>97.131732</td>\n",
368
- " <td>98.370094</td>\n",
369
- " <td>0.029900</td>\n",
370
- " <td>0.038205</td>\n",
371
- " <td>100.000</td>\n",
372
- " <td>2.458</td>\n",
373
- " <td>White/ Caucasian</td>\n",
374
- " <td>High school diploma / GED</td>\n",
375
- " </tr>\n",
376
- " <tr>\n",
377
- " <th>9</th>\n",
378
- " <td>4</td>\n",
379
- " <td>Q1</td>\n",
380
- " <td>Somewhat agree</td>\n",
381
- " <td>385.729328</td>\n",
382
- " <td>402.003738</td>\n",
383
- " <td>2.624093</td>\n",
384
- " <td>2.658857</td>\n",
385
- " <td>97.832081</td>\n",
386
- " <td>NaN</td>\n",
387
- " <td>0.043469</td>\n",
388
- " <td>NaN</td>\n",
389
- " <td>51.432</td>\n",
390
- " <td>7.629</td>\n",
391
- " <td>Asian/ Asian American</td>\n",
392
- " <td>Master's Degree</td>\n",
393
- " </tr>\n",
394
304
  " </tbody>\n",
395
305
  "</table>\n",
396
306
  "</div>"
@@ -402,11 +312,6 @@
402
312
  "2 1 Q3 Strongly agree 409.204696 \n",
403
313
  "3 2 Q1 Strongly agree 384.045313 \n",
404
314
  "4 2 Q2 Neither agree nor disagree 1027.143104 \n",
405
- "5 2 Q3 Somewhat disagree 736.664201 \n",
406
- "6 3 Q1 Neither agree nor disagree 380.960150 \n",
407
- "7 3 Q2 Strongly disagree 591.957592 \n",
408
- "8 3 Q3 Somewhat disagree 733.998717 \n",
409
- "9 4 Q1 Somewhat agree 385.729328 \n",
410
315
  "\n",
411
316
  " duration_right pupil_left pupil_right Attention_left Attention_right \\\n",
412
317
  "0 357.075008 2.628579 2.714873 98.137547 97.839279 \n",
@@ -414,35 +319,13 @@
414
319
  "2 694.727733 2.817981 2.836787 NaN 97.550504 \n",
415
320
  "3 722.940208 2.693345 2.841391 97.755627 97.696284 \n",
416
321
  "4 398.548022 2.739849 2.741312 95.377090 97.866264 \n",
417
- "5 NaN 2.752320 NaN 97.902746 NaN \n",
418
- "6 264.400428 2.719926 2.847198 98.039979 98.498688 \n",
419
- "7 438.112677 2.702798 2.532557 97.798824 98.661983 \n",
420
- "8 257.911149 2.662162 2.658208 97.131732 98.370094 \n",
421
- "9 402.003738 2.624093 2.658857 97.832081 NaN \n",
422
322
  "\n",
423
- " Joy_left Joy_right Q4_4 Q5_4 Q6 \\\n",
424
- "0 0.034117 0.037362 65.198 22.066 Other \n",
425
- "1 0.120167 1.596050 65.198 22.066 Other \n",
426
- "2 NaN 0.052147 65.198 22.066 Other \n",
427
- "3 0.025384 0.025649 89.207 94.341 White/ Caucasian \n",
428
- "4 0.025275 0.024139 89.207 94.341 White/ Caucasian \n",
429
- "5 25.002819 NaN 89.207 94.341 White/ Caucasian \n",
430
- "6 26.620419 0.036503 100.000 2.458 White/ Caucasian \n",
431
- "7 90.557137 0.024104 100.000 2.458 White/ Caucasian \n",
432
- "8 0.029900 0.038205 100.000 2.458 White/ Caucasian \n",
433
- "9 0.043469 NaN 51.432 7.629 Asian/ Asian American \n",
434
- "\n",
435
- " Q7 \n",
436
- "0 Bachelor's Degree \n",
437
- "1 Bachelor's Degree \n",
438
- "2 Bachelor's Degree \n",
439
- "3 Prefer not to say \n",
440
- "4 Prefer not to say \n",
441
- "5 Prefer not to say \n",
442
- "6 High school diploma / GED \n",
443
- "7 High school diploma / GED \n",
444
- "8 High school diploma / GED \n",
445
- "9 Master's Degree "
323
+ " Joy_left Joy_right Q4_4 Q5_4 Q6 Q7 \n",
324
+ "0 0.034117 0.037362 65.198 22.066 Other Bachelor's Degree \n",
325
+ "1 0.120167 1.596050 65.198 22.066 Other Bachelor's Degree \n",
326
+ "2 NaN 0.052147 65.198 22.066 Other Bachelor's Degree \n",
327
+ "3 0.025384 0.025649 89.207 94.341 White/ Caucasian Prefer not to say \n",
328
+ "4 0.025275 0.024139 89.207 94.341 White/ Caucasian Prefer not to say "
446
329
  ]
447
330
  },
448
331
  "execution_count": 6,
@@ -458,12 +341,257 @@
458
341
  " instrumentProperties=INSTRUMENT_PROPERTIES,\n",
459
342
  " databaseName=DATABASE,\n",
460
343
  ")\n",
461
- "panel.head(10)"
344
+ "panel.head()"
345
+ ]
346
+ },
347
+ {
348
+ "cell_type": "code",
349
+ "execution_count": 10,
350
+ "id": "91da2e13",
351
+ "metadata": {},
352
+ "outputs": [],
353
+ "source": [
354
+ "normalized_panel = CBACABLab.normalizeSensorDataByRespondent(panel, sensor_columns=[\"duration_right\", \"duration_left\"])"
355
+ ]
356
+ },
357
+ {
358
+ "cell_type": "code",
359
+ "execution_count": 11,
360
+ "id": "90fca6e7",
361
+ "metadata": {},
362
+ "outputs": [
363
+ {
364
+ "data": {
365
+ "text/html": [
366
+ "<div>\n",
367
+ "<style scoped>\n",
368
+ " .dataframe tbody tr th:only-of-type {\n",
369
+ " vertical-align: middle;\n",
370
+ " }\n",
371
+ "\n",
372
+ " .dataframe tbody tr th {\n",
373
+ " vertical-align: top;\n",
374
+ " }\n",
375
+ "\n",
376
+ " .dataframe thead tr th {\n",
377
+ " text-align: left;\n",
378
+ " }\n",
379
+ "\n",
380
+ " .dataframe thead tr:last-of-type th {\n",
381
+ " text-align: right;\n",
382
+ " }\n",
383
+ "</style>\n",
384
+ "<table border=\"1\" class=\"dataframe\">\n",
385
+ " <thead>\n",
386
+ " <tr>\n",
387
+ " <th></th>\n",
388
+ " <th colspan=\"5\" halign=\"left\">duration_right_normalized</th>\n",
389
+ " <th colspan=\"5\" halign=\"left\">duration_left_normalized</th>\n",
390
+ " </tr>\n",
391
+ " <tr>\n",
392
+ " <th></th>\n",
393
+ " <th>mean</th>\n",
394
+ " <th>std</th>\n",
395
+ " <th>count</th>\n",
396
+ " <th>min</th>\n",
397
+ " <th>max</th>\n",
398
+ " <th>mean</th>\n",
399
+ " <th>std</th>\n",
400
+ " <th>count</th>\n",
401
+ " <th>min</th>\n",
402
+ " <th>max</th>\n",
403
+ " </tr>\n",
404
+ " <tr>\n",
405
+ " <th>respondent_id</th>\n",
406
+ " <th></th>\n",
407
+ " <th></th>\n",
408
+ " <th></th>\n",
409
+ " <th></th>\n",
410
+ " <th></th>\n",
411
+ " <th></th>\n",
412
+ " <th></th>\n",
413
+ " <th></th>\n",
414
+ " <th></th>\n",
415
+ " <th></th>\n",
416
+ " </tr>\n",
417
+ " </thead>\n",
418
+ " <tbody>\n",
419
+ " <tr>\n",
420
+ " <th>1</th>\n",
421
+ " <td>-7.401487e-17</td>\n",
422
+ " <td>1.0</td>\n",
423
+ " <td>3</td>\n",
424
+ " <td>-0.944037</td>\n",
425
+ " <td>1.383937</td>\n",
426
+ " <td>1.332268e-15</td>\n",
427
+ " <td>1.0</td>\n",
428
+ " <td>3</td>\n",
429
+ " <td>-0.963382</td>\n",
430
+ " <td>1.378308</td>\n",
431
+ " </tr>\n",
432
+ " <tr>\n",
433
+ " <th>2</th>\n",
434
+ " <td>0.000000e+00</td>\n",
435
+ " <td>1.0</td>\n",
436
+ " <td>2</td>\n",
437
+ " <td>-1.000000</td>\n",
438
+ " <td>1.000000</td>\n",
439
+ " <td>1.156482e-16</td>\n",
440
+ " <td>1.0</td>\n",
441
+ " <td>3</td>\n",
442
+ " <td>-1.262230</td>\n",
443
+ " <td>1.183457</td>\n",
444
+ " </tr>\n",
445
+ " <tr>\n",
446
+ " <th>3</th>\n",
447
+ " <td>-1.850372e-16</td>\n",
448
+ " <td>1.0</td>\n",
449
+ " <td>3</td>\n",
450
+ " <td>-0.745627</td>\n",
451
+ " <td>1.413501</td>\n",
452
+ " <td>2.960595e-16</td>\n",
453
+ " <td>1.0</td>\n",
454
+ " <td>3</td>\n",
455
+ " <td>-1.296269</td>\n",
456
+ " <td>1.137793</td>\n",
457
+ " </tr>\n",
458
+ " <tr>\n",
459
+ " <th>4</th>\n",
460
+ " <td>3.700743e-17</td>\n",
461
+ " <td>1.0</td>\n",
462
+ " <td>3</td>\n",
463
+ " <td>-0.791868</td>\n",
464
+ " <td>1.410680</td>\n",
465
+ " <td>-4.440892e-16</td>\n",
466
+ " <td>1.0</td>\n",
467
+ " <td>3</td>\n",
468
+ " <td>-0.888324</td>\n",
469
+ " <td>1.397137</td>\n",
470
+ " </tr>\n",
471
+ " <tr>\n",
472
+ " <th>5</th>\n",
473
+ " <td>-1.480297e-16</td>\n",
474
+ " <td>1.0</td>\n",
475
+ " <td>3</td>\n",
476
+ " <td>-1.277678</td>\n",
477
+ " <td>1.163866</td>\n",
478
+ " <td>0.000000e+00</td>\n",
479
+ " <td>1.0</td>\n",
480
+ " <td>3</td>\n",
481
+ " <td>-1.288168</td>\n",
482
+ " <td>1.149521</td>\n",
483
+ " </tr>\n",
484
+ " <tr>\n",
485
+ " <th>6</th>\n",
486
+ " <td>-1.850372e-16</td>\n",
487
+ " <td>1.0</td>\n",
488
+ " <td>3</td>\n",
489
+ " <td>-1.379881</td>\n",
490
+ " <td>0.958169</td>\n",
491
+ " <td>-5.921189e-16</td>\n",
492
+ " <td>1.0</td>\n",
493
+ " <td>3</td>\n",
494
+ " <td>-1.328828</td>\n",
495
+ " <td>1.083535</td>\n",
496
+ " </tr>\n",
497
+ " <tr>\n",
498
+ " <th>7</th>\n",
499
+ " <td>1.850372e-16</td>\n",
500
+ " <td>1.0</td>\n",
501
+ " <td>3</td>\n",
502
+ " <td>-0.918910</td>\n",
503
+ " <td>1.390424</td>\n",
504
+ " <td>-3.700743e-16</td>\n",
505
+ " <td>1.0</td>\n",
506
+ " <td>3</td>\n",
507
+ " <td>-1.388100</td>\n",
508
+ " <td>0.928323</td>\n",
509
+ " </tr>\n",
510
+ " <tr>\n",
511
+ " <th>8</th>\n",
512
+ " <td>2.775558e-16</td>\n",
513
+ " <td>1.0</td>\n",
514
+ " <td>3</td>\n",
515
+ " <td>-1.172686</td>\n",
516
+ " <td>1.270891</td>\n",
517
+ " <td>-5.921189e-16</td>\n",
518
+ " <td>1.0</td>\n",
519
+ " <td>3</td>\n",
520
+ " <td>-1.387275</td>\n",
521
+ " <td>0.931548</td>\n",
522
+ " </tr>\n",
523
+ " <tr>\n",
524
+ " <th>9</th>\n",
525
+ " <td>-1.184238e-15</td>\n",
526
+ " <td>1.0</td>\n",
527
+ " <td>3</td>\n",
528
+ " <td>-1.398537</td>\n",
529
+ " <td>0.881121</td>\n",
530
+ " <td>5.551115e-16</td>\n",
531
+ " <td>1.0</td>\n",
532
+ " <td>3</td>\n",
533
+ " <td>-0.969626</td>\n",
534
+ " <td>1.376367</td>\n",
535
+ " </tr>\n",
536
+ " <tr>\n",
537
+ " <th>10</th>\n",
538
+ " <td>-2.960595e-16</td>\n",
539
+ " <td>1.0</td>\n",
540
+ " <td>3</td>\n",
541
+ " <td>-1.195382</td>\n",
542
+ " <td>1.252135</td>\n",
543
+ " <td>-3.700743e-16</td>\n",
544
+ " <td>1.0</td>\n",
545
+ " <td>3</td>\n",
546
+ " <td>-0.712409</td>\n",
547
+ " <td>1.414200</td>\n",
548
+ " </tr>\n",
549
+ " </tbody>\n",
550
+ "</table>\n",
551
+ "</div>"
552
+ ],
553
+ "text/plain": [
554
+ " duration_right_normalized \\\n",
555
+ " mean std count min max \n",
556
+ "respondent_id \n",
557
+ "1 -7.401487e-17 1.0 3 -0.944037 1.383937 \n",
558
+ "2 0.000000e+00 1.0 2 -1.000000 1.000000 \n",
559
+ "3 -1.850372e-16 1.0 3 -0.745627 1.413501 \n",
560
+ "4 3.700743e-17 1.0 3 -0.791868 1.410680 \n",
561
+ "5 -1.480297e-16 1.0 3 -1.277678 1.163866 \n",
562
+ "6 -1.850372e-16 1.0 3 -1.379881 0.958169 \n",
563
+ "7 1.850372e-16 1.0 3 -0.918910 1.390424 \n",
564
+ "8 2.775558e-16 1.0 3 -1.172686 1.270891 \n",
565
+ "9 -1.184238e-15 1.0 3 -1.398537 0.881121 \n",
566
+ "10 -2.960595e-16 1.0 3 -1.195382 1.252135 \n",
567
+ "\n",
568
+ " duration_left_normalized \n",
569
+ " mean std count min max \n",
570
+ "respondent_id \n",
571
+ "1 1.332268e-15 1.0 3 -0.963382 1.378308 \n",
572
+ "2 1.156482e-16 1.0 3 -1.262230 1.183457 \n",
573
+ "3 2.960595e-16 1.0 3 -1.296269 1.137793 \n",
574
+ "4 -4.440892e-16 1.0 3 -0.888324 1.397137 \n",
575
+ "5 0.000000e+00 1.0 3 -1.288168 1.149521 \n",
576
+ "6 -5.921189e-16 1.0 3 -1.328828 1.083535 \n",
577
+ "7 -3.700743e-16 1.0 3 -1.388100 0.928323 \n",
578
+ "8 -5.921189e-16 1.0 3 -1.387275 0.931548 \n",
579
+ "9 5.551115e-16 1.0 3 -0.969626 1.376367 \n",
580
+ "10 -3.700743e-16 1.0 3 -0.712409 1.414200 "
581
+ ]
582
+ },
583
+ "execution_count": 11,
584
+ "metadata": {},
585
+ "output_type": "execute_result"
586
+ }
587
+ ],
588
+ "source": [
589
+ "CBACABLab.returnDescriptiveStatsByRespondent(normalized_panel, sensor_columns=[\"duration_right_normalized\", \"duration_left_normalized\"])"
462
590
  ]
463
591
  },
464
592
  {
465
593
  "cell_type": "code",
466
- "execution_count": 7,
594
+ "execution_count": 12,
467
595
  "id": "66d7f901",
468
596
  "metadata": {},
469
597
  "outputs": [],
@@ -492,7 +620,7 @@
492
620
  },
493
621
  {
494
622
  "cell_type": "code",
495
- "execution_count": 8,
623
+ "execution_count": 13,
496
624
  "id": "6b35684a",
497
625
  "metadata": {},
498
626
  "outputs": [
@@ -799,7 +927,7 @@
799
927
  "9 Master's Degree 3 4 "
800
928
  ]
801
929
  },
802
- "execution_count": 8,
930
+ "execution_count": 13,
803
931
  "metadata": {},
804
932
  "output_type": "execute_result"
805
933
  }
@@ -832,7 +960,7 @@
832
960
  },
833
961
  {
834
962
  "cell_type": "code",
835
- "execution_count": 9,
963
+ "execution_count": 14,
836
964
  "id": "938badc9",
837
965
  "metadata": {},
838
966
  "outputs": [
@@ -974,7 +1102,7 @@
974
1102
  "9 4 4 Q1 2.624093 3 4"
975
1103
  ]
976
1104
  },
977
- "execution_count": 9,
1105
+ "execution_count": 14,
978
1106
  "metadata": {},
979
1107
  "output_type": "execute_result"
980
1108
  }
@@ -1004,7 +1132,7 @@
1004
1132
  },
1005
1133
  {
1006
1134
  "cell_type": "code",
1007
- "execution_count": 10,
1135
+ "execution_count": 15,
1008
1136
  "id": "f28541bc",
1009
1137
  "metadata": {},
1010
1138
  "outputs": [
@@ -1019,7 +1147,7 @@
1019
1147
  "name": "stderr",
1020
1148
  "output_type": "stream",
1021
1149
  "text": [
1022
- "100%|██████████| 100/100 [00:04<00:00, 24.22it/s]\n"
1150
+ "100%|██████████| 100/100 [00:04<00:00, 20.43it/s]\n"
1023
1151
  ]
1024
1152
  },
1025
1153
  {
@@ -1057,8 +1185,8 @@
1057
1185
  " <td>-0.392776</td>\n",
1058
1186
  " <td>-0.075341</td>\n",
1059
1187
  " <td>-0.096951</td>\n",
1060
- " <td>-0.58307</td>\n",
1061
- " <td>-0.20598</td>\n",
1188
+ " <td>-0.606421</td>\n",
1189
+ " <td>-0.213997</td>\n",
1062
1190
  " <td>0.0</td>\n",
1063
1191
  " </tr>\n",
1064
1192
  " </tbody>\n",
@@ -1067,7 +1195,7 @@
1067
1195
  ],
1068
1196
  "text/plain": [
1069
1197
  " beta marginal marginal_discrete lower_bound upper_bound \\\n",
1070
- "pupil_left -0.392776 -0.075341 -0.096951 -0.58307 -0.20598 \n",
1198
+ "pupil_left -0.392776 -0.075341 -0.096951 -0.606421 -0.213997 \n",
1071
1199
  "\n",
1072
1200
  " p_value \n",
1073
1201
  "pupil_left 0.0 "
@@ -1109,7 +1237,7 @@
1109
1237
  },
1110
1238
  {
1111
1239
  "cell_type": "code",
1112
- "execution_count": 11,
1240
+ "execution_count": 16,
1113
1241
  "id": "ols-run",
1114
1242
  "metadata": {},
1115
1243
  "outputs": [
@@ -1122,8 +1250,8 @@
1122
1250
  "Dep. Variable: pupil_left R-squared: 0.113\n",
1123
1251
  "Model: OLS Adj. R-squared: 0.047\n",
1124
1252
  "Method: Least Squares F-statistic: 1.619\n",
1125
- "Date: Sun, 15 Nov 2026 Prob (F-statistic): 0.251\n",
1126
- "Time: 06:27:08 Log-Likelihood: 38.452\n",
1253
+ "Date: Wed, 18 Nov 2026 Prob (F-statistic): 0.251\n",
1254
+ "Time: 04:50:27 Log-Likelihood: 38.452\n",
1127
1255
  "No. Observations: 30 AIC: -70.90\n",
1128
1256
  "Df Residuals: 27 BIC: -66.70\n",
1129
1257
  "Df Model: 2 \n",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: CBACABLab
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Tools for loading, joining, and plotting survey and iMotions sensor data.
5
5
  Project-URL: Homepage, https://github.com/UNO-CAB-Lab/python-parsing
6
6
  Project-URL: Bug Tracker, https://github.com/UNO-CAB-Lab/python-parsing/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "CBACABLab"
7
- version = "0.0.3"
7
+ version = "0.0.4"
8
8
  description = "Tools for loading, joining, and plotting survey and iMotions sensor data."
9
9
  license = "MIT"
10
10
  authors = [
@@ -2,6 +2,8 @@ import re
2
2
  import sqlite3
3
3
  import pandas as pd
4
4
  from .LoadRawData import LoadSettings
5
+ from functools import partial
6
+
5
7
 
6
8
  def _base_question(q):
7
9
  # Strip a trailing _<digits> only if something remains before it
@@ -113,7 +115,56 @@ def LoadQuestionsWide(questions, databaseName="data.db"):
113
115
  df[column] = converted
114
116
  return df
115
117
 
118
+ def normalizeSensorDataByRespondent(sensor_data, sensor_columns=["pupil", "duration"], id="respondent_id"):
119
+ """
120
+ Normalize sensor data by respondent, so that each respondent's data has a mean of 0 and a standard deviation of 1 for each sensor column.
121
+
122
+ Args:
123
+ sensor_data (pandas.DataFrame): The sensor data to normalize.
124
+ sensor_columns (list): List of sensor columns to normalize. Default is ["pupil", "duration"].
125
+ id (str): The name of the column containing the respondent IDs. Default is "respondent_id".
126
+
127
+
128
+ Returns:
129
+ pandas.DataFrame: A new DataFrame with the normalized sensor data, with additional columns for each normalized sensor column (e.g., "pupil_normalized", "duration_normalized").
130
+
131
+ """
132
+ sensor_data_normalized = sensor_data.copy()
133
+ for respondent_id in sensor_data[id].unique():
134
+ respondent_data = sensor_data[sensor_data[id] == respondent_id]
135
+
136
+ for column in sensor_columns:
137
+ if column not in respondent_data.columns:
138
+ raise ValueError(f"Column '{column}' not found in sensor data.")
139
+ sensor_mean = respondent_data[column].mean()
140
+ sensor_std = respondent_data[column].std(ddof=0)
141
+ sensor_data_normalized.loc[sensor_data_normalized[id] == respondent_id, f"{column}_normalized"] = (
142
+ (sensor_data_normalized.loc[sensor_data_normalized[id] == respondent_id, column] - sensor_mean) / sensor_std
143
+ )
144
+
145
+ return sensor_data_normalized
146
+
147
+ pop_std = partial(pd.Series.std, ddof=0)
148
+ pop_std.__name__ = "std"
149
+
150
+ def returnDescriptiveStatsByRespondent(sensor_data, sensor_columns=["pupil", "duration"], id="respondent_id"):
151
+ """
152
+ Calculate descriptive statistics (mean, standard deviation, count, min, max) for each respondent's sensor data.
153
+
154
+ Args:
155
+ sensor_data (pandas.DataFrame): The sensor data to analyze.
156
+ sensor_columns (list): List of sensor columns to analyze. Default is ["pupil", "duration"].
157
+ id (str): The name of the column containing the respondent IDs. Default is "respondent_id".
158
+
159
+ Returns:
160
+ pandas.DataFrame: A new DataFrame with one row per respondent and columns for each descriptive statistic for each sensor column.
161
+ """
162
+
163
+ stats = sensor_data.groupby(id)[
164
+ sensor_columns
165
+ ].agg(["mean", pop_std, "count", "min", "max"])
116
166
 
167
+ return pd.DataFrame(stats)
117
168
 
118
169
 
119
170
  def LoadSurveyWithSensorDataWide(questions, databaseName="data.db", tagFilter=None, instrumentProperties=None):
@@ -1,7 +1,7 @@
1
1
  from .Plots import ProjectKDEPlot, CreateLOESSPlots, CreateMultipleLinePlots, CreateMultipleLOESSPlots, makeHeatMap
2
2
  from .Util import SummaryStatisticsOfCounts, SummaryStatisticsOfContinuous
3
3
  from .LoadRawData import LoadSurveyData, LoadSensorData, AutoDetermineQuestionIdtoQuestionNameMapping
4
- from .LoadSQLData import ListQuestions, LoadQuestionsWide, LoadSurveyWithSensorDataLong, LoadSurveyWithSensorDataWide, ListInstrumentColumns, ListLikertScales
4
+ from .LoadSQLData import ListQuestions, LoadQuestionsWide, LoadSurveyWithSensorDataLong, LoadSurveyWithSensorDataWide, ListInstrumentColumns, ListLikertScales, normalizeSensorDataByRespondent, returnDescriptiveStatsByRespondent
5
5
  from .LikertPrep import LikertToK, AddLikertColumns, CreatePanelData
6
6
 
7
- __version__ = '0.0.3'
7
+ __version__ = '0.0.4'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes