Add top updated packages barplot

This commit is contained in:
Marty Oehme 2025-09-28 22:08:29 +02:00
parent 4984289f69
commit 43d2bac7ad
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -224,6 +224,28 @@ def _(df_lazy:pl.LazyFrame):
return
@app.cell
def _(df_pkg_lazy: pl.LazyFrame):
DISPLAY_TOP = 20
df_top_pkg_dl = (
df_pkg_lazy.group_by("package")
.agg(pl.col("downloads").sum())
.sort("downloads", descending=True)
.head(DISPLAY_TOP)
.collect()
)
(
lp.ggplot(df_top_pkg_dl, lp.aes("package", "downloads"))
+ lp.geom_bar(stat="identity")
+ lp.labs(
title="Top packages",
caption="Daily number of unique providers for package update statistics opting in to popcorn.",
)
)
return
@app.cell
def _():
mo.md(