import pandas as pd
import altair as alt
index = "https://archive.analytics.mybinder.org/index.jsonl"
index_url = "https://archive.analytics.mybinder.org/index.jsonl"
df = pd.read_json(index_url, lines=True)
df.tail()
name | date | count | |
---|---|---|---|
1191 | events-2022-02-06.jsonl | 2022-02-06 | 18991 |
1192 | events-2022-02-07.jsonl | 2022-02-07 | 32130 |
1193 | events-2022-02-08.jsonl | 2022-02-08 | 51583 |
1194 | events-2022-02-09.jsonl | 2022-02-09 | 38505 |
1195 | events-2022-02-10.jsonl | 2022-02-10 | 7248 |
alt.Chart(df).mark_line().transform_window(
frame=[-3, 3],
avg_count="mean(count)",
).encode(
x="date",
y=alt.Y("avg_count:Q", title="daily sessions (7-day average)"),
tooltip=[
"avg_count:Q",
"count",
"date",
],
).interactive()