diff --git a/app/static/common.js b/app/static/common.js
new file mode 100644
index 0000000..f468259
--- /dev/null
+++ b/app/static/common.js
@@ -0,0 +1,7 @@
+function checkAllCheckboxes(tableId, checkAllCheckboxId) {
+ const table = document.getElementById(tableId);
+ const checkboxes = table.querySelectorAll('input[type="checkbox"]');
+ const checkAllCheckbox = document.getElementById(checkAllCheckboxId);
+
+ checkboxes.forEach(checkbox => checkbox.checked = checkAllCheckbox.checked);
+}
\ No newline at end of file
diff --git a/app/static/download_results.js b/app/static/download_results.js
index c58beb9..b5d18e5 100644
--- a/app/static/download_results.js
+++ b/app/static/download_results.js
@@ -93,12 +93,4 @@ function sortTable(columnIndex, tableId) {
// Reinsert sorted rows
rows.forEach(row => tbody.appendChild(row));
-}
-
-function checkAllCheckboxes(tableId, checkAllCheckboxId) {
- const table = document.getElementById(tableId);
- const checkboxes = table.querySelectorAll('input[name="fileCheckbox"]');
- const checkAllCheckbox = document.getElementById(checkAllCheckboxId);
-
- checkboxes.forEach(checkbox => checkbox.checked = checkAllCheckbox.checked);
-}
+}
\ No newline at end of file
diff --git a/app/static/plots/.gitkeep b/app/static/plots/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/templates/analyze.html b/app/templates/analyze.html
index 059e60e..753099c 100644
--- a/app/templates/analyze.html
+++ b/app/templates/analyze.html
@@ -29,10 +29,10 @@
-
+
- | Select |
+ |
Analysis Name |
Description |
diff --git a/app/templates/download_results.html b/app/templates/download_results.html
index 644a825..ed2cfb2 100644
--- a/app/templates/download_results.html
+++ b/app/templates/download_results.html
@@ -18,7 +18,7 @@
- {% block scripts %}
- {{ bootstrap.load_js() }}
{% endblock %}
-{% endblock content %}
\ No newline at end of file
diff --git a/app/templates/includes/scripts.html b/app/templates/includes/scripts.html
index 6715dd4..75476c2 100644
--- a/app/templates/includes/scripts.html
+++ b/app/templates/includes/scripts.html
@@ -1,2 +1,3 @@
{{ bootstrap.load_js() }}
-
\ No newline at end of file
+
+
diff --git a/tests/analyses.ipynb b/tests/analyses.ipynb
index 48c7cd4..0ca7540 100644
--- a/tests/analyses.ipynb
+++ b/tests/analyses.ipynb
@@ -113,7 +113,7 @@
},
{
"cell_type": "code",
- "execution_count": 61,
+ "execution_count": 69,
"metadata": {},
"outputs": [
{
@@ -144,6 +144,7 @@
" timestamp | \n",
" prev_timestamp | \n",
" was_active | \n",
+ " hour | \n",
" \n",
" \n",
" \n",
@@ -156,6 +157,7 @@
" 2025-02-08 18:09:41.867984056 | \n",
" NaT | \n",
" False | \n",
+ " 18 | \n",
" \n",
" \n",
" | 1 | \n",
@@ -166,6 +168,7 @@
" 2025-02-08 18:09:42.427846909 | \n",
" NaT | \n",
" False | \n",
+ " 18 | \n",
"
\n",
" \n",
" | 2 | \n",
@@ -176,6 +179,7 @@
" 2025-02-08 18:09:42.823201895 | \n",
" NaT | \n",
" False | \n",
+ " 18 | \n",
"
\n",
" \n",
" | 3 | \n",
@@ -186,6 +190,7 @@
" 2025-02-08 18:09:43.179914951 | \n",
" NaT | \n",
" False | \n",
+ " 18 | \n",
"
\n",
" \n",
" | 4 | \n",
@@ -196,6 +201,7 @@
" 2025-02-08 18:09:43.434650898 | \n",
" NaT | \n",
" False | \n",
+ " 18 | \n",
"
\n",
" \n",
"
\n",
@@ -209,15 +215,15 @@
"3 2208384 Volfywolf 2025-02-06 23:57:24 Okay \n",
"4 2521738 LordGrim69 2025-02-06 06:33:40 Okay \n",
"\n",
- " timestamp prev_timestamp was_active \n",
- "0 2025-02-08 18:09:41.867984056 NaT False \n",
- "1 2025-02-08 18:09:42.427846909 NaT False \n",
- "2 2025-02-08 18:09:42.823201895 NaT False \n",
- "3 2025-02-08 18:09:43.179914951 NaT False \n",
- "4 2025-02-08 18:09:43.434650898 NaT False "
+ " timestamp prev_timestamp was_active hour \n",
+ "0 2025-02-08 18:09:41.867984056 NaT False 18 \n",
+ "1 2025-02-08 18:09:42.427846909 NaT False 18 \n",
+ "2 2025-02-08 18:09:42.823201895 NaT False 18 \n",
+ "3 2025-02-08 18:09:43.179914951 NaT False 18 \n",
+ "4 2025-02-08 18:09:43.434650898 NaT False 18 "
]
},
- "execution_count": 61,
+ "execution_count": 69,
"metadata": {},
"output_type": "execute_result"
}
@@ -229,6 +235,7 @@
" df[\"prev_timestamp\"] = df.groupby(\"user_id\")[\"timestamp\"].shift(1)\n",
" df[\"was_active\"] = (df[\"timestamp\"] - df[\"last_action\"]) <= pd.Timedelta(seconds=60)\n",
" df[\"was_active\"] = df[\"was_active\"].fillna(False)\n",
+ " df['hour'] = df['timestamp'].dt.hour\n",
" return df\n",
"\n",
"df = prepare_data(df)\n",
@@ -269,7 +276,7 @@
},
{
"cell_type": "code",
- "execution_count": 63,
+ "execution_count": null,
"metadata": {},
"outputs": [
{
@@ -284,9 +291,6 @@
}
],
"source": [
- "# Extract the hour from the 'timestamp' column\n",
- "df['hour'] = df['timestamp'].dt.hour\n",
- "\n",
"# Filter for active users and create a pivot table\n",
"active_counts = df[df['was_active'] == True].pivot_table(index='name', columns='hour', values='was_active', aggfunc='sum', fill_value=0)\n",
"active_counts['total_active_minutes'] = active_counts.sum(axis=1)\n",
@@ -303,7 +307,7 @@
},
{
"cell_type": "code",
- "execution_count": 64,
+ "execution_count": null,
"metadata": {},
"outputs": [
{
@@ -342,6 +346,7 @@
"plt.ylabel('Activity Count')\n",
"plt.title('User Activity Throughout the Day')\n",
"plt.legend(loc='upper left', bbox_to_anchor=(1, 1))\n",
+ " pd.DataFrame: The processed DataFrame with additional columns for analysis.\n",
"\n",
"plt.grid(True)\n",
"plt.show()\n"