From 8fc84287ef0faedc3049e567537551c8540737db Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 27 Sep 2025 11:34:52 +0200 Subject: [PATCH] Add daily downloads graph --- popcorn.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/popcorn.py b/popcorn.py index f5f3fca..4e044f3 100644 --- a/popcorn.py +++ b/popcorn.py @@ -127,12 +127,16 @@ def _(): return +@app.cell +def _(df: pl.DataFrame): ( - lp.ggplot(sizes_df, lp.aes(x="date", y="size")) - + lp.geom_point() - + lp.geom_smooth(method="lowess") + lp.ggplot( + df.group_by("date").agg(pl.col("downloads").sum()).sort("date"), + lp.aes("date", "downloads"), + ) + + lp.geom_line() + lp.labs( - title="", + title="Daily downloads", ) ) return