alina chart

This commit is contained in:
Lucas Faber authored and Lucas Vivohost committed 2026-09-14 09:20:47 +02:00
1 parent 3e258c6afe
commit 74a3cfe8ed
2 files changed
+22 -3

No files matched your search

+2
View File
@@ -41,6 +41,7 @@ dependencies = [
"paho-mqtt==2.1.0", "paho-mqtt==2.1.0",
"pandas==3.0.2", "pandas==3.0.2",
"pillow==12.2.0", "pillow==12.2.0",
"pillow-heif>=1.3.0",
"pip==25.1.1", "pip==25.1.1",
"pyasn1==0.6.3", "pyasn1==0.6.3",
"pyasn1-modules==0.4.2", "pyasn1-modules==0.4.2",
@@ -57,6 +58,7 @@ dependencies = [
"shellingham==1.5.4", "shellingham==1.5.4",
"six==1.17.0", "six==1.17.0",
"sniffio==1.3.1", "sniffio==1.3.1",
"sockets>=1.0.0",
"tenacity==9.1.4", "tenacity==9.1.4",
"tqdm==4.67.3", "tqdm==4.67.3",
"typer==0.24.1", "typer==0.24.1",
+20 -3
View File
@@ -1,6 +1,7 @@
import pandas as pd import pandas as pd
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import os import os
import socket
def interpolate_daily(df): def interpolate_daily(df):
df = df.copy() df = df.copy()
@@ -66,9 +67,19 @@ def plot_percentiles(ax, x, data_dict, p_keys, colors=None, linewidths=None, lab
return ax return ax
hostname = socket.gethostname()
if hostname == "quiethost":
# Build output path from ods_path # Build output path from ods_path
ods_path = "/data/Nextcloud/Documents/Dokumente/Shared/Alina/WachstumsDatenWHO.ods" ods_path = "/data/Nextcloud/Documents/Dokumente/Shared/Alina/Wachstum/WachstumsDatenWHO.ods"
csv_path = "/data/Nextcloud/Documents/Dokumente/Shared/Alina/WachstumAlina.csv" csv_path = "/data/Nextcloud/Documents/Dokumente/Shared/Alina/Wachstum/WachstumAlina.csv"
elif hostname == "serverhost":
print("Serverhost Mode")
import subprocess
subprocess.run(["bash", "/home/lucas/scripts/serverhost/syncNC.sh", "-al"])
ods_path = "/home/lucas/Documents/Dokumente/Shared/Alina/Wachstum/WachstumsDatenWHO.ods"
csv_path = "/home/lucas/Documents/Dokumente/Shared/Alina/Wachstum/WachstumAlina.csv"
output_dir = os.path.dirname(ods_path) output_dir = os.path.dirname(ods_path)
output_path = os.path.join(output_dir, "WachstumAlina.png") output_path = os.path.join(output_dir, "WachstumAlina.png")
@@ -101,7 +112,7 @@ who_weight_daily = interpolate_daily(who_weight_df)
who_height_daily = interpolate_daily(who_height_df) who_height_daily = interpolate_daily(who_height_df)
who_head_daily = interpolate_daily(who_head_df) who_head_daily = interpolate_daily(who_head_df)
print(alina_df["Datum"])
# Plot # Plot
last_alina_date = alina_df["Datum"].max() + pd.DateOffset(months=2) last_alina_date = alina_df["Datum"].max() + pd.DateOffset(months=2)
x = who_weight_daily["Datum"][who_weight_daily["Datum"] <= last_alina_date] x = who_weight_daily["Datum"][who_weight_daily["Datum"] <= last_alina_date]
@@ -247,4 +258,10 @@ plt.tight_layout()
plt.savefig(output_path, dpi=150) plt.savefig(output_path, dpi=150)
plt.close() plt.close()
if hostname == "serverhost":
print("Serverhost Mode")
import subprocess
subprocess.run(["bash", "/home/lucas/scripts/serverhost/syncNC.sh", "-al"])
print("Fin") print("Fin")