In [1]:
# Settings and imports
%matplotlib inline
from collections import OrderedDict
from IPython.display import display, Markdown
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
import learn
from monitoring.data import get_production_data

sns.set()

In [2]:
# Load data from local cache, fetch and store if not available.
data = get_production_data('2018-01-01')


Data loaded from cache (/home/xeffenb1/projects/robomission/.prodcache/robomission-2018-01-01/).

In [3]:
# Example: look at the data
ts = data['task_sessions']
ts.tail()


Out[3]:
student task solved start end time_spent
id
1800 8694 21 True 2017-12-29T11:26:48.203415Z 2017-12-29T11:27:46.170989Z 57
1794 8694 44 True 2017-12-29T11:09:36.585977Z 2017-12-29T11:10:33.592476Z 57
1795 8694 26 True 2017-12-29T11:11:01.153506Z 2017-12-29T11:11:15.674378Z 14
1801 8694 18 True 2017-12-29T11:27:50.108638Z 2017-12-29T11:29:33.879208Z 103
1802 8694 41 True 2017-12-29T11:29:39.062362Z 2017-12-29T11:33:29.109295Z 230

In [4]:
# Example: plot histogram of log-times of task sessions
ts.time_spent[ts.time_spent > 0].apply(np.log).hist()


Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f62e241a470>

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]: