#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd import altair as alt index = "https://archive.analytics.mybinder.org/index.jsonl" # In[9]: index_url = "https://archive.analytics.mybinder.org/index.jsonl" df = pd.read_json(index_url, lines=True) df.tail() # In[16]: 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()