{"cells":[{"metadata":{},"cell_type":"markdown","source":"# ASHRAE - Great Energy Predictor III\n### How much energy will a building consume?\nAssessing the value of energy efficiency improvements can be challenging as there's no way to truly know how much energy a building would have used without the improvements. The best we can do is to build counterfactual models. Once a building is overhauled the new (lower) energy consumption is compared against modeled values for the original building to calculate the savings from the retrofit. More accurate models could support better market incentives and enable lower cost financing.\n\nThis competition challenges you to build these counterfactual models across four energy types based on historic usage rates and observed weather. The dataset includes three years of hourly meter readings from over one thousand buildings at several different sites around the world."},{"metadata":{},"cell_type":"markdown","source":"### imports"},{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"import random\nimport numpy as np \nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# Supress some errors\nfrom pandas.plotting import register_matplotlib_converters\nregister_matplotlib_converters()\n\nplt.style.use('bmh')\n%matplotlib inline","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# Train.csv"},{"metadata":{"_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","trusted":true},"cell_type":"code","source":"train = pd.read_csv(\"/kaggle/input/ashrae-energy-prediction/train.csv\")\ntrain.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(f\"Number of data points in training set {len(train)}\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Building ids"},{"metadata":{"trusted":true},"cell_type":"code","source":"pd.Series(train['building_id'], dtype=\"category\").describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"print(f\"Number of unique building_ids in training set {pd.Series(train['building_id'], dtype='category').describe()['unique']}\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"plt.figure(figsize=(10,6))\nplt.hist(list(train['building_id'].value_counts()), bins=14)\nplt.title(\"Number of data points for each building_id\")\nplt.xlabel(\"Number of data points \")\nplt.ylabel(\"Number of building with that many data points\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"train['building_id'].value_counts().describe()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Timestamps"},{"metadata":{"trusted":true},"cell_type":"code","source":"train['timestamp'] = pd.to_datetime(train['timestamp'])\ntrain['timestamp'].describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"print(f\"Number of unique timestamps is {train['timestamp'].describe()['unique']}\")\nprint(f\"last  timestamp is {train['timestamp'].describe()['last']}\")\nprint(f\"first timestamp is {train['timestamp'].describe()['first']}\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":false},"cell_type":"code","source":"tcounts = train['timestamp'].value_counts()\nplt.figure(figsize=(10,6))\nplt.plot(tcounts.index, tcounts, '*')\nplt.title(\"data distribution wrt time\")\nplt.xlabel(\"time stamp\")\nplt.ylabel(\"data points\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Meter id"},{"metadata":{"trusted":true},"cell_type":"code","source":"train['meter'].value_counts()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(10,6))\nplt.bar([\"electricity\",\"chilledwater\", \"steam\", \"hotwater\"], train['meter'].value_counts())\nplt.xlabel(\"Meter ids\")\nplt.ylabel(\"counts\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(\"Number of data points for each unique meter\")\nprint((train[\"meter\"] + train[\"building_id\"]*10).value_counts().describe())","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"plt.figure(figsize=(10,6))\nplt.hist((train[\"meter\"] + train[\"building_id\"]*10).value_counts(), bins=50)\nplt.title(\"Number of data points for each unique meter\")\nplt.xlabel(\"Number of data points \")\nplt.ylabel(\"Number of unique meters with that many data points\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### most of unique meters have 8494 datapoints"},{"metadata":{},"cell_type":"markdown","source":"## Meter reading"},{"metadata":{"trusted":true},"cell_type":"code","source":"train['meter_reading'].describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"nonzero = train['meter_reading'][train['meter_reading'] != 0.0]","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(f\"total number of readings          {len(train['meter_reading'])}\")\nprint(f\"total number of non-zero readings {len(nonzero)}\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"# ploting non zero values less than 1000 as very high values screw the plot\n# len(nonzero[nonzero <= 1000] is 16723689\nplt.figure(figsize=(10,10))\nplt.hist(nonzero[nonzero <= 1000], bins=100)\nplt.title(\"non-zero meter readings  < 1000\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"fig, axes = plt.subplots(2, 2, figsize=(15,10))\n\na = train['meter_reading'][train['meter'] == 0]\nnonzero = a[ a != 0.0]\nprint(f\"total number of readings for meter type electricity          {len(a)}\")\nprint(f\"total number of non-zero readings for meter type electricity {len(nonzero)}\")\naxes[0,0].hist(nonzero[nonzero <= 1000], bins=40)\naxes[0,0].set_title(\"meter readings for meter type electricity\");\n\na = train['meter_reading'][train['meter'] == 1]\nnonzero = a[ a != 0.0]\nprint(f\"total number of readings for meter type chilledwater          {len(a)}\")\nprint(f\"total number of non-zero readings for meter type chilledwater {len(nonzero)}\")\naxes[0,1].hist(nonzero[nonzero <= 1000], bins=40)\naxes[0,1].set_title(\"meter readings for meter type chilledwater\")\n\na = train['meter_reading'][train['meter'] == 2]\nnonzero = a[ a != 0.0]\nprint(f\"total number of readings for meter type steam                 {len(a)}\")\nprint(f\"total number of non-zero readings for meter type steam        {len(nonzero)}\")\naxes[1,0].hist(nonzero[nonzero <= 1000], bins=40)\naxes[1,0].set_title(\"meter readings for meter type steam\")\n\na = train['meter_reading'][train['meter'] == 3]\nnonzero = a[ a != 0.0]\nprint(f\"total number of readings for meter type hotwater              {len(a)}\")\nprint(f\"total number of non-zero readings for meter type hotwater     {len(nonzero)}\")\naxes[1,1].hist(nonzero[nonzero <= 1000], bins=40)\naxes[1,1].set_title(\"meter readings for meter type hotwater\")\n\n\nplt.tight_layout()\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"train['unique_meter'] = train[\"meter\"] + train[\"building_id\"]*10\n\nk = 5\nfig, axes = plt.subplots(5, 1, figsize=(5*k, 10), sharex=True)\nfig.suptitle(\"Some randomly sampled Series of meter reading over entire time period\")\nl = list(train['unique_meter'].unique())\nfor i, j in enumerate(random.choices(l, k=k)):\n    x = train[train['unique_meter']==j]\n    axes[i].plot(x['timestamp'], x['meter_reading'], alpha=0.9)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"k = 5\ndays = 15\nfig, axes = plt.subplots(5, 1, figsize=(5*k, 10))\nfig.suptitle(f\"Some randomly sampled Series of meter reading over {days} days\")\nl = list(train['unique_meter'].unique())\nfor i, j in enumerate(random.choices(l, k=k)):\n    x = train[train['unique_meter']==j]\n    axes[i].plot(x['timestamp'][:24*days], x['meter_reading'][:24*days], alpha=0.9)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### log1p of meter_reading"},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"train['log_meter_reading'] = np.log1p(train[\"meter_reading\"])\nnonzero = train['log_meter_reading'][train['log_meter_reading'] != 0.0]\nplt.figure(figsize=(10,10))\nplt.hist(nonzero, bins=100)\nplt.title(\"non-zero log1p meter readings\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"fig, axes = plt.subplots(2, 2, figsize=(15,10))\n\na = train['log_meter_reading'][train['meter'] == 0]\nnonzero = a[ a != 0.0]\naxes[0,0].hist(nonzero, bins=40)\naxes[0,0].set_title(\"log1p meter readings for meter type electricity\");\n\na = train['log_meter_reading'][train['meter'] == 1]\nnonzero = a[ a != 0.0]\naxes[0,1].hist(nonzero, bins=40)\naxes[0,1].set_title(\"log1p meter readings for meter type chilledwater\")\n\na = train['log_meter_reading'][train['meter'] == 2]\nnonzero = a[ a != 0.0]\naxes[1,0].hist(nonzero, bins=40)\naxes[1,0].set_title(\"log1p meter readings for meter type steam\")\n\na = train['log_meter_reading'][train['meter'] == 3]\nnonzero = a[ a != 0.0]\naxes[1,1].hist(nonzero, bins=40)\naxes[1,1].set_title(\"log1p meter readings for meter type hotwater\")\n\nplt.tight_layout()\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"k = 5\nfig, axes = plt.subplots(5, 1, figsize=(5*k, 10), sharex=True)\nfig.suptitle(\"Some randomly sampled Series of meter reading over entire time period\")\nl = list(train['unique_meter'].unique())\nfor i, j in enumerate(random.choices(l, k=k)):\n    x = train[train['unique_meter']==j]\n    axes[i].plot(x['timestamp'], x['log_meter_reading'], alpha=0.9)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"k = 5\ndays = 15\nfig, axes = plt.subplots(5, 1, figsize=(5*k, 10))\nfig.suptitle(f\"Some randomly sampled Series of meter reading over {days} days\")\nl = list(train['unique_meter'].unique())\nfor i, j in enumerate(random.choices(l, k=k)):\n    x = train[train['unique_meter']==j]\n    axes[i].plot(x['timestamp'][:24*days], x['log_meter_reading'][:24*days], alpha=0.9)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# test.csv"},{"metadata":{"trusted":true},"cell_type":"code","source":"test = pd.read_csv(\"/kaggle/input/ashrae-energy-prediction/test.csv\")\ntest.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(f\"Number of data points in testing set {len(test)}\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## Building ids"},{"metadata":{"trusted":true},"cell_type":"code","source":"pd.Series(test['building_id'], dtype=\"category\").describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"if np.all(test['building_id'].value_counts().index.sort_values() == train['building_id'].value_counts().index.sort_values()):\n    print(\"the building_id's in train and test match\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(10,6))\nplt.hist(list(test['building_id'].value_counts()))\nplt.title(\"Number of data points for each building_id\")\nplt.xlabel(\"Number of data points\")\nplt.ylabel(\"Number of building with that many data points\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"test['building_id'].value_counts().value_counts()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### many buildings in test set have same number of occurrences"},{"metadata":{},"cell_type":"markdown","source":"## Timestamps"},{"metadata":{"trusted":true},"cell_type":"code","source":"timestamps = pd.to_datetime(test['timestamp'])\ntimestamps.describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(f\"Number of unique timestamps is {timestamps.describe()['unique']}\")\nprint(f\"last  timestamp is {timestamps.describe()['last']}\")\nprint(f\"first timestamp is {timestamps.describe()['first']}\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"tcounts = timestamps.value_counts()\nplt.figure(figsize=(10,6))\nplt.plot(tcounts.index, tcounts, '*')\nplt.title(\"data distribution wrt time\")\nplt.xlabel(\"time stamp\")\nplt.ylabel(\"data points\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Looks like at each time stamp we have equal number of test points"},{"metadata":{},"cell_type":"markdown","source":"## Meter id"},{"metadata":{"trusted":true},"cell_type":"code","source":"test['meter'].value_counts() ","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(10,6))\nplt.bar([\"electricity\",\"chilledwater\", \"steam\", \"hotwater\"], test['meter'].value_counts())\nplt.xlabel(\"Meter ids\")\nplt.ylabel(\"counts\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"if np.array(train[\"meter\"] + train[\"building_id\"]*10).sort() == np.array(test[\"meter\"] + test[\"building_id\"]*10).sort():\n    print(\"the meters in test set are all present in training set\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"print(\"Number of data points for each unique meter\")\nprint((test[\"meter\"] + test[\"building_id\"]*10).value_counts().describe())","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### ALL unique meters have 17520 datapoints in test set"},{"metadata":{},"cell_type":"markdown","source":"# building metadata"},{"metadata":{"trusted":true},"cell_type":"code","source":"meta = pd.read_csv(\"/kaggle/input/ashrae-energy-prediction/building_metadata.csv\")\nmeta.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"nul = meta.isnull()\nfor i in nul.columns:\n    print(f\"column name:{i}\\t len:{len(nul[i])} number of null values : {np.sum(nul[i])}\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"if np.all(meta['building_id'].value_counts().index.sort_values() == train['building_id'].value_counts().index.sort_values()):\n    print(\"the building_id's in train and meta_data match\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## primary use"},{"metadata":{"trusted":true},"cell_type":"code","source":"pd.Series(meta['primary_use'], dtype=\"category\").value_counts()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(8,10))\nplt.barh(meta['primary_use'].apply(str).value_counts().index, meta['primary_use'].value_counts())\nplt.ylabel(\"primary use\")\nplt.xlabel(\"counts\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## square_feet"},{"metadata":{"trusted":true},"cell_type":"code","source":"meta['square_feet'].describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(10,6))\nplt.hist(meta['square_feet'], bins=20)\nplt.ylabel(\"bin counts\")\nplt.xlabel(\"square feet\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## year built"},{"metadata":{"trusted":true},"cell_type":"code","source":"year = meta['year_built']\nyear.describe()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(15,6))\nplt.hist(meta['year_built'], bins=2017-1900-1, rwidth=0.8)\nplt.ylabel(\"bin counts\")\nplt.xlabel(\"year\")\nplt.title(\"Year built\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"## floor count"},{"metadata":{"trusted":true},"cell_type":"code","source":"meta['floor_count'].value_counts()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"nonnull = meta['floor_count'][~ meta['floor_count'].isnull()]\nplt.figure(figsize=(10,6))\nplt.bar(nonnull.apply(str).value_counts().index, nonnull.value_counts())\nplt.xlabel(\"Floor counts\")\nplt.ylabel(\"Instances\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# weather"},{"metadata":{"trusted":true},"cell_type":"code","source":"wtrain = pd.read_csv(\"/kaggle/input/ashrae-energy-prediction/weather_train.csv\")\nwtrain['timestamp'] = pd.to_datetime(wtrain['timestamp'])\nwtrain.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"wtest = pd.read_csv(\"/kaggle/input/ashrae-energy-prediction/weather_test.csv\")\nwtest['timestamp'] = pd.to_datetime(wtest['timestamp'])\nwtest.head()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"print(\"weather train\")\nprint(\"\")\nnul = wtrain.isnull()\nfor i in nul.columns:\n    print(f\"column name:{i: <{20}}len:{len(nul[i])} \\tnumber of null values : {np.sum(nul[i])}\")\n\nprint(\"\")\nprint(\"-\"*80)\nprint(\"weather test\")\nprint(\"\")\nnul = wtest.isnull()\nfor i in nul.columns:\n    print(f\"column name:{i: <{20}}len:{len(nul[i])} \\tnumber of null values : {np.sum(nul[i])}\")\nassert np.all(wtrain['site_id'].unique() == wtest['site_id'].unique())","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"wtrain.groupby(\"site_id\")['timestamp'].describe()[[ 'count', 'unique']].head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"wtest.groupby(\"site_id\")['timestamp'].describe()[[ 'count', 'unique']].head()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Temperature "},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(9,4))\nfor i in range(16):\n    site = wtrain[wtrain['site_id']== i]\n    plt.plot(site['timestamp'], site['air_temperature'])\nplt.xlabel(\"Time\")\nplt.ylabel(\"Temperature\")\nplt.title(\"Temperature at different sites in train data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(20,6))\nfor i in range(16):\n    site = wtest[wtest['site_id']== i]\n    plt.plot(site['timestamp'], site['air_temperature'])\nplt.xlabel(\"Time\")\nplt.ylabel(\"Temperature\")\nplt.title(\"Temperature at different sites in test data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Dew temperature"},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"plt.figure(figsize=(9,4))\nfor i in range(16):\n    site = wtrain[wtrain['site_id']== i]\n    plt.plot(site['timestamp'], site['dew_temperature'])\nplt.xlabel(\"Time\")\nplt.ylabel(\"Dew Temperature\")\nplt.title(\"Dew Temperature at different sites in train data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"_kg_hide-input":true,"trusted":true},"cell_type":"code","source":"plt.figure(figsize=(20,6))\nfor i in range(16):\n    site = wtest[wtest['site_id']== i]\n    plt.plot(site['timestamp'], site['dew_temperature'])\nplt.xlabel(\"Time\")\nplt.ylabel(\"Dew Temperature\")\nplt.title(\"Dew Temperature at different sites in test data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### Sea level pressure"},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"plt.figure(figsize=(9,4))\nfor i in range(16):\n    site = wtrain[wtrain['site_id']== i]\n    plt.plot(site['timestamp'], site['sea_level_pressure'], alpha=0.8)\nplt.xlabel(\"Time\")\nplt.ylabel(\"sea_level_pressure\")\nplt.title(\"sea_level_pressure at different sites in train data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"plt.figure(figsize=(20,6))\nfor i in range(16):\n    site = wtest[wtest['site_id']== i]\n    plt.plot(site['timestamp'], site['sea_level_pressure'], alpha=0.8)\nplt.xlabel(\"Time\")\nplt.ylabel(\"sea_level_pressure\")\nplt.title(\"sea_level_pressure at different sites in test data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### wind speed"},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"plt.figure(figsize=(9,4))\nfor i in range(16):\n    site = wtrain[wtrain['site_id']== i]\n    plt.plot(site['timestamp'], site['wind_speed'], alpha=0.8)\nplt.xlabel(\"Time\")\nplt.ylabel(\"wind_speed\")\nplt.title(\"wind_speed at different sites in train data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_kg_hide-input":true},"cell_type":"code","source":"plt.figure(figsize=(20,6))\nfor i in range(16):\n    site = wtest[wtest['site_id']== i]\n    plt.plot(site['timestamp'], site['wind_speed'], alpha=0.8)\nplt.xlabel(\"Time\")\nplt.ylabel(\"wind_speed\")\nplt.title(\"wind_speed at different sites in test data\")\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"### More on weather soon"},{"metadata":{},"cell_type":"markdown","source":"# Submission"},{"metadata":{"trusted":true},"cell_type":"code","source":"sub = pd.read_csv(\"/kaggle/input/ashrae-energy-prediction/sample_submission.csv\")\nsub.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"if len(sub['row_id']) == len(test['row_id']):\n    print(\"The lengths of submission.csv and test.csv match\")","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# Thank you for reading this do upvote if you like it"}],"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat":4,"nbformat_minor":1}