Skip to content

Instantly share code, notes, and snippets.

@nipunbatra
Created June 14, 2019 09:42
Show Gist options
  • Save nipunbatra/5e84948c6604bdd0340ccff89e7097e8 to your computer and use it in GitHub Desktop.
Save nipunbatra/5e84948c6604bdd0340ccff89e7097e8 to your computer and use it in GitHub Desktop.
chunking-data
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
"from nilmtk import DataSet\n",
"ds = DataSet(\"/home/nipunbatra-pc/Downloads/iawe.h5\")\n",
"\n",
"elec = ds.buildings[1].elec\n",
"\n",
"df = next(elec.meters[0].load(chunksize=10000, sample_period=3600))\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"from sklearn import preprocessing\n",
"def preprocess(x):\n",
" scalar = preprocessing.StandardScaler().fit(x)\n",
" return scalar.transform(x)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/nipunbatra-pc/anaconda3/envs/nilmtk-env/lib/python3.6/site-packages/ipykernel_launcher.py:2: FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead\n",
" \n"
]
}
],
"source": [
"import pandas as pd\n",
"preprocessed = pd.DataFrame(preprocess(df[('power','active')].reshape(-1, 1)), index=df.index)"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f7f3d49b5c0>"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbW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c6YSnCO6x927PI8vQqyeAfWsntVz3vY80ulMoVwPLDOzeg9OzPM60AfUW+B+gn9x3nL3z4dYazapZ/WsntVzQTidkN9AcF3GewHcPU4wr3SyB4NWzcBN7v6NkGqMgnpWz+q5cBRjz0d97BRKd28zs0eBb5nZLoLLkvUCA6nH82a+6OlSz+o59bh6LgDF2HO60z6tgZndBPwLgquqf9fdvxtmYblAPavnQqWei6NnGOO5ayw4A5t78IaCoqCei4N6Lg5F2fNYQl5ERPJL6Jf/ExGR6CjkRUQKmEJeRKSAKeRFRAqYQl5EpIAp5EVECphCXkSkgCnkRUQK2P8HHaxc2i8N+poAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"df[('power','active')].plot()"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f7f3c3a5518>"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD4CAYAAADvsV2wAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAfvUlEQVR4nO3de5hU9Z3n8fe371y6G6Eb6AtyERBplKvGXNUxiuDddjZmN09um2WTcRIzk8mus5dJJs/MPNkn2Uw2MYnrPpvEPNnEmdhNxIhGHTcxJKsRiovgDVQSqhqkaYSmgb5VffePU2CB3UjT1XWq6nxez9MPdS5d5/vtaj596ndOnWPujoiIFL+SsAsQEZHcUOCLiESEAl9EJCIU+CIiEaHAFxGJCAW+iEhElIVdwJnU1dX5rFmzwi5DRKRgbNq06YC71w+1LK8Df9asWWzcuDHsMkRECoaZ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psh7HtWQjgUXe/oa8H7gVg8+An9iWUnGKVmXZBy0aAEOmNmjBJcF2DCaGnJNPRd/z1HrF9QzEen5nALfzMrcfZDgsr1x4P70WFc9wQ9kk7sfMbNpBAcyZpnZh9Lbex/BBxa+6e4/z0oXOaCei7/nqPUL6pmI9HzCiMbwzawM+CrBdWzWu/svzWwhwbU/LiG4UcfLBNd8/p8EP8w/cfdvZTzHJ9z9B9lrYWyp5+LvOWr9gnomIj2/jZ/9NSOM4CpvPwb+DfAkwfmoRnAVw68TXM61lOBI9QZOvZZGxdluK1++1HPx9xy1ftVzdHoe6mskQzrVwBJgpQdvdw4ANwKt7v5jM/uZu/cBmNl2gr+U1WbW48EHDwrxXqzqufh7jlq/oJ6j0vPbnPVZOu7eDewmuMwpwG+BjcBVZjY944dVTXCd62Pu3u0FfBNm9QwUec9R6xfUc3pW0fc8lJGelrkWWGJmDR5cOGgb0Ac0WOAugrdCr7j7Z7Nca1jUc/H3HLV+QT1HpedTjDTwNxDci/LjAO4eIzh3dYIHA12bgFXu/uUs1hg29Vz8PUetX1DPUen5FCM6LdPd95rZz4Gvmtkugtuv9QKD6eUFdU7q2VDPxd9z1PoF9RyVnk93TpdWMLNVwJ8S3GH+Hne/J9uF5Rv1XPw9R61fUM9EpOcTzvlaOhZcLc49+ABDJKjn4he1fkE9h11LLuXkBigiIhK+nN7iUEREwqPAFxGJCAW+iEhEKPBFRCJCgS8iEhEKfBGRiFDgi4hEhAJfRCQi/j9NdGcPDcdutgAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"preprocessed.plot()"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>0</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2013-05-24 05:00:00+05:30</th>\n",
" <td>-0.717642</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 06:00:00+05:30</th>\n",
" <td>-0.715534</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 07:00:00+05:30</th>\n",
" <td>-0.696334</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 08:00:00+05:30</th>\n",
" <td>-0.696334</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 09:00:00+05:30</th>\n",
" <td>1.340332</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 10:00:00+05:30</th>\n",
" <td>1.485513</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0\n",
"2013-05-24 05:00:00+05:30 -0.717642\n",
"2013-05-24 06:00:00+05:30 -0.715534\n",
"2013-05-24 07:00:00+05:30 -0.696334\n",
"2013-05-24 08:00:00+05:30 -0.696334\n",
"2013-05-24 09:00:00+05:30 1.340332\n",
"2013-05-24 10:00:00+05:30 1.485513"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"preprocessed"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"st = pd.HDFStore(\"abc.h5\", \"w\")"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"st['/iawe/building1/meter1/chunk1'] = preprocessed"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
"st.close()"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"st = pd.HDFStore(\"abc.h5\", \"r\")"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<class 'pandas.io.pytables.HDFStore'>\n",
"File path: abc.h5"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"st"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['/iawe/building1/meter1/chunk1']"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"st.keys()"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>0</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2013-05-24 05:00:00+05:30</th>\n",
" <td>-0.717642</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 06:00:00+05:30</th>\n",
" <td>-0.715534</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 07:00:00+05:30</th>\n",
" <td>-0.696334</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 08:00:00+05:30</th>\n",
" <td>-0.696334</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 09:00:00+05:30</th>\n",
" <td>1.340332</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013-05-24 10:00:00+05:30</th>\n",
" <td>1.485513</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" 0\n",
"2013-05-24 05:00:00+05:30 -0.717642\n",
"2013-05-24 06:00:00+05:30 -0.715534\n",
"2013-05-24 07:00:00+05:30 -0.696334\n",
"2013-05-24 08:00:00+05:30 -0.696334\n",
"2013-05-24 09:00:00+05:30 1.340332\n",
"2013-05-24 10:00:00+05:30 1.485513"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"st['/iawe/building1/meter1/chunk1']"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment