Add in-text kernel usage dates
This commit is contained in:
parent
ce38024569
commit
08737e1baa
1 changed files with 42 additions and 6 deletions
42
popcorn.py
42
popcorn.py
|
|
@ -379,14 +379,18 @@ def _(kernel_df_v99: pl.DataFrame):
|
||||||
|
|
||||||
@app.cell
|
@app.cell
|
||||||
def _(kernel_df_lazy: pl.LazyFrame):
|
def _(kernel_df_lazy: pl.LazyFrame):
|
||||||
(
|
weekly_kernel_df = (
|
||||||
lp.ggplot(
|
|
||||||
kernel_df_lazy.with_columns(pl.col("major_ver").cast(pl.String))
|
kernel_df_lazy.with_columns(pl.col("major_ver").cast(pl.String))
|
||||||
.select(["date", "major_ver", "downloads"])
|
.select(["date", "major_ver", "downloads"])
|
||||||
.sort("date")
|
.sort("date")
|
||||||
.group_by_dynamic("date", every="1w", group_by="major_ver")
|
.group_by_dynamic("date", every="1w", group_by="major_ver")
|
||||||
.agg(pl.col("downloads").sum())
|
.agg(pl.col("downloads").sum())
|
||||||
.collect(),
|
.collect()
|
||||||
|
)
|
||||||
|
|
||||||
|
(
|
||||||
|
lp.ggplot(
|
||||||
|
weekly_kernel_df,
|
||||||
lp.aes("date", "downloads", color="major_ver"),
|
lp.aes("date", "downloads", color="major_ver"),
|
||||||
)
|
)
|
||||||
+ lp.geom_line()
|
+ lp.geom_line()
|
||||||
|
|
@ -397,6 +401,38 @@ def _(kernel_df_lazy: pl.LazyFrame):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@app.cell(hide_code=True)
|
||||||
|
def _(weekly_kernel_df: pl.DataFrame):
|
||||||
|
from datetime import date
|
||||||
|
|
||||||
|
last_kernel4: date = weekly_kernel_df.filter(pl.col("major_ver") == "4")[-1][
|
||||||
|
"date"
|
||||||
|
].item()
|
||||||
|
first_kernel5: date = weekly_kernel_df.filter(pl.col("major_ver") == "5")[0][
|
||||||
|
"date"
|
||||||
|
].item()
|
||||||
|
last_kernel5: date = weekly_kernel_df.filter(pl.col("major_ver") == "5")[-1][
|
||||||
|
"date"
|
||||||
|
].item()
|
||||||
|
mo.md(
|
||||||
|
rf"""
|
||||||
|
|
||||||
|
A timeline analysis of the kernels used to report daily downloads shows that people generally
|
||||||
|
adopt new major kernel versons at roughly the same time. This change is especially stark between
|
||||||
|
major kernel versions 5 and 6, which seem to have traded place in usage almost over night.
|
||||||
|
|
||||||
|
The first time that major version 5 of the kernel shows up is on {first_kernel5}. From here, it
|
||||||
|
took a long time for the last of the version 4 kernels to disappear, coinciding with the big
|
||||||
|
switch between major version 5 and 6. The last time a major version 4 is seen is on
|
||||||
|
{last_kernel4}, while the last major version 5 kernels still pop up.
|
||||||
|
It would seem, then, that the people still running kernel version 4 used the opportunity of
|
||||||
|
everybody switching to the stable version of 6 to also upgrade their machines.
|
||||||
|
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
@app.cell(hide_code=True)
|
@app.cell(hide_code=True)
|
||||||
def _():
|
def _():
|
||||||
mo.md(
|
mo.md(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue