In [1]:
from __future__ import print_function
import nilmtk
import matplotlib.pyplot as plt
%matplotlib inline

First, load the UKDALE dataset into NILMTK. Here we are loading the HDF5 version of UKDALE which you can download by following the instructions on the UKDALE website.


In [2]:
dataset = nilmtk.DataSet('/data/mine/vadeec/merged/ukdale.h5')

Next, to speed up processing, we'll set a "window of interest" so NILMTK will only consider one month of data.


In [3]:
dataset.set_window("2014-06-01", "2014-07-01")

Get the ElecMeter associated with the Fridge in House 1:


In [4]:
BUILDING = 1
elec = dataset.buildings[BUILDING].elec
fridge = elec['fridge']

Now load the activations:


In [5]:
activations = fridge.get_activations()

In [6]:
print("Number of activations =", len(activations))


Number of activations = 867

In [7]:
activations[1].plot()
plt.show()



In [ ]: