In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use("seaborn")
In [2]:
from jupyterworkflow.data import get_freemont_data
In [3]:
data = get_freemont_data()
data.head()
Out[3]:
In [4]:
data.resample('W').sum().plot();
In [5]:
ax = data.resample('D').sum().rolling(365).sum().plot()
ax.set_ylim(0, None)
Out[5]:
In [9]:
data.groupby(data.index.time).mean().plot();
In [7]:
pivoted = data.pivot_table('Total', index=data.index.time, columns=data.index.date)
pivoted.iloc[:5, :5]
Out[7]:
In [8]:
pivoted.plot(legend=False, alpha=0.01);
In [12]: