In [1]:
import os
from urllib.request import urlretrieve
import pandas as pd
In [2]:
from jupyterworkflow.data import get_data
In [3]:
data = get_data(force_dowload=True)
In [4]:
data.head()
Out[4]:
In [5]:
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('seaborn')
In [6]:
data.resample('W').sum().plot()
Out[6]:
In [7]:
ax = data.resample('D').sum().rolling(365).sum().plot()
ax.set_ylim(0, None)
Out[7]:
In [8]:
data.groupby(data.index.time).mean().plot()
Out[8]:
In [9]:
pivoted = data.pivot_table('Total', index= data.index.time, columns=data.index.date)
pivoted.iloc[:5, :5]
Out[9]:
In [10]:
pivoted.plot(legend=False, alpha=0.01)
Out[10]: