Add top updated packages barplot
This commit is contained in:
parent
4984289f69
commit
43d2bac7ad
1 changed files with 23 additions and 1 deletions
22
popcorn.py
22
popcorn.py
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue