Change to weekly downloads

This commit is contained in:
Marty Oehme 2025-09-28 19:30:37 +02:00
parent 8fc84287ef
commit 83dfce1a61
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -129,14 +129,19 @@ def _():
@app.cell @app.cell
def _(df: pl.DataFrame): def _(df: pl.DataFrame):
weekly_downloads = (
df.sort("date")
.group_by_dynamic("date", every="1w")
.agg(pl.col("downloads").sum())
.sort("date")
)
( (
lp.ggplot( lp.ggplot(weekly_downloads, lp.aes("date", "downloads"))
df.group_by("date").agg(pl.col("downloads").sum()).sort("date"),
lp.aes("date", "downloads"),
)
+ lp.geom_line() + lp.geom_line()
+ lp.geom_smooth(method="loess")
+ lp.geom_smooth(method="lm")
+ lp.labs( + lp.labs(
title="Daily downloads", title="Weekly downloads",
) )
) )
return return
@ -187,6 +192,12 @@ def _(sizes_df):
# further ideas: # further ideas:
#
# - daily download habits:
# - which weekday has most downloads?
# - are we downloading further spread of versions on specific days
# - are there 'update' days, where things converge? specific weekday/on holidays/etc?
#
# - which kernels have been DL when? (simplified for semver) # - which kernels have been DL when? (simplified for semver)
# - when did specific kernels enter the repos? # - when did specific kernels enter the repos?
# #