diff --git a/clustering/.ipynb_checkpoints/cluster_GWR-checkpoint.ipynb b/clustering/.ipynb_checkpoints/cluster_GWR-checkpoint.ipynb new file mode 100644 index 0000000..1930529 --- /dev/null +++ b/clustering/.ipynb_checkpoints/cluster_GWR-checkpoint.ipynb @@ -0,0 +1,4140 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import xarray as xr\n", + "\n", + "from sklearn.cluster import DBSCAN\n", + "from sklearn.cluster import KMeans\n", + "\n", + "import os\n", + "import time\n", + "import calendar\n", + "\n", + "%matplotlib notebook\n", + "import matplotlib.pyplot as plt\n", + "import matplotlib" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "def categorical_cmap(df, column, cmap = 'tab20', N = 20):\n", + " # Get colormap data\n", + " c = matplotlib.cm.get_cmap( cmap )(np.linspace(0., 1, N))\n", + " \n", + " # Get length of series, number of total copies and remainder\n", + " l = len(df[ column ].unique())\n", + " n = int(np.floor(l / N))\n", + " r = l % N\n", + " \n", + " # Concatenate colormap\n", + " clist = [c]*n\n", + " clist.append( c[:r,:] )\n", + " colors = np.vstack(clist)\n", + " \n", + " # return colormap\n", + " return matplotlib.colors.LinearSegmentedColormap.from_list('%s_concat' %cmap, colors)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "def get_cluster_demand(BLD_df, demand, grouping_col, uniqueID_col = 'EGID',\n", + " dwell_nb = 'N_DWELL', canton_id = 'GDEKT', \n", + " SFH_demand = 'maison', MFH_demand = 'appart', \n", + " communal_demand = 'communal_rest', communal_demand_GE = 'communal_GVA'):\n", + "\n", + " SFH = BLD_df[BLD_df[dwell_nb] == 1]\n", + " MFH = BLD_df[BLD_df[dwell_nb] > 1]\n", + " \n", + " building_counts = xr.Dataset({ 'N_SFH' : SFH.groupby( grouping_col )[ uniqueID_col ].count(),\n", + " 'N_DWELL' : MFH.groupby( grouping_col )[ dwell_nb ].sum(),\n", + " 'N_MFH' : MFH[MFH.GDEKT != 'GE'].groupby( grouping_col )[ uniqueID_col ].count(),\n", + " 'N_MFH_GE': MFH[MFH.GDEKT == 'GE'].groupby( grouping_col )[ uniqueID_col ].count() }\n", + " ).fillna(0)\n", + "\n", + " cluster_demand = ( building_counts['N_SFH'] * demand[SFH_demand] \n", + " + building_counts['N_DWELL'] * demand[MFH_demand]\n", + " + building_counts['N_MFH'] * demand[communal_demand] \n", + " + building_counts['N_MFH_GE']* demand[communal_demand_GE] )\n", + "\n", + " return [cluster_demand, building_counts]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Load data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Load GWR" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "GWR_fp = 'D:\\Building_data\\OFS\\Buildings\\GWR_MADD_Export_MADD-20200715-A3_20200722'\n", + "GWR = pd.read_csv(os.path.join(GWR_fp, 'GWR_GEB_w_N_WHG.csv'))" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "coords = ['GKODE', 'GKODN']\n", + "GWR = GWR.dropna(subset = coords) # can only cluster GWR entries with coordinate information" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
EGIDGKODEGKODNGSTATGKATGKLASGGDENRGDEKTN_DWELL
016000002679684.3261237449.5531004.01020.01122.01ZH3.0
116000012679702.1501237493.9581004.01030.01110.01ZH1.0
216000022679713.0521237475.8141004.01030.01121.01ZH2.0
316000032679655.4551237516.4501004.01020.01122.01ZH3.0
416000052679749.2691237529.3461004.01020.01110.01ZH1.0
\n", + "
" + ], + "text/plain": [ + " EGID GKODE GKODN GSTAT GKAT GKLAS GGDENR GDEKT \\\n", + "0 1600000 2679684.326 1237449.553 1004.0 1020.0 1122.0 1 ZH \n", + "1 1600001 2679702.150 1237493.958 1004.0 1030.0 1110.0 1 ZH \n", + "2 1600002 2679713.052 1237475.814 1004.0 1030.0 1121.0 1 ZH \n", + "3 1600003 2679655.455 1237516.450 1004.0 1020.0 1122.0 1 ZH \n", + "4 1600005 2679749.269 1237529.346 1004.0 1020.0 1110.0 1 ZH \n", + "\n", + " N_DWELL \n", + "0 3.0 \n", + "1 1.0 \n", + "2 2.0 \n", + "3 3.0 \n", + "4 1.0 " + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GWR.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "# Extract only Canton GE for testing\n", + "# GWR = GWR[GWR.GDEKT == 'GE']" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Load electricity demand" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "demand_fp = 'D:\\Demand' # '/work/hyenergy/output/demand'\n", + "residential_demand = xr.open_dataset(os.path.join(demand_fp, 'electricity_demand_residential.nc')) " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
<xarray.Dataset>\n",
+       "Dimensions:        (daytype: 2, timestamp: 288)\n",
+       "Coordinates:\n",
+       "  * timestamp      (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n",
+       "  * daytype        (daytype) object 'weekday' 'weekend'\n",
+       "Data variables:\n",
+       "    appart         (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n",
+       "    maison         (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n",
+       "    communal_GVA   (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n",
+       "    communal_rest  (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n",
+       "    weight         (timestamp, daytype) float64 0.0001138 ... 0.0001427\n",
+       "    GVA_annual     float64 2.12e+06\n",
+       "    rest_annual    float64 7e+05
" + ], + "text/plain": [ + "\n", + "Dimensions: (daytype: 2, timestamp: 288)\n", + "Coordinates:\n", + " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n", + " * daytype (daytype) object 'weekday' 'weekend'\n", + "Data variables:\n", + " appart (timestamp, daytype) float64 ...\n", + " maison (timestamp, daytype) float64 ...\n", + " communal_GVA (timestamp, daytype) float64 ...\n", + " communal_rest (timestamp, daytype) float64 ...\n", + " weight (timestamp, daytype) float64 ...\n", + " GVA_annual float64 ...\n", + " rest_annual float64 ..." + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "residential_demand" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Perform DBSCAN" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "EPS = 250\n", + "MIN_SAMPLES = 10\n", + "\n", + "model = DBSCAN(eps = EPS, min_samples = MIN_SAMPLES, n_jobs = -1)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 13.52s\n" + ] + } + ], + "source": [ + "tt = time.time()\n", + "GWR['clusterID'] = model.fit_predict( GWR[coords] )\n", + "print('Fit and predict in %.2fs' %(time.time()-tt))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
');\n", + " var titletext = $(\n", + " '
');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
');\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('
');\n", + " var button = $('');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " // select the cell after this one\n", + " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", + " IPython.notebook.select(index + 1);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "(2476822.8, 2835339.2, 1065207.09325, 1300947.6697500001)" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GWR_plot = GWR_large_clusters.sample(200000)\n", + "cmap = categorical_cmap( GWR_plot, 'clusterID', cmap = 'tab10', N = 10 )\n", + "\n", + "plt.figure()\n", + "plt.scatter(GWR_plot[coords[0]], GWR_plot[coords[1]], c = GWR_plot['clusterID'], s = 2, cmap = cmap)\n", + "plt.colorbar()\n", + "plt.axis('equal')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Perform kmeans on the remaining clusters" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5 4748.771876183521\n", + "Fit and predict in 0.07s\n" + ] + } + ], + "source": [ + "for cID, d in large_clusters.iterrows():\n", + " if cID == -1: continue\n", + " print(cID, d.peak_demand_kW)\n", + " \n", + " GWR_sel = GWR[GWR.clusterID == cID].copy()\n", + " N_clust = int(d.peak_demand_kW / 1e3)\n", + " \n", + " model = KMeans(n_clusters = N_clust)\n", + "\n", + " tt = time.time()\n", + " GWR_sel['clusterID'] = model.fit_predict( GWR_sel[coords] )\n", + " print('Fit and predict in %.2fs' %(time.time()-tt))\n", + " \n", + " clusterDemand,_ = get_cluster_demand(GWR_sel, residential_demand, 'clusterID')\n", + " cluster_peaks = clusterDemand.max(dim = ['timestamp', 'daytype']).rename('peak_demand_kW').to_dataframe()\n", + " \n", + " # Add new cluster IDs (to replace old)\n", + " # Remove old cluster peak and append new ones\n", + " \n", + " break" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
EGIDGKODEGKODNGSTATGKATGKLASGGDENRGDEKTN_DWELLclusterID
55212676465.1401235849.1031004.01040.0NaN2ZH2.00
55332676529.5611236015.7491004.01020.01110.02ZH1.00
55442676510.9971235979.4191004.01020.01110.02ZH1.00
55552676506.5291236015.5951004.01020.01110.02ZH1.00
55662676485.8381235978.3001004.01020.01110.02ZH1.00
.................................
54742102141162676139.1211239049.5171004.01020.01122.05ZH6.01
54752102143812676060.7051239030.2261004.01020.01122.05ZH3.01
54762102165582676283.8881238813.4121004.01020.01122.05ZH15.03
54772102165592676292.7511238841.5941004.01020.01122.05ZH14.03
54782102225862676279.4421238779.2941004.01020.01122.05ZH12.03
\n", + "

2435 rows × 10 columns

\n", + "
" + ], + "text/plain": [ + " EGID GKODE GKODN GSTAT GKAT GKLAS GGDENR \\\n", + "552 1 2676465.140 1235849.103 1004.0 1040.0 NaN 2 \n", + "553 3 2676529.561 1236015.749 1004.0 1020.0 1110.0 2 \n", + "554 4 2676510.997 1235979.419 1004.0 1020.0 1110.0 2 \n", + "555 5 2676506.529 1236015.595 1004.0 1020.0 1110.0 2 \n", + "556 6 2676485.838 1235978.300 1004.0 1020.0 1110.0 2 \n", + "... ... ... ... ... ... ... ... \n", + "5474 210214116 2676139.121 1239049.517 1004.0 1020.0 1122.0 5 \n", + "5475 210214381 2676060.705 1239030.226 1004.0 1020.0 1122.0 5 \n", + "5476 210216558 2676283.888 1238813.412 1004.0 1020.0 1122.0 5 \n", + "5477 210216559 2676292.751 1238841.594 1004.0 1020.0 1122.0 5 \n", + "5478 210222586 2676279.442 1238779.294 1004.0 1020.0 1122.0 5 \n", + "\n", + " GDEKT N_DWELL clusterID \n", + "552 ZH 2.0 0 \n", + "553 ZH 1.0 0 \n", + "554 ZH 1.0 0 \n", + "555 ZH 1.0 0 \n", + "556 ZH 1.0 0 \n", + "... ... ... ... \n", + "5474 ZH 6.0 1 \n", + "5475 ZH 3.0 1 \n", + "5476 ZH 15.0 3 \n", + "5477 ZH 14.0 3 \n", + "5478 ZH 12.0 3 \n", + "\n", + "[2435 rows x 10 columns]" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GWR_sel" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
');\n", + " var titletext = $(\n", + " '
');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
');\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('
    • clusterID
      (clusterID)
      int64
      0 1 2 3
      array([0, 1, 2, 3], dtype=int64)
  • " + ], + "text/plain": [ + "\n", + "array([1769822.84647892, 727945.94246801, 1674470.3887543 ,\n", + " 576532.69848229])\n", + "Coordinates:\n", + " * clusterID (clusterID) int64 0 1 2 3" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "clusterDemand.max(dim = ['timestamp', 'daytype'])" + ] + }, + { + "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.8.3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/clustering/.ipynb_checkpoints/preprocess_new_GWR-checkpoint.ipynb b/clustering/.ipynb_checkpoints/preprocess_new_GWR-checkpoint.ipynb new file mode 100644 index 0000000..7fec515 --- /dev/null +++ b/clustering/.ipynb_checkpoints/preprocess_new_GWR-checkpoint.ipynb @@ -0,0 +1,6 @@ +{ + "cells": [], + "metadata": {}, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/clustering/cluster_GWR.ipynb b/clustering/cluster_GWR.ipynb new file mode 100644 index 0000000..f411dd2 --- /dev/null +++ b/clustering/cluster_GWR.ipynb @@ -0,0 +1,12673 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import xarray as xr\n", + "\n", + "from sklearn.cluster import DBSCAN\n", + "from sklearn.cluster import KMeans\n", + "\n", + "import os\n", + "import time\n", + "import calendar\n", + "\n", + "%matplotlib notebook\n", + "import matplotlib.pyplot as plt\n", + "import matplotlib" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "def categorical_cmap(df, column, cmap = 'tab20', N = 20):\n", + " # Get colormap data\n", + " c = matplotlib.cm.get_cmap( cmap )(np.linspace(0., 1, N))\n", + " \n", + " # Get length of series, number of total copies and remainder\n", + " l = len(df[ column ].unique())\n", + " n = int(np.floor(l / N))\n", + " r = l % N\n", + " \n", + " # Concatenate colormap\n", + " clist = [c]*n\n", + " clist.append( c[:r,:] )\n", + " colors = np.vstack(clist)\n", + " \n", + " # return colormap\n", + " return matplotlib.colors.LinearSegmentedColormap.from_list('%s_concat' %cmap, colors)\n" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "def get_cluster_demand(BLD_df, demand, grouping_col, uniqueID_col = 'EGID',\n", + " dwell_nb = 'N_DWELL', canton_id = 'GDEKT', \n", + " SFH_demand = 'maison', MFH_demand = 'appart', \n", + " communal_demand = 'communal_rest', communal_demand_GE = 'communal_GVA'):\n", + "\n", + " SFH = BLD_df[BLD_df[dwell_nb] == 1]\n", + " MFH = BLD_df[BLD_df[dwell_nb] > 1]\n", + " \n", + " building_counts = xr.Dataset({ 'N_SFH' : SFH.groupby( grouping_col )[ uniqueID_col ].count(),\n", + " 'N_DWELL' : MFH.groupby( grouping_col )[ dwell_nb ].sum(),\n", + " 'N_MFH' : MFH[MFH.GDEKT != 'GE'].groupby( grouping_col )[ uniqueID_col ].count(),\n", + " 'N_MFH_GE': MFH[MFH.GDEKT == 'GE'].groupby( grouping_col )[ uniqueID_col ].count() }\n", + " ).fillna(0)\n", + "\n", + " cluster_demand = ( building_counts['N_SFH'] * demand[SFH_demand] \n", + " + building_counts['N_DWELL'] * demand[MFH_demand]\n", + " + building_counts['N_MFH'] * demand[communal_demand] \n", + " + building_counts['N_MFH_GE']* demand[communal_demand_GE] )\n", + "\n", + " return [cluster_demand, building_counts]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Load data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Load GWR" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "GWR_fp = 'D:\\Building_data\\OFS\\Buildings\\GWR_MADD_Export_MADD-20200715-A3_20200722'\n", + "GWR = pd.read_csv(os.path.join(GWR_fp, 'GWR_GEB_w_N_WHG.csv'))" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "coords = ['GKODE', 'GKODN']\n", + "GWR = GWR.dropna(subset = coords) # can only cluster GWR entries with coordinate information" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    EGIDGKODEGKODNGSTATGKATGKLASGGDENRGDEKTN_DWELL
    016000002679684.3261237449.5531004.01020.01122.01ZH3.0
    116000012679702.1501237493.9581004.01030.01110.01ZH1.0
    216000022679713.0521237475.8141004.01030.01121.01ZH2.0
    316000032679655.4551237516.4501004.01020.01122.01ZH3.0
    416000052679749.2691237529.3461004.01020.01110.01ZH1.0
    \n", + "
    " + ], + "text/plain": [ + " EGID GKODE GKODN GSTAT GKAT GKLAS GGDENR GDEKT \\\n", + "0 1600000 2679684.326 1237449.553 1004.0 1020.0 1122.0 1 ZH \n", + "1 1600001 2679702.150 1237493.958 1004.0 1030.0 1110.0 1 ZH \n", + "2 1600002 2679713.052 1237475.814 1004.0 1030.0 1121.0 1 ZH \n", + "3 1600003 2679655.455 1237516.450 1004.0 1020.0 1122.0 1 ZH \n", + "4 1600005 2679749.269 1237529.346 1004.0 1020.0 1110.0 1 ZH \n", + "\n", + " N_DWELL \n", + "0 3.0 \n", + "1 1.0 \n", + "2 2.0 \n", + "3 3.0 \n", + "4 1.0 " + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GWR.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "# Extract only Canton GE for testing\n", + "# GWR = GWR[GWR.GDEKT == 'GE']" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Load electricity demand" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "demand_fp = 'D:\\Demand' # '/work/hyenergy/output/demand'\n", + "residential_demand = xr.open_dataset(os.path.join(demand_fp, 'electricity_demand_residential.nc')) " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
    +       "Dimensions:        (daytype: 2, timestamp: 288)\n",
    +       "Coordinates:\n",
    +       "  * timestamp      (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n",
    +       "  * daytype        (daytype) object 'weekday' 'weekend'\n",
    +       "Data variables:\n",
    +       "    appart         (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n",
    +       "    maison         (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n",
    +       "    communal_GVA   (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n",
    +       "    communal_rest  (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n",
    +       "    weight         (timestamp, daytype) float64 0.0001138 ... 0.0001427\n",
    +       "    GVA_annual     float64 2.12e+06\n",
    +       "    rest_annual    float64 7e+05
    " + ], + "text/plain": [ + "\n", + "Dimensions: (daytype: 2, timestamp: 288)\n", + "Coordinates:\n", + " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n", + " * daytype (daytype) object 'weekday' 'weekend'\n", + "Data variables:\n", + " appart (timestamp, daytype) float64 ...\n", + " maison (timestamp, daytype) float64 ...\n", + " communal_GVA (timestamp, daytype) float64 ...\n", + " communal_rest (timestamp, daytype) float64 ...\n", + " weight (timestamp, daytype) float64 ...\n", + " GVA_annual float64 ...\n", + " rest_annual float64 ..." + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "residential_demand" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Perform DBSCAN" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [], + "source": [ + "EPS = 250\n", + "MIN_SAMPLES = 10\n", + "\n", + "model = DBSCAN(eps = EPS, min_samples = MIN_SAMPLES, n_jobs = -1)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 15.19s\n" + ] + } + ], + "source": [ + "tt = time.time()\n", + "GWR['clusterID'] = model.fit_predict( GWR[coords] )\n", + "print('Fit and predict in %.2fs' %(time.time()-tt))" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
    ');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
    ');\n", + " var titletext = $(\n", + " '
    ');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
    ');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
    ');\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('
    ');\n", + " var button = $('');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " // select the cell after this one\n", + " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", + " IPython.notebook.select(index + 1);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "(2476823.95, 2835315.05, 1065207.09325, 1300947.6697500001)" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "GWR_plot = GWR_large_clusters.sample(200000)\n", + "cmap = categorical_cmap( GWR_plot, 'clusterID', cmap = 'tab10', N = 10 )\n", + "\n", + "plt.figure()\n", + "plt.scatter(GWR_plot[coords[0]], GWR_plot[coords[1]], c = GWR_plot['clusterID'], s = 2, cmap = cmap)\n", + "plt.colorbar()\n", + "plt.axis('equal')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Perform kmeans on the remaining clusters" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "GWR_dbscan = GWR.copy()\n", + "peak_demand_dbscan = peak_demand.copy()" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [], + "source": [ + "GWR = GWR_dbscan.copy()\n", + "peak_demand = peak_demand_dbscan.copy()" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5 4748.771876183521\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7 3142.7866865421934\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8 1052.6945918788936\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "27 1461.7578438475377\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "28 1973.6873006075984\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "53 19045.901336680265\n", + "Fit and predict in 0.42s\n", + "Number of clusters: 20\n", + "Number of clusters with peak demand > 1MW: 11\n", + "54 1260.2153033928041\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "74 8771.04338957972\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 4\n", + "75 274809.9639263198\n", + "Fit and predict in 45.53s\n", + "Number of clusters: 275\n", + "Number of clusters with peak demand > 1MW: 109\n", + "76 3371.492828386601\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "81 1673.8457497431873\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "83 4560.498050015758\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "86 1381.6941802879114\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "100 1529.7096532265289\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "108 2009.8140279070558\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "109 5489.541329984773\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "110 1254.2167024615835\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "113 3134.449203203304\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "118 3604.771704347395\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "119 2935.382938427621\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "122 1550.4228698305792\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "123 1376.9202783239434\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "128 2418.0720920091253\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "143 1422.8774877606388\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "146 1711.33518766883\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "151 8780.44462405959\n", + "Fit and predict in 0.18s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 5\n", + "154 6605.561533793985\n", + "Fit and predict in 0.12s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 4\n", + "164 1701.8838848702367\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "166 9332.012200543095\n", + "Fit and predict in 0.20s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 4\n", + "167 1147.3422412276361\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "171 2143.1147364126573\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "174 2936.3451563331487\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "184 3034.1824784991095\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "198 13376.316738818705\n", + "Fit and predict in 0.26s\n", + "Number of clusters: 14\n", + "Number of clusters with peak demand > 1MW: 6\n", + "215 1935.8330079883397\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "217 1010.5669010007416\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "225 3697.379288550638\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "230 3446.5634485123264\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "247 1995.984242908293\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "255 2218.2639016930248\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "258 4516.175595040673\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "259 2363.8787447737054\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "264 1220.1116806750472\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "268 6019.287836509292\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "269 9668.78027048671\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 6\n", + "288 1307.3535992165357\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "295 39159.02645775045\n", + "Fit and predict in 1.32s\n", + "Number of clusters: 40\n", + "Number of clusters with peak demand > 1MW: 22\n", + "301 1015.9634988141743\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "314 2154.0456507036556\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "322 2168.8032244836245\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "335 1665.6397746856176\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "339 3719.221690233578\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "362 1497.2308842043726\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "363 2879.7914687262896\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "379 1440.8270854517207\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "407 1243.583834010653\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "412 1941.8124254605532\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "416 1045.769115224811\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "427 4509.955382920604\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "431 1036.880588462829\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "456 1066.0238387630502\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "469 1897.9216295070605\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "481 6676.140237690797\n", + "Fit and predict in 0.14s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "501 4183.922351883715\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "513 87353.38407767846\n", + "Fit and predict in 5.37s\n", + "Number of clusters: 88\n", + "Number of clusters with peak demand > 1MW: 36\n", + "525 1715.2732518937626\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "527 1276.6111127790807\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "544 1337.0791927598148\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "562 2032.1407120382937\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "566 33782.537983539296\n", + "Fit and predict in 0.91s\n", + "Number of clusters: 34\n", + "Number of clusters with peak demand > 1MW: 14\n", + "571 1337.6027972203601\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "575 10583.264445084806\n", + "Fit and predict in 0.23s\n", + "Number of clusters: 11\n", + "Number of clusters with peak demand > 1MW: 5\n", + "580 1636.4224115309028\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "585 3909.285642282258\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "588 7116.906660544949\n", + "Fit and predict in 0.18s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 2\n", + "592 1545.163295357455\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "643 2261.0657950261198\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "650 1714.6335103743013\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "662 1337.9177523618155\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "668 1200.9071544680726\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "673 2732.613555517469\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "679 1041.672230833827\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "683 2009.7286038405093\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "687 2149.989872597592\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "688 1223.5961847348447\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "690 3098.0319597611847\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "694 9907.049571066722\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 5\n", + "699 2620.4781990710153\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "701 5267.158746490499\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "705 2664.6038804974964\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "717 1023.5567143186905\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "730 1061.9450539945883\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "731 1790.248114691075\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "742 3425.5270872443257\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "747 8516.19157329346\n", + "Fit and predict in 0.12s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 5\n", + "770 1164.918876404102\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "793 1814.76126297332\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "794 1854.3686511228084\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "822 4117.74403919662\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "847 2186.676916343537\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "858 1456.4878259403215\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "871 2169.1322845240093\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "884 3520.9000305857426\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "885 2050.7923576543217\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "894 3223.463824745426\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "902 1077.6627681614054\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "910 1308.1557513809726\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "917 1448.5686467150333\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "919 2999.834214614965\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "930 1278.0648284043496\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "974 30335.32396742674\n", + "Fit and predict in 0.94s\n", + "Number of clusters: 31\n", + "Number of clusters with peak demand > 1MW: 11\n", + "1001 2037.2202695767942\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1019 1956.1626428491154\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1049 3734.864084319176\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1050 1291.6486178825842\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1079 1410.4258709334695\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1096 3458.8048997197297\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1141 1285.0190909683038\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1152 2982.2397934155006\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1233 1334.0842376548906\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1246 1691.0524011772754\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1290 3582.1666745147754\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1292 3942.6050166139325\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1294 1566.490453969689\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1312 1059.0310929188481\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1332 1054.5220884931957\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1335 1725.614737262068\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1356 1008.0522969916383\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1357 67225.92571188066\n", + "Fit and predict in 3.30s\n", + "Number of clusters: 68\n", + "Number of clusters with peak demand > 1MW: 28\n", + "1361 1525.2514355505823\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1367 2619.9028837396945\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1377 1866.407179603061\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1393 2999.3349350537655\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1395 1995.8265851909966\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1397 1876.5226544671132\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1412 1757.044777374882\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1413 1343.2207225186348\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1418 1672.7662453083576\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1422 5786.28069413639\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1430 1199.343819217513\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1431 1263.6857794899474\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1432 1642.3666958509687\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1434 1133.2953613044554\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1436 8982.01189951276\n", + "Fit and predict in 0.19s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 6\n", + "1439 1489.769707573159\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1448 1022.4551104253815\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1456 2562.6204767402223\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1460 1310.3040784888556\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1479 1739.2942496591843\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1488 10071.190272123687\n", + "Fit and predict in 0.19s\n", + "Number of clusters: 11\n", + "Number of clusters with peak demand > 1MW: 4\n", + "1492 2137.9419983360985\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1497 7362.354472872383\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 4\n", + "1507 1274.3207347503503\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1565 4252.525406705938\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1592 11869.923295826098\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 12\n", + "Number of clusters with peak demand > 1MW: 5\n", + "1606 1256.5034305790557\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1618 3720.604435777931\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1619 1208.9282109031526\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1623 2877.6702329190407\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1644 4783.482242523502\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1652 1065.550746638998\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1659 1535.4884920374795\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1665 3004.9967896210064\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1675 1336.8930229590685\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1676 2220.4818758796555\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1688 1477.6555547029564\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1698 1258.849725244252\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1700 3160.3106037080265\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1714 4849.157943013679\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1726 3159.11346389684\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1732 2163.5603336154268\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1749 1681.3783103379226\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1761 4852.673159131912\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1768 16708.2706953417\n", + "Fit and predict in 0.27s\n", + "Number of clusters: 17\n", + "Number of clusters with peak demand > 1MW: 9\n", + "1770 4379.805620511925\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1773 4730.376159044\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1777 1281.0738545854615\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1781 1009.0678631960714\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1797 2593.9680586762966\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1805 2882.6178276825162\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1850 1060.2004069192635\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1856 2296.722325009481\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1866 1033.10105199594\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1868 1981.025098460862\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1940 9923.516096223011\n", + "Fit and predict in 0.18s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 4\n", + "1975 1087.7862167406347\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1984 2176.6394378077016\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1991 19996.760397677263\n", + "Fit and predict in 0.29s\n", + "Number of clusters: 20\n", + "Number of clusters with peak demand > 1MW: 9\n", + "1995 2636.8332630522996\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2029 1797.2050168181497\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2041 2044.1167075901626\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2054 1853.691082460613\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2064 1486.6115495567844\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2065 2376.1199424122683\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2072 1056.0554469259578\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2094 1435.8392206213314\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2113 1975.2911516279075\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2137 1312.9783495975985\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2138 1194.6016416716984\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2141 1321.6161115925734\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2144 2288.336950566839\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2156 1355.0705568121127\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2175 1422.9214680091427\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2177 120250.5776475023\n", + "Fit and predict in 11.92s\n", + "Number of clusters: 121\n", + "Number of clusters with peak demand > 1MW: 42\n", + "2193 1396.4023286686565\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2195 5333.557365347509\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2196 27495.699827882727\n", + "Fit and predict in 0.79s\n", + "Number of clusters: 28\n", + "Number of clusters with peak demand > 1MW: 12\n", + "2200 24780.29797674983\n", + "Fit and predict in 0.64s\n", + "Number of clusters: 25\n", + "Number of clusters with peak demand > 1MW: 13\n", + "2204 15218.511504606604\n", + "Fit and predict in 0.33s\n", + "Number of clusters: 16\n", + "Number of clusters with peak demand > 1MW: 7\n", + "2209 1326.8810996564637\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2210 1165.7339751971424\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2222 1249.1556045990947\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2231 3830.7125427024507\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2241 1188.723848678434\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2244 2783.725060020654\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2245 6324.884192268525\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2249 1292.9313242229978\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2250 1998.704332618536\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2253 3164.6689171238536\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2264 2809.2438815756614\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2265 1605.3046556761167\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2266 11084.21655950847\n", + "Fit and predict in 0.21s\n", + "Number of clusters: 12\n", + "Number of clusters with peak demand > 1MW: 5\n", + "2270 4887.009264128355\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2275 3346.4531382131754\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2291 3874.1053542245336\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2309 1351.5753594369587\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2325 1688.1201054917594\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2329 1676.745957269486\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2344 2706.0676460906707\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2349 5685.7201403246045\n", + "Fit and predict in 0.12s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2364 31004.094055496556\n", + "Fit and predict in 0.65s\n", + "Number of clusters: 32\n", + "Number of clusters with peak demand > 1MW: 15\n", + "2376 3024.1731953579747\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2380 1087.0108346625111\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2386 1877.7803242655557\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2393 24209.096986850393\n", + "Fit and predict in 0.66s\n", + "Number of clusters: 25\n", + "Number of clusters with peak demand > 1MW: 12\n", + "2405 3401.4464144349517\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2444 1808.9082543779753\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2445 1108.9194946965788\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2455 12097.996864956964\n", + "Fit and predict in 0.21s\n", + "Number of clusters: 13\n", + "Number of clusters with peak demand > 1MW: 6\n", + "2461 7212.890790555987\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 5\n", + "2464 2140.199527499092\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2465 1976.1794518930924\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2479 2293.279733808299\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2482 7342.139444606337\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 4\n", + "2485 1231.3868408922663\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2495 1569.5742604567408\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2499 1179.9084594306903\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2505 2287.4792714637383\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2509 2151.5670239307105\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2521 4929.479850549034\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2549 1649.9145415369767\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2565 4964.542842786664\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2567 1142.6784553110572\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2568 1211.914145619587\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2589 1705.2803686535494\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2596 1820.3286105524062\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2603 1990.3539347018518\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2626 4655.3714368803285\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2639 1286.5776569723841\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2651 2369.830694572995\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2658 9737.765229264185\n", + "Fit and predict in 0.20s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2688 3326.8190589624583\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2692 5506.068703157482\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2716 1649.803643938695\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2717 5948.298488278947\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2721 1153.4683501133657\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2724 1029.8444599133004\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2726 5283.740152067942\n", + "Fit and predict in 0.14s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2736 3545.2478635374728\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2763 1354.8607718390017\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2794 1404.310892352861\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2803 2384.6363907563946\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2861 1246.6213091553068\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2920 1151.8957237486788\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2925 2715.7626401170064\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2929 3316.485416053085\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2956 1622.9835495470286\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2969 1575.064344541751\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2970 3804.095550268871\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2973 1403.6273979457928\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2976 1746.1633631565962\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2989 1018.5501894857741\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3013 1624.335015768645\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3061 6656.128575187964\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 4\n", + "3085 3128.1965189369307\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3106 13178.733328688022\n", + "Fit and predict in 0.22s\n", + "Number of clusters: 14\n", + "Number of clusters with peak demand > 1MW: 6\n", + "3119 2587.2316562688525\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3140 1052.290564184423\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3146 2697.8343989214713\n", + "Fit and predict in 0.06s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3149 1041.2713042241887\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3152 1314.643794782417\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3184 1139.4077504634843\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3227 2704.99559584176\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3232 3625.3481204580207\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3235 34849.85090056069\n", + "Fit and predict in 0.92s\n", + "Number of clusters: 35\n", + "Number of clusters with peak demand > 1MW: 16\n", + "3237 1030.1660928021465\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3239 1878.5448527145575\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3241 8564.046972151022\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 4\n", + "3243 1378.923979145413\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3245 6055.659859731086\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3248 2483.467821163019\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3249 3816.8265531847874\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3253 1755.4509257708933\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3260 3253.2102014258794\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3262 1272.260223066864\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3271 1046.9028551560918\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3276 7846.374098306457\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 5\n", + "3279 2216.877898437649\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3305 1520.7742426081481\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3310 2034.1958611105526\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3318 3171.1470042225124\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3329 1459.2911652557816\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3344 3427.1858233614466\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3347 9025.348458876835\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 4\n", + "3348 2433.430159634213\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3349 1053.2545843574187\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3350 1954.473121808218\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3353 1841.5587451656093\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3368 1363.6165782202224\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3376 1039.9023553428115\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3383 2794.2952625150238\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3398 1424.3979668631355\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3399 3712.434993810952\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3400 1303.9498680150346\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3402 4588.901442752241\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3412 3184.5343756800607\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3433 3797.6347459943127\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3456 1914.3154763121024\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3470 5430.387466380077\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3476 4903.631516483076\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3491 2326.7503327350696\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3497 1128.9366674816201\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3510 2214.073735882551\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3520 1441.5292905896476\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3530 1133.0451115411329\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3533 8779.801800036881\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 3\n", + "3566 8783.710403872488\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 5\n", + "3567 1220.3559063260584\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3569 1746.153613621541\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3669 1070.8177891144082\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3681 1580.3506992299795\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3696 4009.1790198863996\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3705 1165.6445448534234\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3719 1012.1660661520623\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3727 14674.020713827415\n", + "Fit and predict in 0.30s\n", + "Number of clusters: 15\n", + "Number of clusters with peak demand > 1MW: 6\n", + "3733 27854.62053682688\n", + "Fit and predict in 0.59s\n", + "Number of clusters: 28\n", + "Number of clusters with peak demand > 1MW: 11\n", + "3734 2465.80877343734\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3736 1204.8313867825002\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3762 1451.5670398511206\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3771 1268.1852972401773\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3897 2619.8757761202605\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3919 2079.7070344763006\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3936 2029.6425073433209\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3981 8340.927858951947\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 3\n", + "3988 1242.7566021907112\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3989 1043.933762095563\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3990 47846.41210905342\n", + "Fit and predict in 1.73s\n", + "Number of clusters: 48\n", + "Number of clusters with peak demand > 1MW: 15\n", + "3996 1494.0444936301246\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4038 1308.9273463412321\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4050 17446.075265942167\n", + "Fit and predict in 0.30s\n", + "Number of clusters: 18\n", + "Number of clusters with peak demand > 1MW: 7\n", + "4055 1014.073754400283\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4056 1535.0133719494977\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4123 1000.6176216367428\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4179 3811.8625731747557\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4189 3833.3375730064763\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4191 2622.7803497260143\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4192 1900.1463287330453\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4206 1803.768201165814\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4211 2004.9313202666426\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4214 1086.4840651592265\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4215 3006.225442209898\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4238 1530.7477398000528\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4254 1386.3295426108944\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4273 1379.8613701262775\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4275 1236.587543063847\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4290 1269.3847720661058\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4295 1478.6318507126784\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4312 1614.042198780618\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4322 1542.299558388629\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4323 1786.500079795455\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4329 1338.6329509294549\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4359 10977.05456242482\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 11\n", + "Number of clusters with peak demand > 1MW: 5\n", + "4368 1707.700018316296\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4377 102158.97780571324\n", + "Fit and predict in 5.51s\n", + "Number of clusters: 103\n", + "Number of clusters with peak demand > 1MW: 40\n", + "4382 1242.5789332491972\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4402 3043.55766274844\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4403 2856.4212348760116\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4431 1194.6810230443468\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4434 1840.722760929175\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4457 1069.54563519517\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4463 154059.1768009612\n", + "Fit and predict in 12.17s\n", + "Number of clusters: 155\n", + "Number of clusters with peak demand > 1MW: 47\n", + "4467 3931.6481969137985\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4473 8630.149455440807\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 3\n", + "4483 1041.8576320620487\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4500 1439.2750994143837\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4509 2342.0330740773697\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4516 1312.675071324903\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4553 4171.738599322665\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4575 1527.8062924698022\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4592 3286.865305092533\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4599 1757.1516018885072\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4610 28856.614324365255\n", + "Fit and predict in 0.67s\n", + "Number of clusters: 29\n", + "Number of clusters with peak demand > 1MW: 10\n", + "4650 1140.6504634129824\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4653 8572.302633551806\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 3\n", + "4656 3262.4953361059434\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4687 20151.46432716808\n", + "Fit and predict in 0.39s\n", + "Number of clusters: 21\n", + "Number of clusters with peak demand > 1MW: 8\n", + "4688 1108.9041586257676\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4692 1849.331271565343\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4699 1866.3027140493343\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4703 1028.16591481412\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4705 4995.292186944506\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4707 1023.05979371739\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4715 4751.148989487739\n", + "Fit and predict in 0.12s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "4789 2924.9188932466377\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4790 1428.222635898493\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4822 2953.867033634329\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4847 1788.2296336532265\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4865 2203.1645925564967\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4879 1156.5860377363101\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4892 3237.4196357116166\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4904 6751.819422068262\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 4\n", + "4916 1261.6713399768016\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4917 2195.541572939526\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4924 1395.9538767079107\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4925 1032.0853392941074\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4933 9485.406403810299\n", + "Fit and predict in 0.21s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 3\n", + "4937 1784.025227162006\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4940 1359.9647846950957\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4951 1323.2162895944655\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4965 1871.7663069868172\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5010 1074.940758983462\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5020 18243.103693296373\n", + "Fit and predict in 0.31s\n", + "Number of clusters: 19\n", + "Number of clusters with peak demand > 1MW: 6\n", + "5021 1024.6408369770274\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5024 1026.4775075052253\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5025 1356.2071558129655\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5039 1028.3408016223368\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5062 1349.5853820297655\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5071 2181.545271573531\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5077 1759.4489529222135\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5103 4599.710613190985\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "5110 26250.30068908244\n", + "Fit and predict in 0.51s\n", + "Number of clusters: 27\n", + "Number of clusters with peak demand > 1MW: 11\n", + "5122 1234.2068266494807\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5128 1581.3587788505406\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5134 13320.309866684463\n", + "Fit and predict in 0.33s\n", + "Number of clusters: 14\n", + "Number of clusters with peak demand > 1MW: 7\n", + "5157 3769.8274148987366\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "5163 1199.73223642796\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5179 2065.1839173927033\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5208 1048.5789657838873\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5210 1597.9103834163127\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5277 1160.2798410627022\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5280 6204.2125126223345\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 3\n", + "5298 1278.9976707228316\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5355 3352.9165975432156\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "\n", + "Number of remaining large clusters: 949\n", + "\n", + "5390 1569.8166097535857\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5401 1156.3486765940456\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5403 1249.2189221791552\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5404 1300.2077569486444\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5406 1362.3096726334893\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5407 1190.9237964912425\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5408 1117.1622355692066\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5409 1413.2149509865963\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5410 1302.9079354781031\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5412 1418.8491728019264\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5413 1184.1652436457814\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5416 1012.701442161231\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5417 1788.5193632285684\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5424 1052.2050034980614\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5426 1266.1163227945663\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5427 1409.5167167848447\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5432 1425.6945634687427\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5433 1555.9161282491218\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5435 1313.032491000977\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5439 1099.4388802688472\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5443 1445.333348594823\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5444 2904.340842797106\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "5445 1030.3969241192083\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5447 1493.8688898157122\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5448 2265.975440681409\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5453 1378.4700533235698\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5454 1700.4193911273321\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5458 1307.9722062493354\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5459 1019.5348406953267\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5460 1047.3067901822785\n", + "Fit and predict in 0.01s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5467 1580.4914448922475\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5469 1188.8466874298974\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5470 2032.7695613406722\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5474 1005.3481654273315\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5475 1701.0223746977397\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5480 1982.6247614590698\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5483 1249.0024270607014\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5484 1030.0552197358127\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5486 1560.9438213914407\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5487 1321.6337269333676\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5489 1251.4680079996067\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5490 1296.424511724954\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5496 2949.8212778005386\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5497 1905.2390930061417\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5503 1222.2709884898677\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5504 2046.9091530125445\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5506 1731.8912305861052\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5508 2498.164434155977\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5512 1566.6870069341956\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5515 1619.6804705734457\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5517 1551.7905666957022\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5518 1490.273672165349\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5520 1265.9355505054327\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5522 1489.5363023153197\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5531 1857.285700891804\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5535 1724.8393743523216\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5536 2514.8916008474157\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5541 2249.7033197338246\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5543 1494.1416785297124\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5544 1098.4137054235405\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5545 1462.112385872453\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5546 1192.6593505161688\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5551 1191.517708693622\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5553 1283.782216447406\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5557 1540.153343208957\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5559 2023.193966609848\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5562 1152.9845114316317\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5565 2211.801016308149\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5568 1172.909479605662\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5575 1291.1492605471126\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5576 1674.9575009750051\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5580 1779.614326393441\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5585 2560.5751042374004\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5588 1148.7359128118128\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5590 1161.4709815331726\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5593 1026.7875505903771\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5594 1023.1839777401829\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5596 1672.866499732823\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5604 1854.0801144669715\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5606 3845.272171290205\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "5607 1716.4557311912356\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5608 1637.9009907531524\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5609 1223.0566012839904\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5611 1926.8893182684058\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5613 1295.7270225911816\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5614 1726.1977017422535\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5615 1240.8851884478142\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5617 2155.264871631382\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5618 1602.5497726096346\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5619 1621.5283646618395\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5621 1623.3414101400892\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5622 1236.8202944353998\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5624 1919.8085744168798\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5625 1200.6643000451268\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5632 1808.953630386493\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5633 1028.7536600943638\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5634 1135.631715147667\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5635 1085.9903225790335\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5641 2032.367218713439\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5643 1010.17111130587\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5644 1650.3597279206951\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5647 1385.9948636368022\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5649 1071.5007668417963\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5655 1110.7245154801126\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5659 1124.5302508307395\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5660 1105.3970646357543\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5661 1417.2308858867193\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5663 1281.6076063845155\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5665 3348.5008672578397\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "5668 1887.0935765660486\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5670 1933.015122605757\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5673 2189.043522842547\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5676 1087.2278383434336\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5677 1963.9397009940815\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5679 1020.8441951566011\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5683 1670.0090181759874\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5687 1298.4461425643867\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5688 1020.101193394496\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5689 1532.9349330976254\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5690 1037.3321243516098\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5694 1325.9951087964275\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5697 2065.3077644691657\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5698 1173.9166289151442\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5701 1350.2263899686382\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5702 1018.4528456972097\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5706 1161.6927299286265\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5709 1020.5291537880779\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5711 1048.0384742911158\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5717 1107.6865985804743\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5718 1044.8386347158048\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5730 1008.4443325533888\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5731 1093.9240763306152\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5734 1063.8251911923944\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5736 1106.230456349825\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5738 1265.4871480994368\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5739 1075.8871875096138\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5744 1157.3382880857996\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5745 1001.9471538260098\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5754 1056.4323267370373\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5756 1406.5057711360319\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5757 1202.4433826859881\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5761 1004.0087516087668\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5762 1183.8028141327568\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5764 1323.7910498977926\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5766 1191.7958864664395\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5768 1310.5868420872278\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5769 1256.380450442557\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5771 1089.8400906894801\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5774 1484.1925456631125\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5775 1569.2863813747654\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5778 2002.3833515501194\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5783 1250.004144197832\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5789 1503.6667710528343\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5791 1123.662493112257\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5793 1121.2961638760364\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5797 1090.7715215159399\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5802 1303.82909247503\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5803 1571.8313329707378\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5804 1112.883535903352\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5806 1035.621366278183\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5808 1295.409028060014\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5814 1105.2441902209507\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5817 1361.4020995814453\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5823 1337.61736245586\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5829 1452.9346389355956\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5833 1312.7172276235679\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5838 1461.9535096144996\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5840 1197.827777180385\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5845 1053.2506197689913\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5846 1122.3455449956698\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5847 1049.6106704543968\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5850 1096.4241582177524\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5851 1176.7138105992615\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5852 1212.024041082879\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5856 1215.8183633693652\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5859 1665.580701806352\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5860 1370.6823257968451\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5861 1034.4144378531257\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5862 1070.3782898966704\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5864 1185.3945228353712\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5865 1333.1132774616615\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5867 1396.6643916693477\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5868 1800.6253203747078\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5870 1063.498947108048\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5871 1616.4063355607143\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5875 1035.949929896469\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5877 1261.501971568004\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5878 1251.8721204963567\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5882 1178.8953722359647\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5883 1461.1001821876969\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5884 1476.1442680959417\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5885 1009.2862375182689\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5886 1547.2934464933319\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5890 1568.9691807860677\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5891 1525.914047363833\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5894 1112.919597103792\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5901 1141.050948267636\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5907 1361.8717545123325\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5912 1578.796972620294\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5919 1193.826082961009\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5923 1210.7698602951382\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5927 1299.6080116696755\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5932 1337.6604160808604\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5939 1175.3214586768213\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5940 1610.2694888213055\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5942 1241.4207951698706\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5946 1029.290638044486\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5947 1216.2328869022547\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5950 1816.8769128316032\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5951 1987.8292284793538\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5953 1755.18922626006\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5958 1066.7632875565473\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5960 1438.2840978617714\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5961 2389.4558022479114\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5964 1514.3790194516248\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5967 1801.0256271720075\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5968 1003.4828670402408\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5970 1146.521327939593\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5976 2279.7524571808553\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5978 2159.471320142545\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5979 1254.848471103865\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5981 1897.4435929287524\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5984 1192.3505854040081\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5986 1895.2463159993713\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5989 1227.1276875884857\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5997 1170.6729031844013\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5998 1261.993027532761\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6001 1468.6156698268474\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6004 1162.0201003762008\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6009 1004.877930110065\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6010 1683.3221373096492\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6011 2474.658183039163\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6015 2048.7057532135523\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6017 1286.445920731817\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6018 1770.9913609336447\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6020 1031.8640656383811\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6021 2245.782052135621\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6023 1379.472625260293\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6024 1289.4516238192114\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6025 1022.363285036237\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6030 1955.1361035525426\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6032 1358.8192529576097\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6035 1372.9740967360115\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6040 1116.061888804516\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6044 1216.755352021204\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6045 1670.3893275654348\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6051 1683.0283197556398\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6057 1478.4378644097364\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6058 3002.7649190751094\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6060 1577.5545842255492\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6063 1509.2714299329728\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6066 2561.323727782791\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6069 1561.9271760464162\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6070 1027.4284207358526\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6071 1002.1836593306839\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6072 2031.3243135898924\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6074 1061.4479860578906\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6075 1672.719721254242\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6079 1121.917553042133\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6081 1125.3405533429186\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6084 1293.9189229919766\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6085 1014.8813795878192\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6086 1490.2347842932886\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6090 1290.9291664969392\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6095 1584.8105842295747\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6096 1423.5704333443925\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6101 1219.6404663299497\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6105 1037.699057988694\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6108 1042.571904844182\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6115 1078.6715639501638\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6116 1350.3760362207938\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6122 1076.9341535774463\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6132 1453.6517031418193\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6133 1259.2816485502656\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6135 1446.6927699500309\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6137 1051.0660835384804\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6138 1273.3906737271675\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6144 1577.3807249222675\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6146 1929.4486787248945\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6147 1345.3090565649638\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6151 1647.8111619122012\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6162 1318.4904038004856\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6163 1136.3994010246106\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6166 1268.8819459775143\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6167 1093.603932708064\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6168 1406.8481415460844\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6169 1061.8985716292177\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6172 1378.8899459089023\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6176 1234.1246538527416\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6177 1354.8620900759497\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6180 1007.3981150517061\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6191 1061.1275764749223\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6192 1511.2837358355373\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6200 1123.3503015225126\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6201 1401.8990575163145\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6209 1288.0676572317673\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6210 1071.1625328875164\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6214 1522.0474547542785\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6217 1764.1391389940318\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6222 1596.8883397910042\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6223 1204.6776497020994\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6226 1624.707162418773\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6230 2180.238425419132\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6231 1875.4350915148268\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6232 1050.0785617057763\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6239 1205.1203139625763\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6243 1476.419671601467\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6244 1318.087512346827\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6248 1368.4246996912022\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6250 1003.3087741744939\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6253 1872.1421099894187\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6258 1004.4418165191632\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6259 1529.071305204295\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6264 1412.2874999897185\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6265 1388.0523460593665\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6270 1014.309226210013\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6271 1377.1768868831216\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6276 1081.9987835641703\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6277 1262.8021799877622\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6278 1096.5887711964365\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6285 1438.739388721671\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6290 1385.5402596479319\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6292 1412.152490796974\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6294 2304.097438929017\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6298 1538.9272299001045\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6299 1499.6792110295553\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6300 1410.810577124329\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6306 1016.0253409443058\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6307 1867.3934147587718\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6309 1610.677494082572\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6312 1922.1968543513933\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6313 1081.6708025950506\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6315 1881.740169584223\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6321 1709.6036864709786\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6323 1628.0816645306288\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6326 1027.9542297928926\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6329 1246.7154115516478\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6333 2017.093043026275\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6335 1599.4472768228873\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6338 1050.2601679501292\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6339 2256.21417030915\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6340 1077.950912952591\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6341 1254.4902504573147\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6345 1120.523620023112\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6346 2800.053026858438\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6347 1394.4616839924033\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6352 1190.8510835751915\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6353 1309.3659288130502\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6354 1612.2371600022893\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6357 1142.5354847947126\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6362 1252.5835119397566\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6365 1852.7985770165292\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6367 1114.9715431321415\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6369 1150.9634187030424\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6371 1160.3178347092107\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6379 1284.7935129282425\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6380 1242.3691761484656\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6382 1445.8953036545824\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6385 1066.5466946574459\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6392 1199.949543232473\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6393 1423.2954386091094\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6394 1398.2678180914695\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6395 1318.9190248571538\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6397 1083.2907869690725\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6398 1059.5352025836487\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6404 1212.016836778224\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6410 1520.6090506678731\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6413 1439.1000545551879\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6417 1079.969717120404\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6420 1385.4256087545268\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6421 1314.7823259706063\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6425 1566.8582238247795\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6426 1422.1130886522387\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6428 1123.0848134690261\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6432 1191.834260172813\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6438 1962.7295373783695\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6441 1457.2921280341395\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6445 1627.9844286515029\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6446 1069.106179090966\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6448 1449.1522341083414\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6450 1656.8661870466196\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6454 1133.7350408423335\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6455 1043.6160341116033\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6462 1658.0783047907703\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6463 1085.5613386192983\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6464 1443.4414843867164\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6466 1294.170574956528\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6470 1224.9135351804578\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6472 1028.6333248845553\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6473 1004.9148145501433\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6482 1099.9064900790074\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6485 1485.9428376288818\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6489 1069.5577890664442\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6490 1290.4375538397526\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6491 1312.1302453126304\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6495 1303.385339852495\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6501 1224.7597081854142\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6506 1922.1386429641427\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6509 1007.4208982804304\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6511 1232.155728392717\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6514 1023.5498883979049\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6515 1638.3712877655394\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6517 1562.1501685921203\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6518 1250.456501901462\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6521 1009.2463590647988\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6522 1164.7753655141278\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6523 1843.1546447399028\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6526 1148.4146822519924\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6527 1306.530419636878\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6529 1328.9821234221245\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6530 1300.6465622673459\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6533 1094.2890696556265\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6534 1206.3457319476045\n", + "Fit and predict in 0.03s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6539 1160.4303218568684\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6543 1010.8234678711743\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6544 1031.196395271427\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6548 1255.2885399924012\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6553 1287.323347361505\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6554 1744.510561476791\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6558 1637.7037323360303\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6561 1240.0625748513792\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6563 1995.6463386211299\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6569 2438.919397959217\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "6570 1665.1051830769193\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6572 1973.308664492161\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6575 1529.1397991250806\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6581 1424.0207005509756\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6583 1178.8770506045569\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6584 1461.0641641007908\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6587 1013.8525123045114\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6588 1119.258194830803\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6589 1130.3001517926937\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6592 1308.6186767469326\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6594 1080.0704141378524\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6597 1035.3616997477063\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6602 1097.967475216087\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6608 1399.1351002322265\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6620 1049.0055741177807\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6624 1229.9245632994362\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6627 1008.1885379430557\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6630 1027.0578997206285\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6634 2925.013549581768\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6635 2570.9003038042324\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6636 2579.5874472468995\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6639 1376.0529790263893\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6640 1828.440449139687\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6643 1293.558993333032\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6646 2408.5619146462022\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6650 1740.5906636818645\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6654 1609.8306325230656\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6658 1187.8254030863204\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6660 2160.669369073294\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6661 2432.1750342281734\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6662 1148.6345528684915\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6666 1063.040758590615\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6669 1461.389485740063\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6676 2371.538912528385\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6678 1048.1795763192986\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6679 1003.9851034516593\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6680 1059.1910730196614\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6683 2868.4353072006725\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "6686 1853.7655926277055\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6688 1156.040251277793\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6689 1333.235088121399\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6694 1015.4120719907858\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6695 1426.8133265447038\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6698 3424.477804731778\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6700 1101.5518507909082\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6704 2139.238433203152\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6707 1392.3838981888198\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6709 1383.776722946397\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6713 2216.7390139843296\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6716 1112.8527372707051\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6721 1644.6078919205245\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6725 1750.506465076994\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6726 1368.683983899028\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6732 1325.250873012863\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6734 1685.3137389269577\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6736 3536.4598008172647\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 3\n", + "6743 1661.7432103706294\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6747 1316.9320738613046\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6750 1251.9062723578872\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6752 1237.2043024528573\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6753 1285.7657905204214\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "6754 1283.1993567758752\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6755 1578.9129209062742\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6758 1136.3517964744417\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6760 1367.7482509510191\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6764 1507.6139669161266\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6767 1401.5384511151317\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6770 1109.9389212675758\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6775 1366.8281670749952\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6778 1046.6810233831468\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6779 1353.9271981111672\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6781 1183.505449213357\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6782 1157.1778918395942\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6785 1326.2120456698663\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6788 1381.4258052924738\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6792 1099.6020363791886\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6793 1222.3547646523486\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6794 1119.5812400496693\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6796 1249.1226968878145\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6797 1161.34585707051\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6800 1374.230048231267\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6801 1523.2973404484774\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6802 1652.2304238193994\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6804 1136.9547499096834\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6807 1042.8228800664951\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6808 1361.731020990435\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6812 1197.663702312545\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6813 1278.4761976100815\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6814 2089.561115215896\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6816 1316.657747164258\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6819 1161.7298665127564\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6825 1069.839338649732\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6827 1364.9482927368229\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6835 1097.6838875400786\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6836 1197.9901531646221\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6840 1403.0270060597513\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6846 1030.664963006313\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6850 1356.0458867723723\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6852 1146.4128245487398\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6857 1278.1770110036289\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6861 1378.774523342188\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6862 1030.7335625737508\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6863 1008.5517137594436\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6865 1019.4239884733654\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6868 1501.4203746973965\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6871 1049.6762945900289\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6873 1158.0271484445268\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6875 1067.719448951811\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6880 1504.7815157112527\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6884 1234.457158952296\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6885 1167.1910046253358\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6887 1449.7213095084742\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6891 1077.4372864772026\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6895 1561.4470168243151\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6896 1074.5689104404971\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6898 1120.8759027844192\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6903 1811.1387162814272\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6904 1146.1020165786383\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6905 1340.8085853964963\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6912 1364.1837262866502\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6913 1897.506646224391\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6915 1178.139545810708\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6917 1666.8174698426003\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6918 1243.797536867019\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6919 1733.5495993820823\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6921 1240.4483271287604\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6922 1122.5295462854488\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6924 1485.323407943235\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6927 1121.4313071746033\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6929 1173.977065994469\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6934 1198.8312033299098\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6936 1272.9052079857413\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6939 1606.729556094346\n", + "Fit and predict in 0.04s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6940 1463.738825398189\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6942 1610.2182366226652\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6947 1679.61165455676\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6948 2039.249786228341\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6949 1575.165417931489\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6950 1441.0708670849606\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6953 1091.0272938571115\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6955 1120.5851826276669\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6956 1015.1138328522095\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6957 1204.0470288542092\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6961 1292.7672530427324\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6964 1345.8199189018508\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6965 1029.2100649259141\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6971 1048.1344553044098\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6972 1957.629637032891\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "6974 1143.1833394987436\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6975 1075.7205279854143\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6978 1299.895828218533\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6981 1084.068364352898\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6982 1432.6648027602196\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6983 1221.248490131206\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6984 1260.7459146810666\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6986 1058.5024656429835\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6989 1046.6773317831437\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6993 1045.8540637136314\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "6998 1327.9289729282154\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7001 1431.5599397310991\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7002 1124.2873318630961\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7004 1000.0637566543943\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7008 1012.380474461044\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7014 1082.8872140079548\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7016 1264.5425657922856\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7019 1305.1734420438484\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7021 1497.9315685160502\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7024 1230.6169039648626\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7025 1024.6234650762822\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7026 1330.0362506810775\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7028 1110.3784543080544\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7034 1392.1425834249167\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7038 1156.0099893312015\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7040 1004.5246869025135\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7042 1674.3457922736932\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7049 1341.7395823339757\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7051 1112.4801826883333\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7052 1002.3400765853048\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7053 1483.4161313148336\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7060 1084.0156043063764\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7065 1120.9609030907754\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7066 1081.2137195964729\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7067 1419.874359200813\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7070 1230.0833302231626\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7072 1765.4277345029366\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7075 1224.3987879450597\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7083 1087.8596371208814\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7084 1277.5274402591967\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7086 1279.0875687782716\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7088 1083.2020110984313\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7091 1759.5189022865538\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7105 1092.631387730679\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7106 1356.849188993987\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7109 1102.9433501765425\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7114 1428.4324891038766\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7117 1587.21626678679\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7120 1099.6898462003674\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7124 1141.1170279746184\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7127 1491.5307852713613\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7130 1710.0843629595504\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7131 1432.3079310725736\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7132 1172.7615733390637\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7136 1019.206532908667\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7137 1426.7543857596809\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7139 1641.2624878817167\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7143 1182.164433453839\n", + "Fit and predict in 0.02s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7145 1253.7769927885395\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7146 1323.646771273291\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7148 1578.8857521785108\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7151 1170.6036282995137\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7153 1025.8293079888592\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7157 1321.771243008199\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7166 1053.8704889468368\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7169 1550.2842036985703\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7173 1473.5949281513529\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7176 1942.9778703904026\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7177 1387.3897348329065\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7178 1452.5867315445373\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7179 1241.8216815155522\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7182 1128.691746506784\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7183 1255.4271945708308\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7188 1168.489843828608\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7191 1176.8582157147873\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7195 2182.377449859308\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7197 1452.1438892267063\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7198 1258.5993898406525\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7200 1246.087556518255\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7201 1200.9874300662725\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7203 1211.1799106771314\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7205 1206.731606190437\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7209 1136.7840511235681\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7212 1131.8273094805788\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7213 1164.011775242209\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7218 1752.7601282702049\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7219 1049.0177465706415\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7221 1004.0095618700369\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7222 1782.3625883912257\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7226 1390.4298433506713\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7232 1439.6300817694953\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7235 1077.1628003043882\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7237 1246.9940203638687\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7246 1115.0930872446706\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7247 1013.0099745489242\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7249 1401.7977477145341\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7250 1368.9497240965654\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7253 1203.1967723770736\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7264 1059.4875608703073\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7267 1089.3842949546868\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7269 1405.6983980925474\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7272 1173.268700962413\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7273 1093.610997543326\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7278 1278.918587457346\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7281 1189.8349023236399\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7289 1031.3026903782104\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7296 1029.6056455902685\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7301 1192.0280653176171\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7307 1222.481378381306\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7316 1084.085818793136\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7318 1046.545013731408\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7319 1215.868230523574\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7322 1904.2932341507878\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7324 1216.5720576088293\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7328 1444.9046807370457\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7329 1612.356343730131\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7333 1101.1571257641444\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7344 1306.7373052764603\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7348 1461.6419817886256\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7350 1530.1544919483347\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7353 1361.5586340362981\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7354 1261.7267894883366\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7357 1208.2799868548386\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7358 1391.5466461081849\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7359 1130.1080641130786\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7369 1044.1077107266967\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7372 1030.0397033448612\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7373 1106.1353402649145\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7380 1955.792056199989\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7382 1659.0589714055207\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7384 1257.9564939940337\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7385 1658.9208095616143\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7386 1386.5182460884616\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7388 1015.5475012561446\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7394 1082.2620892903233\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7395 1337.9200107874258\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7397 1734.0632359862618\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7400 2355.9535242793086\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7401 1090.509313442638\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7404 1412.8019682863314\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7407 1156.2931890813406\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7414 2658.722010229587\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7415 1352.1811826573544\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7418 1707.2367128904718\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7419 1447.755169031324\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7422 1305.3257676322264\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7423 1072.0006391809527\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7428 1043.2160642606348\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7432 1249.5015609624986\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7433 1099.7291442674577\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7441 1113.7062328772772\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7442 1363.4370839040803\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7446 1924.7895834425246\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7453 2948.340030544439\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7460 2625.377320417156\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7465 3307.9806212193525\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7466 1126.4479672056577\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7469 2251.9393712738165\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7473 1021.5969729013526\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7477 1126.940658096111\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7478 1034.5014754142048\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7482 2008.2849715958428\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7483 2793.073336977066\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7489 2803.636021076403\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7491 1011.4484331130384\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7495 2908.4466497959324\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7496 1036.7910324660836\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7500 1683.8325463379717\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7505 1189.3223326503548\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7506 1383.4981034185944\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7508 1403.9245171623568\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7518 2954.2016966252063\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7520 1053.2327522841458\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7521 1196.8032136946215\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7522 1685.4247723070566\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7525 1000.4573978446734\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7529 1335.1319035721206\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7530 1208.9886981240184\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7535 1727.877541133225\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7536 1188.759048638066\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7539 1528.4215949904699\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7541 1146.22726384475\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7542 1363.8016447648997\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7546 1166.6406639012187\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7553 1383.2750153550287\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7556 1087.7267085476\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7564 1117.7073467102734\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7565 1026.023918629713\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7569 1047.8436633237466\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7572 1067.164877092058\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7574 1371.6820293732028\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7575 1969.4054271950024\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7577 1777.2924414298707\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7578 1383.374593037256\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7583 1562.3729098317713\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7584 1276.7216928506157\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7587 1335.8460422368723\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7589 1121.7466322471325\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7591 2491.575935752345\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7594 3209.9351892699337\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7600 3017.3585512550626\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7602 2323.6140950306158\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7604 1489.1991012179858\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7609 1854.085567483696\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7610 1723.9212553203186\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7611 1921.420353776046\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7612 1293.858432670327\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7614 2137.414605081694\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7624 1862.701085785579\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7625 1164.3855029889176\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7626 2160.1364281223014\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7627 1474.653983294555\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7629 2926.4292498781583\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7630 3385.3220104786164\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7631 1998.2596669376564\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7634 1744.2805556621538\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7644 1926.162982367639\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7645 2689.5124150563834\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7646 2119.1779709678585\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7647 1254.1370157025585\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7651 1692.6022147648628\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7653 1035.2278752728782\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7654 1046.677985418223\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7655 1004.047701175947\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7657 2934.4068827571646\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7659 2442.52345567793\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7661 1086.2631938325262\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7664 1023.4851584878242\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7665 1219.939295145699\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7671 2065.986985213855\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7674 1031.2215921271634\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7675 1044.1112758356753\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7676 1705.1463328854177\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7678 1861.198271578626\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7683 1082.125669443554\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7688 1635.7486652341015\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7693 1225.3272771624543\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7696 1323.7860817495869\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7701 1229.133275479703\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7704 2766.6878367400104\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7712 1657.915079723048\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7716 3449.197927914958\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7720 4826.309154403773\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7730 4787.459965710172\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7732 1900.0901377212801\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7738 3308.10159315865\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7744 1464.0513330814154\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7745 1085.7202548235014\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7746 4398.020635140738\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "7756 1619.7553654326234\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7757 3932.2581841013325\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7761 1219.225057047499\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7767 4277.67489220105\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7768 1563.7402704756717\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7770 1005.3821591165182\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7771 2648.7055339531707\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7777 1140.0599415508775\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7778 2653.8319697966335\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7779 3578.369555079616\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7782 2223.125867786838\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7783 2289.093787187198\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7784 1382.3840117334883\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7787 1315.8028944552163\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7791 1334.5946222873486\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7792 2454.8059555785862\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7794 4081.4109641319355\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7799 1795.5802471880795\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7800 1078.7350064001184\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7801 1731.1425285065038\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7803 1363.0280226037319\n", + "Fit and predict in 0.22s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7804 1911.2978910678714\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7811 3960.831662871269\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 3\n", + "7815 1048.7853113157646\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.09s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7817 1201.6162282097227\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7818 1472.4169118094849\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7820 1439.4869807135383\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7823 1715.9511996448243\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7832 2752.992067153627\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7842 1132.613328510839\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7845 2273.058399281415\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7847 3775.119674493707\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7850 2429.8130440138325\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7852 2825.8611607974203\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7853 1870.6955877104926\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7856 3522.866366439481\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7857 1932.810647449097\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7859 1083.2944368803305\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7862 1511.4211037369737\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7863 1426.4478892019215\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7866 1750.096350737094\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7868 2024.8641556712003\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7878 1051.7739952619715\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7880 1158.974866497249\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7888 1062.8070704667675\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7889 1382.7471287793096\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7892 1145.3226369273439\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7895 1377.5321242318616\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7897 3009.508216713257\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7903 2440.786816978521\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7904 1104.6462573382416\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7905 2766.4895733731514\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7908 1183.4749796610365\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7910 1690.1876403217623\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7913 1192.8758664789955\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7918 2688.462009532599\n", + "Fit and predict in 0.34s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7919 2138.177361398393\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7926 1869.347257716825\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7927 1121.7416964968788\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7932 1940.70382127668\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7934 1839.0600798828584\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7938 3064.347118538353\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7939 1177.763265805592\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7941 1197.162162062949\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7944 1178.5006449464142\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7946 1301.086799922443\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7948 1206.8108072429457\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7954 2383.7980077869593\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7958 1741.0493686277707\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7962 1368.4650815947775\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7963 1330.231046407292\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7968 1143.485918760039\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7969 2365.116944308351\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7976 1174.6658953800325\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7977 1128.2936581223453\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7978 1588.2062777579922\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7980 1550.656115361444\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7985 1549.165239458096\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7987 1130.0122512795542\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "7994 1368.5624986320418\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "7999 1586.744311741547\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "8000 1471.4425747599223\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8002 1314.2577078214913\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8004 1060.4529229742009\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8007 1020.7567876644483\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8009 1015.4695235095139\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8015 1457.4532404485424\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "8021 2167.328173793972\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "8022 1151.925308953032\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8024 1327.3562915683563\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8027 1078.7084067014969\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8031 1014.3520823580753\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8034 2312.944428366675\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "8038 2515.3996680726373\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "8042 1753.5325132341527\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "8044 1041.564826520613\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8047 1574.2859985854009\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8050 1507.6602903925202\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "8064 1224.659090367027\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8067 1077.429788339751\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8068 1272.1807620043003\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8071 1261.1327600857257\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8072 1283.5058756027956\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8076 1687.8001951804667\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8079 1461.9262453688746\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8082 1835.5366786602074\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8084 1001.5744310638681\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8086 1560.0940483580353\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8087 1057.006106587745\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8088 1237.3745710375676\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8092 1230.783942710929\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8094 1262.8044708113248\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8095 1190.2804896115956\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8097 2290.0269023959336\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8102 1231.647174874188\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8104 1192.0961814413247\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8105 1472.2577851499757\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8111 1650.8911356538613\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "8112 1025.3158387264518\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8113 1329.6285621085603\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8114 1151.585283446865\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8115 1681.104442061804\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8119 1337.2611790640324\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8120 1275.8194147643171\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8129 1364.6931016200285\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8135 1330.8351414469164\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8136 1058.0261329647058\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8139 1475.1073639775477\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8145 1289.3296443929132\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "\n", + "Number of remaining large clusters: 212\n", + "\n", + "8146 1154.4261616754804\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8171 1298.3103887442749\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8188 1268.2909852617836\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8189 1010.1514722755123\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8220 1040.87360435241\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8226 1059.2374311567937\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8234 1167.9418226384305\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8236 1087.172042594775\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8244 1134.918512146005\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8250 1025.5145841470826\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8252 1018.8799541407766\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8255 1043.7998959319896\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8260 1094.913189975482\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8266 1060.5097315734313\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8268 1102.0688944530873\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8300 1287.2771301185542\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8314 1094.0075795046725\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8315 1002.8008303395131\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8317 1060.9941844642858\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8321 1174.2258696050303\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8326 1216.836407745508\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8337 1014.0067796297511\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8344 1231.7762422429075\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8377 1035.6556674866902\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8380 1161.9065254532763\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8381 1020.6523911809923\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8384 1169.1293957371358\n", + "Fit and predict in 0.01s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8390 1548.7483876872648\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8395 1072.9489353572683\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8461 1317.5942193876233\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8463 1115.647872409307\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8494 1045.1936508936571\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8516 1114.5496031632958\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8534 1069.5952307857433\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8551 1191.22126395651\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8583 1118.126796702623\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8585 1526.2750946820036\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8587 1033.8905496885745\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8612 1015.6325985051509\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8616 1121.0961326164102\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8639 1184.1939732125443\n", + "Fit and predict in 0.01s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8653 1340.967978082923\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8662 1072.8949973811893\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8665 1005.8756094100685\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8677 1267.0393891304025\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8732 1021.9458931429825\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8736 1046.1798237674566\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8778 1034.9033962928283\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8784 1091.005115546715\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8794 1177.851592893242\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8798 1381.2986033111322\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8806 1084.0861895622077\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8824 1115.5226006112473\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8826 1041.7639951146423\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8834 1030.02045508995\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8838 1121.5032937936658\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8843 1120.3215737779244\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8845 1060.5533979827635\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8870 1190.271882267714\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8903 1068.7846208756082\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8915 1133.5263591252917\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8920 1070.955264925283\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8922 1036.6615109508023\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8924 1135.582672071094\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8931 1270.813777966943\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8936 1024.8515119972603\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8998 1022.8925960823468\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9018 1297.405450490131\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9024 1099.1196847009635\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9025 1049.837669864065\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9026 1161.3029606584914\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9031 1109.031700403017\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9038 1032.948350035272\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9066 1054.9277942268973\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9068 1134.0863645821848\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9072 1430.662862517474\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9076 1092.8581558406681\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9081 1026.411736034196\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9083 1002.0445607344828\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9109 1023.6465230462784\n", + "Fit and predict in 0.01s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9111 1009.76632349167\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9113 1084.9889832389813\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9120 1011.820662302659\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9122 1039.2123671960678\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9143 1040.8029049971315\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9150 1217.0426944171245\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9151 1008.5200107724545\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9153 1263.7928043300876\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9159 1084.864913315636\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9191 1030.852646605302\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9204 1084.2999735332774\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9206 1177.0725800722373\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "9212 1025.8813597331875\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9218 1125.716465679747\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9237 1032.3635917404133\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9243 1090.1207359184255\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9266 1088.0068373480726\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9283 1001.2881654764258\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9297 1181.5737164293641\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9310 1402.9781711756978\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9320 1123.2636848720454\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9339 1270.8683495717266\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9362 1114.9272523848979\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9413 1028.40363290909\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9425 1055.205444017662\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9435 1082.630668568686\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9443 1011.3115067153801\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9452 1091.801379967449\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9471 1014.0995107980267\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9474 1261.6776700622797\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9512 1093.1732712958888\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9517 1105.6237803414167\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9565 1069.559634447447\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9576 1255.0383764561466\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9598 1125.0116226431362\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9617 1096.1020827359237\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9621 1133.2453245456882\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9625 1116.3362693306788\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9630 1100.4720719428653\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9646 1148.401886886009\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9647 1816.7271482056344\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "9651 1784.7419865686447\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9654 1489.469948195124\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9655 1240.2925612464323\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9658 1298.2038355430782\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9663 1209.5066396993238\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9671 1357.3309400282506\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "9673 1011.3744112508328\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9674 1080.2397307291133\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9677 1135.840048364799\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9681 1027.4862723208205\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9683 1162.751024365309\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9687 1035.8178121712485\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9692 1028.3002802493688\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9694 1064.2229857440364\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9710 1159.8084038707213\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9736 1059.3185285698432\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9737 1002.7274823699689\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9750 1108.0905113374997\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9756 1167.4758370383854\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9763 1191.644900546173\n", + "Fit and predict in 0.01s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9768 1143.581756125511\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9770 1284.5331910866907\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9776 1051.9200437559898\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9786 1008.2719563148337\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9787 1271.3764683632774\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9790 1305.8695281383937\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9792 1111.2350084727161\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9795 1307.8783343146752\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9796 1089.208428280641\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9799 1055.7715747079458\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9801 1070.7486413073361\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9807 1207.2806208116026\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9816 1339.4648139512713\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9847 1277.3895335302843\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9850 1211.9864727511901\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9853 1027.324006176383\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9854 1302.5324423325856\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9857 1193.673192822673\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9859 1006.2246870842158\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9865 1351.7985385392012\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9870 1043.3514454045087\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9871 1124.0974388707218\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9873 1118.174402255461\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9876 1064.7809785763257\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9879 1139.8081536831426\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9880 1104.9873529341112\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9882 1369.0986729646936\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9883 1327.744252106613\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9884 1025.2685377451871\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9892 1004.4621212352763\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9893 1027.0067386503597\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9895 1498.9462892264019\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "9898 1662.9685974141646\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9904 1196.9768104706955\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9907 1450.3217715656253\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9922 1000.523451080871\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9925 1103.690473829751\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9931 1178.1806535288936\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9938 1027.8622959539077\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9940 1125.7248684722956\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9942 1083.8008520230574\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9943 1027.045759348013\n", + "Fit and predict in 0.02s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9963 1135.845636039307\n", + "Fit and predict in 0.01s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9964 1103.8353192669967\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9969 1136.7658491430434\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9972 1374.8637108963267\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9977 1114.065511010893\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "9978 1183.243729386918\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10000 1019.3874516951997\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10005 1296.6237713112716\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10008 1133.2388693939738\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10014 1244.3803649785955\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10018 1250.516905744837\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10022 1276.6989403438479\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10028 1437.6642179683442\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10029 1023.1281504315697\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10031 1060.926639436165\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10033 1507.469015236962\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10036 1246.0307169458613\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10061 1161.187222827817\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10069 1441.0910239685802\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10075 1124.6546145868815\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10078 1145.218016172216\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10090 1245.3948357929642\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10092 1063.7225014585458\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10103 1109.1901619403677\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10106 1065.868697218634\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10107 1333.8881924148552\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10108 1191.294843225733\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10115 1005.5757345077976\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10155 1063.9136301167048\n", + "Fit and predict in 0.01s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "\n", + "Number of remaining large clusters: 4\n", + "\n", + "10362 1010.1898113211469\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10420 1191.9406384058802\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10432 1154.4930522305244\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "10523 1083.3315145292227\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "\n", + "Number of remaining large clusters: 0\n", + "\n" + ] + } + ], + "source": [ + "large_clusters = peak_demand[(peak_demand.peak_demand_kW > 1000) & (peak_demand.index >= 0)]\n", + "\n", + "while(len(large_clusters) > 0):\n", + " \n", + " for cID, d in large_clusters.iterrows():\n", + " if cID == -1: continue\n", + " print(cID, d.peak_demand_kW)\n", + "\n", + " GWR_sel = GWR[GWR.clusterID == cID].copy()\n", + " N_clust = int(np.ceil(d.peak_demand_kW / 1e3))\n", + "\n", + " if len(GWR_sel) == 0:\n", + " continue\n", + "\n", + " model = KMeans(n_clusters = N_clust)\n", + "\n", + " tt = time.time()\n", + " GWR_sel['clusterID'] = model.fit_predict( GWR_sel[coords] )\n", + " print('Fit and predict in %.2fs' %(time.time()-tt))\n", + "\n", + " clusterDemand,_ = get_cluster_demand(GWR_sel, residential_demand, 'clusterID')\n", + " cluster_peaks = clusterDemand.max(dim = ['timestamp', 'daytype']).rename('peak_demand_kW').to_dataframe() / 1e3\n", + "\n", + " # Add new cluster IDs (to replace old)\n", + " clusterIdMax = GWR.clusterID.max() + 1\n", + " GWR.loc[GWR.clusterID == cID, 'clusterID'] = clusterIdMax + GWR_sel['clusterID']\n", + "\n", + " # Remove old cluster peak and append new ones\n", + " cluster_peaks.index = cluster_peaks.index + clusterIdMax\n", + "\n", + " peak_demand = peak_demand[peak_demand.index != cID]\n", + " peak_demand = pd.concat([peak_demand, cluster_peaks])\n", + "\n", + " print('Number of clusters: %d' %(len(cluster_peaks)))\n", + " print('Number of clusters with peak demand > 1MW: %d' %(len(cluster_peaks[cluster_peaks.peak_demand_kW > 1000])))\n", + " \n", + " large_clusters = peak_demand[(peak_demand.peak_demand_kW > 1000) & (peak_demand.index >= 0)]\n", + " print('\\nNumber of remaining large clusters: %d\\n' %(len(large_clusters)))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Evaluate the results" + ] + }, + { + "cell_type": "code", + "execution_count": 71, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
    ');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
    ');\n", + " var titletext = $(\n", + " '
    ');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
    ');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
    ');\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('
    " + ], + "text/plain": [ + "\n", + "Dimensions: (clusterID: 8994, daytype: 2, timestamp: 288)\n", + "Coordinates:\n", + " * clusterID (clusterID) int64 -1 0 1 2 3 ... 10607 10608 10609 10610\n", + " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:0...\n", + " * daytype (daytype) object 'weekday' 'weekend'\n", + "Data variables:\n", + " cluster_demand (clusterID, timestamp, daytype) float64 2.833e+07 ... 2.1...\n", + " N_SFH (clusterID) float64 6.067e+04 31.0 24.0 21.0 ... 6.0 4.0 1.0\n", + " N_DWELL (clusterID) float64 5.226e+04 99.0 30.0 ... 854.0 881.0\n", + " N_MFH (clusterID) float64 2.167e+04 20.0 11.0 ... 35.0 0.0 0.0\n", + " N_MFH_GE (clusterID) float64 124.0 0.0 0.0 0.0 ... 0.0 0.0 61.0 40.0\n", + " appart (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n", + " maison (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n", + " communal_GVA (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n", + " communal_rest (timestamp, daytype) float64 79.66 183.9 ... 39.96 99.9" + ] + }, + "execution_count": 70, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "electricity_demand_out" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Save results" + ] + }, + { + "cell_type": "code", + "execution_count": 72, + "metadata": {}, + "outputs": [], + "source": [ + "electricity_demand_out.to_netcdf('demand_clusters.nc')\n", + "GWR.to_csv('GWR_clusters.csv', index = False)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Single iteration" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5 4748.771876183521\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "7 3142.7866865421934\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "8 1052.6945918788936\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "27 1461.7578438475377\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "28 1973.6873006075984\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "53 19045.901336680265\n", + "Fit and predict in 0.40s\n", + "Number of clusters: 20\n", + "Number of clusters with peak demand > 1MW: 11\n", + "54 1260.2153033928041\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "74 8771.04338957972\n", + "Fit and predict in 0.14s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 4\n", + "75 274809.9639263198\n", + "Fit and predict in 43.23s\n", + "Number of clusters: 275\n", + "Number of clusters with peak demand > 1MW: 109\n", + "76 3371.492828386601\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "81 1673.8457497431873\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "83 4560.498050015758\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "86 1381.6941802879114\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "100 1529.7096532265289\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "108 2009.8140279070558\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "109 5489.541329984773\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "110 1254.2167024615835\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "113 3134.449203203304\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "118 3604.771704347395\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "119 2935.382938427621\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "122 1550.4228698305792\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "123 1376.9202783239434\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "128 2418.0720920091253\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "143 1422.8774877606388\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "146 1711.33518766883\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "151 8780.44462405959\n", + "Fit and predict in 0.19s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 4\n", + "154 6605.561533793985\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 4\n", + "164 1701.8838848702367\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "166 9332.012200543095\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 4\n", + "167 1147.3422412276361\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "171 2143.1147364126573\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "174 2936.3451563331487\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "184 3034.1824784991095\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "198 13376.316738818705\n", + "Fit and predict in 0.25s\n", + "Number of clusters: 14\n", + "Number of clusters with peak demand > 1MW: 6\n", + "215 1935.8330079883397\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "217 1010.5669010007416\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "225 3697.379288550638\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "230 3446.5634485123264\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "247 1995.984242908293\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "255 2218.2639016930248\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "258 4516.175595040673\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "259 2363.8787447737054\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "264 1220.1116806750472\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "268 6019.287836509292\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "269 9668.78027048671\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 5\n", + "288 1307.3535992165357\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "295 39159.02645775045\n", + "Fit and predict in 1.18s\n", + "Number of clusters: 40\n", + "Number of clusters with peak demand > 1MW: 18\n", + "301 1015.9634988141743\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "314 2154.0456507036556\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "322 2168.8032244836245\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "335 1665.6397746856176\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "339 3719.221690233578\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "362 1497.2308842043726\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "363 2879.7914687262896\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "379 1440.8270854517207\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "407 1243.583834010653\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "412 1941.8124254605532\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "416 1045.769115224811\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "427 4509.955382920604\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "431 1036.880588462829\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "456 1066.0238387630502\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "469 1897.9216295070605\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "481 6676.140237690797\n", + "Fit and predict in 0.14s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "501 4183.922351883715\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "513 87353.38407767846\n", + "Fit and predict in 5.05s\n", + "Number of clusters: 88\n", + "Number of clusters with peak demand > 1MW: 31\n", + "525 1715.2732518937626\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "527 1276.6111127790807\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "544 1337.0791927598148\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "562 2032.1407120382937\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "566 33782.537983539296\n", + "Fit and predict in 0.90s\n", + "Number of clusters: 34\n", + "Number of clusters with peak demand > 1MW: 13\n", + "571 1337.6027972203601\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "575 10583.264445084806\n", + "Fit and predict in 0.21s\n", + "Number of clusters: 11\n", + "Number of clusters with peak demand > 1MW: 5\n", + "580 1636.4224115309028\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "585 3909.285642282258\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "588 7116.906660544949\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 2\n", + "592 1545.163295357455\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "643 2261.0657950261198\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "650 1714.6335103743013\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "662 1337.9177523618155\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "668 1200.9071544680726\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "673 2732.613555517469\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "679 1041.672230833827\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "683 2009.7286038405093\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "687 2149.989872597592\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "688 1223.5961847348447\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "690 3098.0319597611847\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "694 9907.049571066722\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 5\n", + "699 2620.4781990710153\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "701 5267.158746490499\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "705 2664.6038804974964\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "717 1023.5567143186905\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "730 1061.9450539945883\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "731 1790.248114691075\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "742 3425.5270872443257\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "747 8516.19157329346\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 5\n", + "770 1164.918876404102\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "793 1814.76126297332\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "794 1854.3686511228084\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "822 4117.74403919662\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "847 2186.676916343537\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "858 1456.4878259403215\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "871 2169.1322845240093\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "884 3520.9000305857426\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "885 2050.7923576543217\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "894 3223.463824745426\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "902 1077.6627681614054\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "910 1308.1557513809726\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "917 1448.5686467150333\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "919 2999.834214614965\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "930 1278.0648284043496\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "974 30335.32396742674\n", + "Fit and predict in 0.92s\n", + "Number of clusters: 31\n", + "Number of clusters with peak demand > 1MW: 10\n", + "1001 2037.2202695767942\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1019 1956.1626428491154\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1049 3734.864084319176\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1050 1291.6486178825842\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1079 1410.4258709334695\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1096 3458.8048997197297\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1141 1285.0190909683038\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1152 2982.2397934155006\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1233 1334.0842376548906\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1246 1691.0524011772754\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1290 3582.1666745147754\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1292 3942.6050166139325\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1294 1566.490453969689\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1312 1059.0310929188481\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1332 1054.5220884931957\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1335 1725.614737262068\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1356 1008.0522969916383\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1357 67225.92571188066\n", + "Fit and predict in 3.04s\n", + "Number of clusters: 68\n", + "Number of clusters with peak demand > 1MW: 29\n", + "1361 1525.2514355505823\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1367 2619.9028837396945\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1377 1866.407179603061\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1393 2999.3349350537655\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1395 1995.8265851909966\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1397 1876.5226544671132\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1412 1757.044777374882\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1413 1343.2207225186348\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1418 1672.7662453083576\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1422 5786.28069413639\n", + "Fit and predict in 0.12s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1430 1199.343819217513\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1431 1263.6857794899474\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1432 1642.3666958509687\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1434 1133.2953613044554\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1436 8982.01189951276\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 6\n", + "1439 1489.769707573159\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1448 1022.4551104253815\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1456 2562.6204767402223\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1460 1310.3040784888556\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1479 1739.2942496591843\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1488 10071.190272123687\n", + "Fit and predict in 0.20s\n", + "Number of clusters: 11\n", + "Number of clusters with peak demand > 1MW: 4\n", + "1492 2137.9419983360985\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1497 7362.354472872383\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 4\n", + "1507 1274.3207347503503\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1565 4252.525406705938\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1592 11869.923295826098\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 12\n", + "Number of clusters with peak demand > 1MW: 6\n", + "1606 1256.5034305790557\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1618 3720.604435777931\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1619 1208.9282109031526\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1623 2877.6702329190407\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1644 4783.482242523502\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1652 1065.550746638998\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1659 1535.4884920374795\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1665 3004.9967896210064\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1675 1336.8930229590685\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1676 2220.4818758796555\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1688 1477.6555547029564\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1698 1258.849725244252\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1700 3160.3106037080265\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1714 4849.157943013679\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1726 3159.11346389684\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1732 2163.5603336154268\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1749 1681.3783103379226\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1761 4852.673159131912\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1768 16708.2706953417\n", + "Fit and predict in 0.30s\n", + "Number of clusters: 17\n", + "Number of clusters with peak demand > 1MW: 7\n", + "1770 4379.805620511925\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1773 4730.376159044\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "1777 1281.0738545854615\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1781 1009.0678631960714\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1797 2593.9680586762966\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1805 2882.6178276825162\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "1850 1060.2004069192635\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1856 2296.722325009481\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1866 1033.10105199594\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1868 1981.025098460862\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "1940 9923.516096223011\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 4\n", + "1975 1087.7862167406347\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1984 2176.6394378077016\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "1991 19996.760397677263\n", + "Fit and predict in 0.29s\n", + "Number of clusters: 20\n", + "Number of clusters with peak demand > 1MW: 7\n", + "1995 2636.8332630522996\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2029 1797.2050168181497\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2041 2044.1167075901626\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2054 1853.691082460613\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2064 1486.6115495567844\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2065 2376.1199424122683\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2072 1056.0554469259578\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2094 1435.8392206213314\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2113 1975.2911516279075\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2137 1312.9783495975985\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2138 1194.6016416716984\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2141 1321.6161115925734\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2144 2288.336950566839\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2156 1355.0705568121127\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2175 1422.9214680091427\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2177 120250.5776475023\n", + "Fit and predict in 12.32s\n", + "Number of clusters: 121\n", + "Number of clusters with peak demand > 1MW: 42\n", + "2193 1396.4023286686565\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2195 5333.557365347509\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2196 27495.699827882727\n", + "Fit and predict in 0.75s\n", + "Number of clusters: 28\n", + "Number of clusters with peak demand > 1MW: 14\n", + "2200 24780.29797674983\n", + "Fit and predict in 0.63s\n", + "Number of clusters: 25\n", + "Number of clusters with peak demand > 1MW: 13\n", + "2204 15218.511504606604\n", + "Fit and predict in 0.37s\n", + "Number of clusters: 16\n", + "Number of clusters with peak demand > 1MW: 8\n", + "2209 1326.8810996564637\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2210 1165.7339751971424\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2222 1249.1556045990947\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2231 3830.7125427024507\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2241 1188.723848678434\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2244 2783.725060020654\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2245 6324.884192268525\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2249 1292.9313242229978\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2250 1998.704332618536\n", + "Fit and predict in 0.05s\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2253 3164.6689171238536\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2264 2809.2438815756614\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2265 1605.3046556761167\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2266 11084.21655950847\n", + "Fit and predict in 0.19s\n", + "Number of clusters: 12\n", + "Number of clusters with peak demand > 1MW: 6\n", + "2270 4887.009264128355\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2275 3346.4531382131754\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2291 3874.1053542245336\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2309 1351.5753594369587\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2325 1688.1201054917594\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2329 1676.745957269486\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2344 2706.0676460906707\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2349 5685.7201403246045\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2364 31004.094055496556\n", + "Fit and predict in 0.79s\n", + "Number of clusters: 32\n", + "Number of clusters with peak demand > 1MW: 15\n", + "2376 3024.1731953579747\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2380 1087.0108346625111\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2386 1877.7803242655557\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2393 24209.096986850393\n", + "Fit and predict in 0.63s\n", + "Number of clusters: 25\n", + "Number of clusters with peak demand > 1MW: 13\n", + "2405 3401.4464144349517\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2444 1808.9082543779753\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2445 1108.9194946965788\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2455 12097.996864956964\n", + "Fit and predict in 0.19s\n", + "Number of clusters: 13\n", + "Number of clusters with peak demand > 1MW: 7\n", + "2461 7212.890790555987\n", + "Fit and predict in 0.14s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 5\n", + "2464 2140.199527499092\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2465 1976.1794518930924\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2479 2293.279733808299\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2482 7342.139444606337\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2485 1231.3868408922663\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2495 1569.5742604567408\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2499 1179.9084594306903\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2505 2287.4792714637383\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2509 2151.5670239307105\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2521 4929.479850549034\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2549 1649.9145415369767\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2565 4964.542842786664\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2567 1142.6784553110572\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2568 1211.914145619587\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2589 1705.2803686535494\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2596 1820.3286105524062\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2603 1990.3539347018518\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2626 4655.3714368803285\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2639 1286.5776569723841\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2651 2369.830694572995\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2658 9737.765229264185\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2688 3326.8190589624583\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2692 5506.068703157482\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2716 1649.803643938695\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2717 5948.298488278947\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2721 1153.4683501133657\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2724 1029.8444599133004\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2726 5283.740152067942\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 3\n", + "2736 3545.2478635374728\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2763 1354.8607718390017\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2794 1404.310892352861\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2803 2384.6363907563946\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2861 1246.6213091553068\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2920 1151.8957237486788\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2925 2715.7626401170064\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2929 3316.485416053085\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2956 1622.9835495470286\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2969 1575.064344541751\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2970 3804.095550268871\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "2973 1403.6273979457928\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "2976 1746.1633631565962\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "2989 1018.5501894857741\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3013 1624.335015768645\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3061 6656.128575187964\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 4\n", + "3085 3128.1965189369307\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3106 13178.733328688022\n", + "Fit and predict in 0.27s\n", + "Number of clusters: 14\n", + "Number of clusters with peak demand > 1MW: 7\n", + "3119 2587.2316562688525\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3140 1052.290564184423\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3146 2697.8343989214713\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3149 1041.2713042241887\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3152 1314.643794782417\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3184 1139.4077504634843\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3227 2704.99559584176\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3232 3625.3481204580207\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3235 34849.85090056069\n", + "Fit and predict in 0.84s\n", + "Number of clusters: 35\n", + "Number of clusters with peak demand > 1MW: 15\n", + "3237 1030.1660928021465\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3239 1878.5448527145575\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3241 8564.046972151022\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 4\n", + "3243 1378.923979145413\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3245 6055.659859731086\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3248 2483.467821163019\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3249 3816.8265531847874\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3253 1755.4509257708933\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3260 3253.2102014258794\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3262 1272.260223066864\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3271 1046.9028551560918\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3276 7846.374098306457\n", + "Fit and predict in 0.15s\n", + "Number of clusters: 8\n", + "Number of clusters with peak demand > 1MW: 5\n", + "3279 2216.877898437649\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3305 1520.7742426081481\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3310 2034.1958611105526\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3318 3171.1470042225124\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3329 1459.2911652557816\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3344 3427.1858233614466\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3347 9025.348458876835\n", + "Fit and predict in 0.19s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 4\n", + "3348 2433.430159634213\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3349 1053.2545843574187\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3350 1954.473121808218\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3353 1841.5587451656093\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3368 1363.6165782202224\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3376 1039.9023553428115\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3383 2794.2952625150238\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3398 1424.3979668631355\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3399 3712.434993810952\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3400 1303.9498680150346\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3402 4588.901442752241\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3412 3184.5343756800607\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3433 3797.6347459943127\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3456 1914.3154763121024\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3470 5430.387466380077\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 6\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3476 4903.631516483076\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3491 2326.7503327350696\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3497 1128.9366674816201\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3510 2214.073735882551\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3520 1441.5292905896476\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3530 1133.0451115411329\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3533 8779.801800036881\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 3\n", + "3566 8783.710403872488\n", + "Fit and predict in 0.17s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 5\n", + "3567 1220.3559063260584\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3569 1746.153613621541\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3669 1070.8177891144082\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3681 1580.3506992299795\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3696 4009.1790198863996\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3705 1165.6445448534234\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3719 1012.1660661520623\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3727 14674.020713827415\n", + "Fit and predict in 0.26s\n", + "Number of clusters: 15\n", + "Number of clusters with peak demand > 1MW: 5\n", + "3733 27854.62053682688\n", + "Fit and predict in 0.61s\n", + "Number of clusters: 28\n", + "Number of clusters with peak demand > 1MW: 12\n", + "3734 2465.80877343734\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3736 1204.8313867825002\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3762 1451.5670398511206\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "3771 1268.1852972401773\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3897 2619.8757761202605\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "3919 2079.7070344763006\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3936 2029.6425073433209\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3981 8340.927858951947\n", + "Fit and predict in 0.11s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 3\n", + "3988 1242.7566021907112\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3989 1043.933762095563\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "3990 47846.41210905342\n", + "Fit and predict in 1.69s\n", + "Number of clusters: 48\n", + "Number of clusters with peak demand > 1MW: 15\n", + "3996 1494.0444936301246\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4038 1308.9273463412321\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4050 17446.075265942167\n", + "Fit and predict in 0.35s\n", + "Number of clusters: 18\n", + "Number of clusters with peak demand > 1MW: 7\n", + "4055 1014.073754400283\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4056 1535.0133719494977\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4123 1000.6176216367428\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4179 3811.8625731747557\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4189 3833.3375730064763\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4191 2622.7803497260143\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4192 1900.1463287330453\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4206 1803.768201165814\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4211 2004.9313202666426\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4214 1086.4840651592265\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4215 3006.225442209898\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4238 1530.7477398000528\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4254 1386.3295426108944\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4273 1379.8613701262775\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4275 1236.587543063847\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4290 1269.3847720661058\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4295 1478.6318507126784\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4312 1614.042198780618\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4322 1542.299558388629\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4323 1786.500079795455\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4329 1338.6329509294549\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4359 10977.05456242482\n", + "Fit and predict in 0.20s\n", + "Number of clusters: 11\n", + "Number of clusters with peak demand > 1MW: 5\n", + "4368 1707.700018316296\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4377 102158.97780571324\n", + "Fit and predict in 5.31s\n", + "Number of clusters: 103\n", + "Number of clusters with peak demand > 1MW: 40\n", + "4382 1242.5789332491972\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4402 3043.55766274844\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4403 2856.4212348760116\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4431 1194.6810230443468\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4434 1840.722760929175\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4457 1069.54563519517\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4463 154059.1768009612\n", + "Fit and predict in 12.01s\n", + "Number of clusters: 155\n", + "Number of clusters with peak demand > 1MW: 46\n", + "4467 3931.6481969137985\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4473 8630.149455440807\n", + "Fit and predict in 0.16s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 4\n", + "4483 1041.8576320620487\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4500 1439.2750994143837\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4509 2342.0330740773697\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4516 1312.675071324903\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4553 4171.738599322665\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4575 1527.8062924698022\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4592 3286.865305092533\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4599 1757.1516018885072\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4610 28856.614324365255\n", + "Fit and predict in 0.70s\n", + "Number of clusters: 29\n", + "Number of clusters with peak demand > 1MW: 9\n", + "4650 1140.6504634129824\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4653 8572.302633551806\n", + "Fit and predict in 0.13s\n", + "Number of clusters: 9\n", + "Number of clusters with peak demand > 1MW: 3\n", + "4656 3262.4953361059434\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4687 20151.46432716808\n", + "Fit and predict in 0.43s\n", + "Number of clusters: 21\n", + "Number of clusters with peak demand > 1MW: 7\n", + "4688 1108.9041586257676\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4692 1849.331271565343\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4699 1866.3027140493343\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4703 1028.16591481412\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4705 4995.292186944506\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4707 1023.05979371739\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4715 4751.148989487739\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "4789 2924.9188932466377\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4790 1428.222635898493\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4822 2953.867033634329\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4847 1788.2296336532265\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4865 2203.1645925564967\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4879 1156.5860377363101\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4892 3237.4196357116166\n", + "Fit and predict in 0.06s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4904 6751.819422068262\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 4\n", + "4916 1261.6713399768016\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4917 2195.541572939526\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 2\n", + "4924 1395.9538767079107\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4925 1032.0853392941074\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4933 9485.406403810299\n", + "Fit and predict in 0.21s\n", + "Number of clusters: 10\n", + "Number of clusters with peak demand > 1MW: 3\n", + "4937 1784.025227162006\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4940 1359.9647846950957\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "4951 1323.2162895944655\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "4965 1871.7663069868172\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5010 1074.940758983462\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5020 18243.103693296373\n", + "Fit and predict in 0.31s\n", + "Number of clusters: 19\n", + "Number of clusters with peak demand > 1MW: 5\n", + "5021 1024.6408369770274\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5024 1026.4775075052253\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5025 1356.2071558129655\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5039 1028.3408016223368\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5062 1349.5853820297655\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5071 2181.545271573531\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5077 1759.4489529222135\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5103 4599.710613190985\n", + "Fit and predict in 0.05s\n", + "Number of clusters: 5\n", + "Number of clusters with peak demand > 1MW: 3\n", + "5110 26250.30068908244\n", + "Fit and predict in 0.47s\n", + "Number of clusters: 27\n", + "Number of clusters with peak demand > 1MW: 10\n", + "5122 1234.2068266494807\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5128 1581.3587788505406\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5134 13320.309866684463\n", + "Fit and predict in 0.30s\n", + "Number of clusters: 14\n", + "Number of clusters with peak demand > 1MW: 6\n", + "5157 3769.8274148987366\n", + "Fit and predict in 0.08s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 2\n", + "5163 1199.73223642796\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5179 2065.1839173927033\n", + "Fit and predict in 0.09s\n", + "Number of clusters: 3\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5208 1048.5789657838873\n", + "Fit and predict in 0.04s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5210 1597.9103834163127\n", + "Fit and predict in 0.02s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 1\n", + "5277 1160.2798410627022\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5280 6204.2125126223345\n", + "Fit and predict in 0.10s\n", + "Number of clusters: 7\n", + "Number of clusters with peak demand > 1MW: 3\n", + "5298 1278.9976707228316\n", + "Fit and predict in 0.03s\n", + "Number of clusters: 2\n", + "Number of clusters with peak demand > 1MW: 0\n", + "5355 3352.9165975432156\n", + "Fit and predict in 0.07s\n", + "Number of clusters: 4\n", + "Number of clusters with peak demand > 1MW: 1\n" + ] + } + ], + "source": [ + "for cID, d in large_clusters.iterrows():\n", + " if cID == -1: continue\n", + " print(cID, d.peak_demand_kW)\n", + " \n", + " GWR_sel = GWR[GWR.clusterID == cID].copy()\n", + " N_clust = int(np.ceil(d.peak_demand_kW / 1e3))\n", + " \n", + " if len(GWR_sel) == 0:\n", + " continue\n", + " \n", + " model = KMeans(n_clusters = N_clust)\n", + "\n", + " tt = time.time()\n", + " GWR_sel['clusterID'] = model.fit_predict( GWR_sel[coords] )\n", + " print('Fit and predict in %.2fs' %(time.time()-tt))\n", + " \n", + " clusterDemand,_ = get_cluster_demand(GWR_sel, residential_demand, 'clusterID')\n", + " cluster_peaks = clusterDemand.max(dim = ['timestamp', 'daytype']).rename('peak_demand_kW').to_dataframe() / 1e3\n", + " \n", + " # Add new cluster IDs (to replace old)\n", + " clusterIdMax = GWR.clusterID.max() + 1\n", + " GWR.loc[GWR.clusterID == cID, 'clusterID'] = clusterIdMax + GWR_sel['clusterID']\n", + " \n", + " # Remove old cluster peak and append new ones\n", + " cluster_peaks.index = cluster_peaks.index + clusterIdMax\n", + " \n", + " peak_demand = peak_demand[peak_demand.index != cID]\n", + " peak_demand = pd.concat([peak_demand, cluster_peaks])\n", + "\n", + " print('Number of clusters: %d' %(len(cluster_peaks)))\n", + " print('Number of clusters with peak demand > 1MW: %d' %(len(cluster_peaks[cluster_peaks.peak_demand_kW > 1000])))" + ] + }, + { + "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.8.3" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/clustering/preprocess_new_GWR.ipynb b/clustering/preprocess_new_GWR.ipynb new file mode 100644 index 0000000..7cf0af3 --- /dev/null +++ b/clustering/preprocess_new_GWR.ipynb @@ -0,0 +1,6818 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import pandas as pd\n", + "import geopandas as gpd\n", + "import xarray as xr\n", + "\n", + "import os\n", + "import calendar\n", + "\n", + "%matplotlib notebook\n", + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "def get_yearly_sum( ds, var = None ):\n", + "# create an xarray datasets that contains, for each timestamp in \"ds\", the number of repetitions of that hour in the month\n", + "# and sums all values over a year \n", + "\n", + " days_of_each_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n", + " month = range(1,13)\n", + " \n", + " days_of_month = pd.DataFrame( data = [ month, days_of_each_month ], index = ['month', 'n_days'] ).transpose()\n", + " \n", + " timestamps = ds.timestamp.to_dataframe()\n", + " timestamps['month'] = timestamps.timestamp.dt.month\n", + " \n", + " days_of_month = timestamps.merge( days_of_month, on = 'month', how = 'left' ).drop( columns = 'month' ).set_index('timestamp').to_xarray()\n", + " \n", + " if var is not None:\n", + " annual_sum = (ds[var] * days_of_month.n_days).sum( dim = 'timestamp' )\n", + " else:\n", + " annual_sum = (ds * days_of_month.n_days).sum( dim = 'timestamp' )\n", + " \n", + " week_weighted = annual_sum.sel( daytype = 'weekday' ) * 5/7 + annual_sum.sel( daytype = 'weekend' ) * 2/7\n", + " return week_weighted" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Load GWR" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "GWR_fp = 'D:\\Building_data\\OFS\\Buildings\\GWR_MADD_Export_MADD-20200715-A3_20200722'" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Building information" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "BLD_fp = 'GWR_MADD_GEB-10_Data_MADD-20200715-A3_20200722.dsv'\n", + "BLD_cols = ['EGID', 'GKODE', 'GKODN', 'GSTAT', 'GKAT', 'GKLAS', 'GGDENR', 'GDEKT']\n", + "BLD = pd.read_csv(os.path.join(GWR_fp, BLD_fp), sep = '\\t', usecols = BLD_cols)\n", + "\n", + "# Extract only those dwellings that are currently active (\"Wohnung bestehend\")\n", + "BLD = BLD[BLD.GSTAT == 1004]" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    EGIDGKODEGKODNGSTATGKATGKLASGGDENRGDEKT
    016000002679684.3261237449.5531004.01020.01122.01ZH
    116000012679702.1501237493.9581004.01030.01110.01ZH
    216000022679713.0521237475.8141004.01030.01121.01ZH
    316000032679655.4551237516.4501004.01020.01122.01ZH
    416000052679749.2691237529.3461004.01020.01110.01ZH
    ...........................
    23557204000026872582696.0001250531.0001004.01060.01242.06810JU
    23557214000027112582389.6011252071.6561004.01020.01110.06810JU
    23557224000027342581458.8691251234.4981004.01060.0NaN6810JU
    23557244000027372582121.0301251281.4321004.01060.0NaN6810JU
    23557254000027382582035.8891251386.6301004.01020.01110.06810JU
    \n", + "

    2238851 rows × 8 columns

    \n", + "
    " + ], + "text/plain": [ + " EGID GKODE GKODN GSTAT GKAT GKLAS GGDENR \\\n", + "0 1600000 2679684.326 1237449.553 1004.0 1020.0 1122.0 1 \n", + "1 1600001 2679702.150 1237493.958 1004.0 1030.0 1110.0 1 \n", + "2 1600002 2679713.052 1237475.814 1004.0 1030.0 1121.0 1 \n", + "3 1600003 2679655.455 1237516.450 1004.0 1020.0 1122.0 1 \n", + "4 1600005 2679749.269 1237529.346 1004.0 1020.0 1110.0 1 \n", + "... ... ... ... ... ... ... ... \n", + "2355720 400002687 2582696.000 1250531.000 1004.0 1060.0 1242.0 6810 \n", + "2355721 400002711 2582389.601 1252071.656 1004.0 1020.0 1110.0 6810 \n", + "2355722 400002734 2581458.869 1251234.498 1004.0 1060.0 NaN 6810 \n", + "2355724 400002737 2582121.030 1251281.432 1004.0 1060.0 NaN 6810 \n", + "2355725 400002738 2582035.889 1251386.630 1004.0 1020.0 1110.0 6810 \n", + "\n", + " GDEKT \n", + "0 ZH \n", + "1 ZH \n", + "2 ZH \n", + "3 ZH \n", + "4 ZH \n", + "... ... \n", + "2355720 JU \n", + "2355721 JU \n", + "2355722 JU \n", + "2355724 JU \n", + "2355725 JU \n", + "\n", + "[2238851 rows x 8 columns]" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "BLD" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2238851" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(BLD)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2238851" + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "len(BLD.EGID.unique())" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Dwelling information" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "DWL_fp = 'GWR_MADD_WHG-10_Data_MADD-20200715-A3_20200722.dsv'\n", + "DWL_cols = ['EGID', 'EWID', 'WSTAT', 'WNART']\n", + "DWL = pd.read_csv(os.path.join(GWR_fp, DWL_fp), sep = '\\t', usecols = DWL_cols)\n", + "\n", + "# Extract only those dwellings that are currently active (\"Wohnung bestehend\")\n", + "DWL = DWL[DWL.WSTAT == 3004]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    EGIDEWIDWSTATWNART
    01600000330043010.0
    11600000630043010.0
    21600000730043010.0
    31600001130043010.0
    4160000213004NaN
    ...............
    4915006191794387130043010.0
    4915007191832660130043010.0
    491500819183468013004NaN
    4915012400002711130043010.0
    4915014400002738130043010.0
    \n", + "

    4629136 rows × 4 columns

    \n", + "
    " + ], + "text/plain": [ + " EGID EWID WSTAT WNART\n", + "0 1600000 3 3004 3010.0\n", + "1 1600000 6 3004 3010.0\n", + "2 1600000 7 3004 3010.0\n", + "3 1600001 1 3004 3010.0\n", + "4 1600002 1 3004 NaN\n", + "... ... ... ... ...\n", + "4915006 191794387 1 3004 3010.0\n", + "4915007 191832660 1 3004 3010.0\n", + "4915008 191834680 1 3004 NaN\n", + "4915012 400002711 1 3004 3010.0\n", + "4915014 400002738 1 3004 3010.0\n", + "\n", + "[4629136 rows x 4 columns]" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "DWL" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
    ');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
    ');\n", + " var titletext = $(\n", + " '
    ');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
    ');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
    ');\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('
    ');\n", + " var button = $('');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " // select the cell after this one\n", + " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", + " IPython.notebook.select(index + 1);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plt.figure()\n", + "BLD_w_dwell.N_DWELL.plot.hist(range = (1,50), bins = 49)\n", + "plt.legend()" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
    ');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
    ');\n", + " var titletext = $(\n", + " '
    ');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
    ');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
    ');\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('');\n", + " button.click(method_name, toolbar_event);\n", + " button.mouseover(tooltip, toolbar_mouse_event);\n", + " nav_element.append(button);\n", + " }\n", + "\n", + " // Add the status bar.\n", + " var status_bar = $('');\n", + " nav_element.append(status_bar);\n", + " this.message = status_bar[0];\n", + "\n", + " // Add the close button to the window.\n", + " var buttongrp = $('
    ');\n", + " var button = $('');\n", + " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", + " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", + " buttongrp.append(button);\n", + " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", + " titlebar.prepend(buttongrp);\n", + "}\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(el){\n", + " var fig = this\n", + " el.on(\"remove\", function(){\n", + "\tfig.close_ws(fig, {});\n", + " });\n", + "}\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(el){\n", + " // this is important to make the div 'focusable\n", + " el.attr('tabindex', 0)\n", + " // reach out to IPython and tell the keyboard manager to turn it's self\n", + " // off when our div gets focus\n", + "\n", + " // location in version 3\n", + " if (IPython.notebook.keyboard_manager) {\n", + " IPython.notebook.keyboard_manager.register_events(el);\n", + " }\n", + " else {\n", + " // location in version 2\n", + " IPython.keyboard_manager.register_events(el);\n", + " }\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._key_event_extra = function(event, name) {\n", + " var manager = IPython.notebook.keyboard_manager;\n", + " if (!manager)\n", + " manager = IPython.keyboard_manager;\n", + "\n", + " // Check for shift+enter\n", + " if (event.shiftKey && event.which == 13) {\n", + " this.canvas_div.blur();\n", + " // select the cell after this one\n", + " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", + " IPython.notebook.select(index + 1);\n", + " }\n", + "}\n", + "\n", + "mpl.figure.prototype.handle_save = function(fig, msg) {\n", + " fig.ondownload(fig, null);\n", + "}\n", + "\n", + "\n", + "mpl.find_output_cell = function(html_output) {\n", + " // Return the cell and output element which can be found *uniquely* in the notebook.\n", + " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", + " // IPython event is triggered only after the cells have been serialised, which for\n", + " // our purposes (turning an active figure into a static one), is too late.\n", + " var cells = IPython.notebook.get_cells();\n", + " var ncells = cells.length;\n", + " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", + " data = data.data;\n", + " }\n", + " if (data['text/html'] == html_output) {\n", + " return [cell, data, j];\n", + " }\n", + " }\n", + " }\n", + " }\n", + "}\n", + "\n", + "// Register the function which deals with the matplotlib target/channel.\n", + "// The kernel may be null if the page has been refreshed.\n", + "if (IPython.notebook.kernel != null) {\n", + " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", + "}\n" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "" + ], + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "plt.figure()\n", + "BLD_w_dwell.dropna(subset = ['N_DWELL']).GKLAS.plot.hist(range = (1110, 1280), bins = 17, label = 'With dwelling info', alpha = 0.7)\n", + "BLD_wo_dwell.GKLAS.plot.hist(range = (1110, 1280), bins = 17, label = 'Without dwelling info', alpha = 0.7)\n", + "plt.legend()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Estimate approximate energy demand\n", + "Only information with entry in \"WHG\", but all \"WHG\" considered - anything with 1 WHG is a SFH, anything with > 1 WHG is a MFH." + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "demand_fp = 'D:\\Demand' # '/work/hyenergy/output/demand'\n", + "residential_demand = xr.open_dataset(os.path.join(demand_fp, 'electricity_demand_residential.nc')) " + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
    +       "Dimensions:        (daytype: 2, timestamp: 288)\n",
    +       "Coordinates:\n",
    +       "  * timestamp      (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n",
    +       "  * daytype        (daytype) object 'weekday' 'weekend'\n",
    +       "Data variables:\n",
    +       "    appart         (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n",
    +       "    maison         (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n",
    +       "    communal_GVA   (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n",
    +       "    communal_rest  (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n",
    +       "    weight         (timestamp, daytype) float64 0.0001138 ... 0.0001427\n",
    +       "    GVA_annual     float64 2.12e+06\n",
    +       "    rest_annual    float64 7e+05
    " + ], + "text/plain": [ + "\n", + "Dimensions: (daytype: 2, timestamp: 288)\n", + "Coordinates:\n", + " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n", + " * daytype (daytype) object 'weekday' 'weekend'\n", + "Data variables:\n", + " appart (timestamp, daytype) float64 ...\n", + " maison (timestamp, daytype) float64 ...\n", + " communal_GVA (timestamp, daytype) float64 ...\n", + " communal_rest (timestamp, daytype) float64 ...\n", + " weight (timestamp, daytype) float64 ...\n", + " GVA_annual float64 ...\n", + " rest_annual float64 ..." + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "residential_demand" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Compute national statistics" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "BLD_dwell = BLD_w_dwell.dropna(subset = ['N_DWELL'])\n", + "SFH = BLD_dwell[BLD_dwell.N_DWELL == 1]\n", + "MFH = BLD_dwell[BLD_dwell.N_DWELL > 1]" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [], + "source": [ + "residential_demand['N_SFH_CH'] = len(SFH)\n", + "residential_demand['N_DWELL_CH'] = len(DWL[DWL.EGID.isin(MFH.EGID)])\n", + "residential_demand['N_MFH_GE'] = len(MFH[MFH.GDEKT == 'GE'])\n", + "residential_demand['N_MFH_rest'] = len(MFH[MFH.GDEKT != 'GE'])" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [], + "source": [ + "residential_demand['demand_CH'] = ( residential_demand['N_SFH_CH'] * residential_demand['maison'] \n", + " + residential_demand['N_DWELL_CH'] * residential_demand['appart']\n", + " + residential_demand['N_MFH_GE'] * residential_demand['communal_GVA']\n", + " + residential_demand['N_MFH_rest'] * residential_demand['communal_rest']) / 1e9" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.DataArray ()>\n",
    +       "array(12818.47281338)
    " + ], + "text/plain": [ + "\n", + "array(12818.47281338)" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "get_yearly_sum(residential_demand, var = 'demand_CH')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Save GWR" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
    EGIDGKODEGKODNGSTATGKATGKLASGGDENRGDEKTN_DWELL
    016000002679684.3261237449.5531004.01020.01122.01ZH3.0
    116000012679702.1501237493.9581004.01030.01110.01ZH1.0
    216000022679713.0521237475.8141004.01030.01121.01ZH2.0
    316000032679655.4551237516.4501004.01020.01122.01ZH3.0
    416000052679749.2691237529.3461004.01020.01110.01ZH1.0
    \n", + "
    " + ], + "text/plain": [ + " EGID GKODE GKODN GSTAT GKAT GKLAS GGDENR GDEKT \\\n", + "0 1600000 2679684.326 1237449.553 1004.0 1020.0 1122.0 1 ZH \n", + "1 1600001 2679702.150 1237493.958 1004.0 1030.0 1110.0 1 ZH \n", + "2 1600002 2679713.052 1237475.814 1004.0 1030.0 1121.0 1 ZH \n", + "3 1600003 2679655.455 1237516.450 1004.0 1020.0 1122.0 1 ZH \n", + "4 1600005 2679749.269 1237529.346 1004.0 1020.0 1110.0 1 ZH \n", + "\n", + " N_DWELL \n", + "0 3.0 \n", + "1 1.0 \n", + "2 2.0 \n", + "3 3.0 \n", + "4 1.0 " + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "BLD_dwell.head()" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [], + "source": [ + "BLD_dwell.to_csv(os.path.join(GWR_fp, 'GWR_GEB_w_N_WHG.csv'), index = False)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Define function to get demand of cluster" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [], + "source": [ + "def get_cluster_demand(BLD_df, demand, dwell_nb = 'N_DWELL', canton_id = 'GDEKT', \n", + " SFH_demand = 'maison', MFH_demand = 'appart', \n", + " communal_demand = 'communal_rest', communal_demand_GE = 'communal_GVA'):\n", + "\n", + " SFH = BLD_df[BLD_df[dwell_nb] == 1]\n", + " MFH = BLD_df[BLD_df[dwell_nb] > 1]\n", + " \n", + " building_counts = { 'N_SFH' : len(SFH),\n", + " 'N_DWELL' : MFH[dwell_nb].sum(),\n", + " 'N_MFH' : len(MFH[MFH.GDEKT != 'GE']),\n", + " 'N_MFH_GE': len(MFH[MFH.GDEKT == 'GE']) }\n", + " \n", + " cluster_demand = ( building_counts['N_SFH'] * demand[SFH_demand] \n", + " + building_counts['N_DWELL'] * demand[MFH_demand]\n", + " + building_counts['N_MFH'] * demand[communal_demand] \n", + " + building_counts['N_MFH_GE']* demand[communal_demand_GE] )\n", + " \n", + " return [ cluster_demand, building_counts ]" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [], + "source": [ + "demand, counts = get_cluster_demand(BLD_dwell[BLD_dwell.GDEKT == 'ZH'], residential_demand)" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.DataArray ()>\n",
    +       "array(2.03392768)
    " + ], + "text/plain": [ + "\n", + "array(2.03392768)" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "get_yearly_sum(demand) / 1e12" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'N_SFH': 131322, 'N_DWELL': 634035.0, 'N_MFH': 93963, 'N_MFH_GE': 0}" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "counts" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Plot dataframe" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [], + "source": [ + "residential_demand.coords['timestamp'] = (residential_demand.timestamp.dt.month-1) * 24 + residential_demand.timestamp.dt.hour" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "data": { + "application/javascript": [ + "/* Put everything inside the global mpl namespace */\n", + "window.mpl = {};\n", + "\n", + "\n", + "mpl.get_websocket_type = function() {\n", + " if (typeof(WebSocket) !== 'undefined') {\n", + " return WebSocket;\n", + " } else if (typeof(MozWebSocket) !== 'undefined') {\n", + " return MozWebSocket;\n", + " } else {\n", + " alert('Your browser does not have WebSocket support. ' +\n", + " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", + " 'Firefox 4 and 5 are also supported but you ' +\n", + " 'have to enable WebSockets in about:config.');\n", + " };\n", + "}\n", + "\n", + "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", + " this.id = figure_id;\n", + "\n", + " this.ws = websocket;\n", + "\n", + " this.supports_binary = (this.ws.binaryType != undefined);\n", + "\n", + " if (!this.supports_binary) {\n", + " var warnings = document.getElementById(\"mpl-warnings\");\n", + " if (warnings) {\n", + " warnings.style.display = 'block';\n", + " warnings.textContent = (\n", + " \"This browser does not support binary websocket messages. \" +\n", + " \"Performance may be slow.\");\n", + " }\n", + " }\n", + "\n", + " this.imageObj = new Image();\n", + "\n", + " this.context = undefined;\n", + " this.message = undefined;\n", + " this.canvas = undefined;\n", + " this.rubberband_canvas = undefined;\n", + " this.rubberband_context = undefined;\n", + " this.format_dropdown = undefined;\n", + "\n", + " this.image_mode = 'full';\n", + "\n", + " this.root = $('
    ');\n", + " this._root_extra_style(this.root)\n", + " this.root.attr('style', 'display: inline-block');\n", + "\n", + " $(parent_element).append(this.root);\n", + "\n", + " this._init_header(this);\n", + " this._init_canvas(this);\n", + " this._init_toolbar(this);\n", + "\n", + " var fig = this;\n", + "\n", + " this.waiting = false;\n", + "\n", + " this.ws.onopen = function () {\n", + " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", + " fig.send_message(\"send_image_mode\", {});\n", + " if (mpl.ratio != 1) {\n", + " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", + " }\n", + " fig.send_message(\"refresh\", {});\n", + " }\n", + "\n", + " this.imageObj.onload = function() {\n", + " if (fig.image_mode == 'full') {\n", + " // Full images could contain transparency (where diff images\n", + " // almost always do), so we need to clear the canvas so that\n", + " // there is no ghosting.\n", + " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", + " }\n", + " fig.context.drawImage(fig.imageObj, 0, 0);\n", + " };\n", + "\n", + " this.imageObj.onunload = function() {\n", + " fig.ws.close();\n", + " }\n", + "\n", + " this.ws.onmessage = this._make_on_message_function(this);\n", + "\n", + " this.ondownload = ondownload;\n", + "}\n", + "\n", + "mpl.figure.prototype._init_header = function() {\n", + " var titlebar = $(\n", + " '
    ');\n", + " var titletext = $(\n", + " '
    ');\n", + " titlebar.append(titletext)\n", + " this.root.append(titlebar);\n", + " this.header = titletext[0];\n", + "}\n", + "\n", + "\n", + "\n", + "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "\n", + "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", + "\n", + "}\n", + "\n", + "mpl.figure.prototype._init_canvas = function() {\n", + " var fig = this;\n", + "\n", + " var canvas_div = $('
    ');\n", + "\n", + " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", + "\n", + " function canvas_keyboard_event(event) {\n", + " return fig.key_event(event, event['data']);\n", + " }\n", + "\n", + " canvas_div.keydown('key_press', canvas_keyboard_event);\n", + " canvas_div.keyup('key_release', canvas_keyboard_event);\n", + " this.canvas_div = canvas_div\n", + " this._canvas_extra_style(canvas_div)\n", + " this.root.append(canvas_div);\n", + "\n", + " var canvas = $('');\n", + " canvas.addClass('mpl-canvas');\n", + " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", + "\n", + " this.canvas = canvas[0];\n", + " this.context = canvas[0].getContext(\"2d\");\n", + "\n", + " var backingStore = this.context.backingStorePixelRatio ||\n", + "\tthis.context.webkitBackingStorePixelRatio ||\n", + "\tthis.context.mozBackingStorePixelRatio ||\n", + "\tthis.context.msBackingStorePixelRatio ||\n", + "\tthis.context.oBackingStorePixelRatio ||\n", + "\tthis.context.backingStorePixelRatio || 1;\n", + "\n", + " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", + "\n", + " var rubberband = $('');\n", + " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", + "\n", + " var pass_mouse_events = true;\n", + "\n", + " canvas_div.resizable({\n", + " start: function(event, ui) {\n", + " pass_mouse_events = false;\n", + " },\n", + " resize: function(event, ui) {\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " stop: function(event, ui) {\n", + " pass_mouse_events = true;\n", + " fig.request_resize(ui.size.width, ui.size.height);\n", + " },\n", + " });\n", + "\n", + " function mouse_event_fn(event) {\n", + " if (pass_mouse_events)\n", + " return fig.mouse_event(event, event['data']);\n", + " }\n", + "\n", + " rubberband.mousedown('button_press', mouse_event_fn);\n", + " rubberband.mouseup('button_release', mouse_event_fn);\n", + " // Throttle sequential mouse events to 1 every 20ms.\n", + " rubberband.mousemove('motion_notify', mouse_event_fn);\n", + "\n", + " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", + " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", + "\n", + " canvas_div.on(\"wheel\", function (event) {\n", + " event = event.originalEvent;\n", + " event['data'] = 'scroll'\n", + " if (event.deltaY < 0) {\n", + " event.step = 1;\n", + " } else {\n", + " event.step = -1;\n", + " }\n", + " mouse_event_fn(event);\n", + " });\n", + "\n", + " canvas_div.append(canvas);\n", + " canvas_div.append(rubberband);\n", + "\n", + " this.rubberband = rubberband;\n", + " this.rubberband_canvas = rubberband[0];\n", + " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", + " this.rubberband_context.strokeStyle = \"#000000\";\n", + "\n", + " this._resize_canvas = function(width, height) {\n", + " // Keep the size of the canvas, canvas container, and rubber band\n", + " // canvas in synch.\n", + " canvas_div.css('width', width)\n", + " canvas_div.css('height', height)\n", + "\n", + " canvas.attr('width', width * mpl.ratio);\n", + " canvas.attr('height', height * mpl.ratio);\n", + " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", + "\n", + " rubberband.attr('width', width);\n", + " rubberband.attr('height', height);\n", + " }\n", + "\n", + " // Set the figure to an initial 600x600px, this will subsequently be updated\n", + " // upon first draw.\n", + " this._resize_canvas(600, 600);\n", + "\n", + " // Disable right mouse context menu.\n", + " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", + " return false;\n", + " });\n", + "\n", + " function set_focus () {\n", + " canvas.focus();\n", + " canvas_div.focus();\n", + " }\n", + "\n", + " window.setTimeout(set_focus, 100);\n", + "}\n", + "\n", + "mpl.figure.prototype._init_toolbar = function() {\n", + " var fig = this;\n", + "\n", + " var nav_element = $('
    ');\n", + " nav_element.attr('style', 'width: 100%');\n", + " this.root.append(nav_element);\n", + "\n", + " // Define a callback function for later on.\n", + " function toolbar_event(event) {\n", + " return fig.toolbar_button_onclick(event['data']);\n", + " }\n", + " function toolbar_mouse_event(event) {\n", + " return fig.toolbar_button_onmouseover(event['data']);\n", + " }\n", + "\n", + " for(var toolbar_ind in mpl.toolbar_items) {\n", + " var name = mpl.toolbar_items[toolbar_ind][0];\n", + " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", + " var image = mpl.toolbar_items[toolbar_ind][2];\n", + " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", + "\n", + " if (!name) {\n", + " // put a spacer in here.\n", + " continue;\n", + " }\n", + " var button = $('');\n", " button.click(method_name, toolbar_event);\n", " button.mouseover(tooltip, toolbar_mouse_event);\n", " nav_element.append(button);\n", " }\n", "\n", " // Add the status bar.\n", " var status_bar = $('');\n", " nav_element.append(status_bar);\n", " this.message = status_bar[0];\n", "\n", " // Add the close button to the window.\n", " var buttongrp = $('
    ');\n", " var button = $('');\n", " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", " buttongrp.append(button);\n", " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", " titlebar.prepend(buttongrp);\n", "}\n", "\n", "mpl.figure.prototype._root_extra_style = function(el){\n", " var fig = this\n", " el.on(\"remove\", function(){\n", "\tfig.close_ws(fig, {});\n", " });\n", "}\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(el){\n", " // this is important to make the div 'focusable\n", " el.attr('tabindex', 0)\n", " // reach out to IPython and tell the keyboard manager to turn it's self\n", " // off when our div gets focus\n", "\n", " // location in version 3\n", " if (IPython.notebook.keyboard_manager) {\n", " IPython.notebook.keyboard_manager.register_events(el);\n", " }\n", " else {\n", " // location in version 2\n", " IPython.keyboard_manager.register_events(el);\n", " }\n", "\n", "}\n", "\n", "mpl.figure.prototype._key_event_extra = function(event, name) {\n", " var manager = IPython.notebook.keyboard_manager;\n", " if (!manager)\n", " manager = IPython.keyboard_manager;\n", "\n", " // Check for shift+enter\n", " if (event.shiftKey && event.which == 13) {\n", " this.canvas_div.blur();\n", " // select the cell after this one\n", " var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n", " IPython.notebook.select(index + 1);\n", " }\n", "}\n", "\n", "mpl.figure.prototype.handle_save = function(fig, msg) {\n", " fig.ondownload(fig, null);\n", "}\n", "\n", "\n", "mpl.find_output_cell = function(html_output) {\n", " // Return the cell and output element which can be found *uniquely* in the notebook.\n", " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", " // IPython event is triggered only after the cells have been serialised, which for\n", " // our purposes (turning an active figure into a static one), is too late.\n", " var cells = IPython.notebook.get_cells();\n", " var ncells = cells.length;\n", " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", " data = data.data;\n", " }\n", " if (data['text/html'] == html_output) {\n", " return [cell, data, j];\n", " }\n", " }\n", " }\n", " }\n", "}\n", "\n", "// Register the function which deals with the matplotlib target/channel.\n", "// The kernel may be null if the page has been refreshed.\n", "if (IPython.notebook.kernel != null) {\n", " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", "}\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# PLOTTING ROUTINE\n", "plt.figure(figsize = (10, 3))\n", "ax = plt.subplot()\n", "\n", "#plt.plot(tilted_rad_hourly['flat'], label = 'Flat')\n", "demand_all_GW.power_W.to_pandas().plot(ax = ax)\n", "\n", "ax.set_xticks(list(range(12, 24*12, 24)))\n", "ax.set_xticklabels(calendar.month_abbr[1:])\n", "ax.set_ylabel('Electricity demand ($GW$)')\n", "\n", "plt.xlabel('')\n", "plt.xlim((0, 12*24))\n", "\n", "ax = plt.gca()\n", "ax.set_axisbelow(True)\n", "ax.yaxis.grid(linestyle = '--')\n", "\n", "plt.legend()\n", "plt.show()\n", "plt.tight_layout()\n", "# plt.savefig('demand_%s.pdf' %var)" ] }, { "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" + "version": "3.8.3" } }, "nbformat": 4, "nbformat_minor": 2 } diff --git a/demand_mapping/preprocess_demand.ipynb b/demand_mapping/preprocess_demand.ipynb index fc44010..2c0f3da 100644 --- a/demand_mapping/preprocess_demand.ipynb +++ b/demand_mapping/preprocess_demand.ipynb @@ -1,2557 +1,6207 @@ { "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/home/walch/.local/lib/python3.6/site-packages/dask/config.py:129: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.\n", - " data = yaml.load(f.read()) or {}\n", - "/home/walch/.local/lib/python3.6/site-packages/distributed/config.py:20: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.\n", - " defaults = yaml.load(f)\n" - ] - } - ], + "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import geopandas as gpd\n", "import xarray as xr\n", "\n", "%matplotlib notebook\n", "import matplotlib.pyplot as plt\n", "\n", "import os\n", "import time\n", "\n", - "import util" + "# import util" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "def get_yearly_sum( ds, var = None ):\n", "# create an xarray datasets that contains, for each timestamp in \"ds\", the number of repetitions of that hour in the month\n", "# and sums all values over a year \n", "\n", " days_of_each_month = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n", " month = range(1,13)\n", " \n", " days_of_month = pd.DataFrame( data = [ month, days_of_each_month ], index = ['month', 'n_days'] ).transpose()\n", " \n", " timestamps = ds.timestamp.to_dataframe()\n", " timestamps['month'] = timestamps.timestamp.dt.month\n", " \n", " days_of_month = timestamps.merge( days_of_month, on = 'month', how = 'left' ).drop( columns = 'month' ).set_index('timestamp').to_xarray()\n", " \n", " if var is not None:\n", " annual_sum = (ds[var] * days_of_month.n_days).sum( dim = 'timestamp' )\n", " else:\n", " annual_sum = (ds * days_of_month.n_days).sum( dim = 'timestamp' )\n", " \n", " week_weighted = annual_sum.sel( daytype = 'weekday' ) * 5/7 + annual_sum.sel( daytype = 'weekend' ) * 2/7\n", " return week_weighted" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Electricity demand: Apartments, houses and industry\n", "\n", "Voila both normalised service sector values and household values (these are non-normalised)\n", "for weekday/weekend, 12 months for service: banks, commercial offices, schools, hotels, restaurants, hospitals. Also the residential: houses (maison) and appartments with no electric heating nor hot water. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ - "fp_resident = '/work/hyenergy/output/demand/residential_for_alina.csv'\n", - "fp_service = '/work/hyenergy/output/demand/normalised_service_sector_for_alina.csv'" + "fp = 'D:\\Demand' # '/work/hyenergy/output/demand'" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "fp_resident = 'residential_for_alina.csv' \n", + "fp_service = 'normalised_service_sector_for_alina.csv'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Residential sector" ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ - "residential_demand = pd.read_csv( fp_resident, index_col = 0 )" + "residential_demand = pd.read_csv( os.path.join(fp, fp_resident), index_col = 0 )" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "residential_demand['timestamp'] = [pd.to_datetime('2001-%02d-15 %s' %(x.month, x.Time)) \n", " for i,x in residential_demand.iterrows()]" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    dwelling typemonthdaytypeTimePowertimestamp
    0appart1weekday00:00:00162.2671342001-01-15 00:00:00
    1appart1weekday01:00:00141.5114222001-01-15 01:00:00
    2appart1weekday02:00:00128.6115982001-01-15 02:00:00
    3appart1weekday03:00:00127.0474502001-01-15 03:00:00
    4appart1weekday04:00:00124.1652012001-01-15 04:00:00
    \n", "
    " ], "text/plain": [ " dwelling type month daytype Time Power timestamp\n", "0 appart 1 weekday 00:00:00 162.267134 2001-01-15 00:00:00\n", "1 appart 1 weekday 01:00:00 141.511422 2001-01-15 01:00:00\n", "2 appart 1 weekday 02:00:00 128.611598 2001-01-15 02:00:00\n", "3 appart 1 weekday 03:00:00 127.047450 2001-01-15 03:00:00\n", "4 appart 1 weekday 04:00:00 124.165201 2001-01-15 04:00:00" ] }, - "execution_count": 6, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "residential_demand.head()" ] }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "residential_pivoted = []\n", "\n", "for cat in residential_demand['dwelling type'].unique():\n", " data = residential_demand[ residential_demand['dwelling type'] == cat ]\n", " residential_pivoted.append(data.set_index(['timestamp', 'daytype']).Power.rename(cat))\n", "residential_pivoted = pd.concat(residential_pivoted, axis = 1)" ] }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
    <xarray.Dataset>\n",
    +       "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
            "Dimensions:    (daytype: 2, timestamp: 288)\n",
            "Coordinates:\n",
            "  * timestamp  (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n",
            "  * daytype    (daytype) object 'weekday' 'weekend'\n",
            "Data variables:\n",
            "    appart     (timestamp, daytype) float64 162.3 181.7 141.5 ... 233.7 227.8\n",
    -       "    maison     (timestamp, daytype) float64 298.2 344.7 261.2 ... 377.5 411.3
    " + " maison (timestamp, daytype) float64 298.2 344.7 261.2 ... 377.5 411.3
    " ], "text/plain": [ "\n", "Dimensions: (daytype: 2, timestamp: 288)\n", "Coordinates:\n", " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n", " * daytype (daytype) object 'weekday' 'weekend'\n", "Data variables:\n", " appart (timestamp, daytype) float64 162.3 181.7 141.5 ... 233.7 227.8\n", " maison (timestamp, daytype) float64 298.2 344.7 261.2 ... 377.5 411.3" ] }, - "execution_count": 8, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# residential_xr = residential_demand.set_index(['dwelling type', 'timestamp', 'daytype']).to_xarray()[['Power']]\n", "# residential_xr = residential_xr.rename( {'dwelling type' : 'category', 'Power' : 'power_W'} )\n", "residential_xr = residential_pivoted.to_xarray()\n", "residential_xr" ] }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
    <xarray.Dataset>\n",
    -       "Dimensions:  ()\n",
    -       "Data variables:\n",
    -       "    appart   float64 2.338e+03\n",
    -       "    maison   float64 3.699e+03
    " - ], - "text/plain": [ - "\n", - "Dimensions: ()\n", - "Data variables:\n", - " appart float64 2.338e+03\n", - " maison float64 3.699e+03" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "(get_yearly_sum(residential_xr) / 1e3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Service sector" - ] - }, { "cell_type": "code", "execution_count": 10, "metadata": {}, - "outputs": [], - "source": [ - "service_demand = pd.read_csv( fp_service, sep = ';' )\n", - "service_demand['Time'] = (service_demand.Time * 24).round().astype(int)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [], - "source": [ - "service_demand['timestamp'] = [pd.to_datetime('2001-%02d-15 %02d:00' %(x.Month, x.Time)) \n", - " for i,x in service_demand.iterrows()]" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": { - "scrolled": false - }, "outputs": [ { "data": { "text/html": [ - "
    \n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", + "html[theme=dark],\n", + "body.vscode-dark {\n", + " --xr-font-color0: rgba(255, 255, 255, 1);\n", + " --xr-font-color2: rgba(255, 255, 255, 0.54);\n", + " --xr-font-color3: rgba(255, 255, 255, 0.38);\n", + " --xr-border-color: #1F1F1F;\n", + " --xr-disabled-color: #515151;\n", + " --xr-background-color: #111111;\n", + " --xr-background-color-row-even: #111111;\n", + " --xr-background-color-row-odd: #313131;\n", + "}\n", + "\n", + ".xr-wrap {\n", + " display: block;\n", + " min-width: 300px;\n", + " max-width: 700px;\n", + "}\n", + "\n", + ".xr-text-repr-fallback {\n", + " /* fallback to plain text repr when CSS is not injected (untrusted notebook) */\n", + " display: none;\n", + "}\n", + "\n", + ".xr-header {\n", + " padding-top: 6px;\n", + " padding-bottom: 6px;\n", + " margin-bottom: 4px;\n", + " border-bottom: solid 1px var(--xr-border-color);\n", + "}\n", + "\n", + ".xr-header > div,\n", + ".xr-header > ul {\n", + " display: inline;\n", + " margin-top: 0;\n", + " margin-bottom: 0;\n", + "}\n", + "\n", + ".xr-obj-type,\n", + ".xr-array-name {\n", + " margin-left: 2px;\n", + " margin-right: 10px;\n", + "}\n", + "\n", + ".xr-obj-type {\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-sections {\n", + " padding-left: 0 !important;\n", + " display: grid;\n", + " grid-template-columns: 150px auto auto 1fr 20px 20px;\n", + "}\n", + "\n", + ".xr-section-item {\n", + " display: contents;\n", + "}\n", + "\n", + ".xr-section-item input {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-section-item input + label {\n", + " color: var(--xr-disabled-color);\n", + "}\n", + "\n", + ".xr-section-item input:enabled + label {\n", + " cursor: pointer;\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-section-item input:enabled + label:hover {\n", + " color: var(--xr-font-color0);\n", + "}\n", + "\n", + ".xr-section-summary {\n", + " grid-column: 1;\n", + " color: var(--xr-font-color2);\n", + " font-weight: 500;\n", + "}\n", + "\n", + ".xr-section-summary > span {\n", + " display: inline-block;\n", + " padding-left: 0.5em;\n", + "}\n", + "\n", + ".xr-section-summary-in:disabled + label {\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-section-summary-in + label:before {\n", + " display: inline-block;\n", + " content: '►';\n", + " font-size: 11px;\n", + " width: 15px;\n", + " text-align: center;\n", + "}\n", + "\n", + ".xr-section-summary-in:disabled + label:before {\n", + " color: var(--xr-disabled-color);\n", + "}\n", + "\n", + ".xr-section-summary-in:checked + label:before {\n", + " content: '▼';\n", + "}\n", + "\n", + ".xr-section-summary-in:checked + label > span {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-section-summary,\n", + ".xr-section-inline-details {\n", + " padding-top: 4px;\n", + " padding-bottom: 4px;\n", + "}\n", + "\n", + ".xr-section-inline-details {\n", + " grid-column: 2 / -1;\n", + "}\n", + "\n", + ".xr-section-details {\n", + " display: none;\n", + " grid-column: 1 / -1;\n", + " margin-bottom: 5px;\n", + "}\n", + "\n", + ".xr-section-summary-in:checked ~ .xr-section-details {\n", + " display: contents;\n", + "}\n", + "\n", + ".xr-array-wrap {\n", + " grid-column: 1 / -1;\n", + " display: grid;\n", + " grid-template-columns: 20px auto;\n", + "}\n", + "\n", + ".xr-array-wrap > label {\n", + " grid-column: 1;\n", + " vertical-align: top;\n", + "}\n", + "\n", + ".xr-preview {\n", + " color: var(--xr-font-color3);\n", + "}\n", + "\n", + ".xr-array-preview,\n", + ".xr-array-data {\n", + " padding: 0 5px !important;\n", + " grid-column: 2;\n", + "}\n", + "\n", + ".xr-array-data,\n", + ".xr-array-in:checked ~ .xr-array-preview {\n", + " display: none;\n", + "}\n", + "\n", + ".xr-array-in:checked ~ .xr-array-data,\n", + ".xr-array-preview {\n", + " display: inline-block;\n", + "}\n", + "\n", + ".xr-dim-list {\n", + " display: inline-block !important;\n", + " list-style: none;\n", + " padding: 0 !important;\n", + " margin: 0;\n", + "}\n", + "\n", + ".xr-dim-list li {\n", + " display: inline-block;\n", + " padding: 0;\n", + " margin: 0;\n", + "}\n", + "\n", + ".xr-dim-list:before {\n", + " content: '(';\n", + "}\n", + "\n", + ".xr-dim-list:after {\n", + " content: ')';\n", + "}\n", + "\n", + ".xr-dim-list li:not(:last-child):after {\n", + " content: ',';\n", + " padding-right: 5px;\n", + "}\n", + "\n", + ".xr-has-index {\n", + " font-weight: bold;\n", + "}\n", + "\n", + ".xr-var-list,\n", + ".xr-var-item {\n", + " display: contents;\n", + "}\n", + "\n", + ".xr-var-item > div,\n", + ".xr-var-item label,\n", + ".xr-var-item > .xr-var-name span {\n", + " background-color: var(--xr-background-color-row-even);\n", + " margin-bottom: 0;\n", + "}\n", + "\n", + ".xr-var-item > .xr-var-name:hover span {\n", + " padding-right: 5px;\n", + "}\n", + "\n", + ".xr-var-list > li:nth-child(odd) > div,\n", + ".xr-var-list > li:nth-child(odd) > label,\n", + ".xr-var-list > li:nth-child(odd) > .xr-var-name span {\n", + " background-color: var(--xr-background-color-row-odd);\n", + "}\n", + "\n", + ".xr-var-name {\n", + " grid-column: 1;\n", + "}\n", + "\n", + ".xr-var-dims {\n", + " grid-column: 2;\n", + "}\n", + "\n", + ".xr-var-dtype {\n", + " grid-column: 3;\n", + " text-align: right;\n", + " color: var(--xr-font-color2);\n", + "}\n", + "\n", + ".xr-var-preview {\n", + " grid-column: 4;\n", + "}\n", + "\n", + ".xr-var-name,\n", + ".xr-var-dims,\n", + ".xr-var-dtype,\n", + ".xr-preview,\n", + ".xr-attrs dt {\n", + " white-space: nowrap;\n", + " overflow: hidden;\n", + " text-overflow: ellipsis;\n", + " padding-right: 10px;\n", + "}\n", + "\n", + ".xr-var-name:hover,\n", + ".xr-var-dims:hover,\n", + ".xr-var-dtype:hover,\n", + ".xr-attrs dt:hover {\n", + " overflow: visible;\n", + " width: auto;\n", + " z-index: 1;\n", + "}\n", + "\n", + ".xr-var-attrs,\n", + ".xr-var-data {\n", + " display: none;\n", + " background-color: var(--xr-background-color) !important;\n", + " padding-bottom: 5px !important;\n", + "}\n", + "\n", + ".xr-var-attrs-in:checked ~ .xr-var-attrs,\n", + ".xr-var-data-in:checked ~ .xr-var-data {\n", + " display: block;\n", + "}\n", + "\n", + ".xr-var-data > table {\n", + " float: right;\n", + "}\n", + "\n", + ".xr-var-name span,\n", + ".xr-var-data,\n", + ".xr-attrs {\n", + " padding-left: 25px !important;\n", + "}\n", + "\n", + ".xr-attrs,\n", + ".xr-var-attrs,\n", + ".xr-var-data {\n", + " grid-column: 1 / -1;\n", + "}\n", + "\n", + "dl.xr-attrs {\n", + " padding: 0;\n", + " margin: 0;\n", + " display: grid;\n", + " grid-template-columns: 125px auto;\n", + "}\n", + "\n", + ".xr-attrs dt, dd {\n", + " padding: 0;\n", + " margin: 0;\n", + " float: left;\n", + " padding-right: 10px;\n", + " width: auto;\n", + "}\n", + "\n", + ".xr-attrs dt {\n", + " font-weight: normal;\n", + " grid-column: 1;\n", + "}\n", + "\n", + ".xr-attrs dt:hover span {\n", + " display: inline-block;\n", + " background: var(--xr-background-color);\n", + " padding-right: 10px;\n", + "}\n", + "\n", + ".xr-attrs dd {\n", + " grid-column: 2;\n", + " white-space: pre-wrap;\n", + " word-break: break-all;\n", + "}\n", + "\n", + ".xr-icon-database,\n", + ".xr-icon-file-text2 {\n", + " display: inline-block;\n", + " vertical-align: middle;\n", + " width: 1em;\n", + " height: 1.5em !important;\n", + " stroke-width: 0;\n", + " stroke: currentColor;\n", + " fill: currentColor;\n", + "}\n", + "
    <xarray.Dataset>\n",
    +       "Dimensions:  ()\n",
    +       "Data variables:\n",
    +       "    appart   float64 2.338e+03\n",
    +       "    maison   float64 3.699e+03
    " + ], + "text/plain": [ + "\n", + "Dimensions: ()\n", + "Data variables:\n", + " appart float64 2.338e+03\n", + " maison float64 3.699e+03" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(get_yearly_sum(residential_xr) / 1e3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Service sector" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "service_demand = pd.read_csv( os.path.join(fp, fp_service), sep = ';' )\n", + "service_demand['Time'] = (service_demand.Time * 24).round().astype(int)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [], + "source": [ + "service_demand['timestamp'] = [pd.to_datetime('2001-%02d-15 %02d:00' %(x.Month, x.Time)) \n", + " for i,x in service_demand.iterrows()]" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "text/html": [ + "
    \n", + "\n", + "
    Category englishMonthdaytypeTimePowertimestamp
    0BANKS1weekday00.0251772001-01-15 00:00:00
    1BANKS1weekday10.0252152001-01-15 01:00:00
    2BANKS1weekday20.0262362001-01-15 02:00:00
    3BANKS1
    \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    Category englishMonthdaytypeTimePowertimestamp
    0BANKS1weekday00.0251772001-01-15 00:00:00
    1BANKS1weekday10.0252152001-01-15 01:00:00
    2BANKS1weekday20.0262362001-01-15 02:00:00
    3BANKS1weekday30.0277292001-01-15 03:00:00
    4BANKS1weekday40.0317172001-01-15 04:00:00
    \n", "
    " ], "text/plain": [ " Category english Month daytype Time Power timestamp\n", "0 BANKS 1 weekday 0 0.025177 2001-01-15 00:00:00\n", "1 BANKS 1 weekday 1 0.025215 2001-01-15 01:00:00\n", "2 BANKS 1 weekday 2 0.026236 2001-01-15 02:00:00\n", "3 BANKS 1 weekday 3 0.027729 2001-01-15 03:00:00\n", "4 BANKS 1 weekday 4 0.031717 2001-01-15 04:00:00" ] }, - "execution_count": 12, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "service_demand.head()" ] }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "service_pivoted = []\n", "\n", "for cat in service_demand['Category english'].unique():\n", " data = service_demand[ service_demand['Category english'] == cat ]\n", " service_pivoted.append(data.set_index(['timestamp', 'daytype']).Power.rename(cat))\n", "service_pivoted = pd.concat(service_pivoted, axis = 1)" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "# service_xr = service_demand.set_index(['Category english', 'timestamp', 'daytype']).to_xarray()[['Power']]\n", "# service_xr = service_xr.rename( {'Category english' : 'category', 'Power' : 'power_norm'} )\n", "service_xr = service_pivoted.to_xarray()" ] }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
    <xarray.Dataset>\n",
    +       "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
            "Dimensions:             (daytype: 2, timestamp: 288)\n",
            "Coordinates:\n",
    -       "  * timestamp           (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n",
    +       "  * timestamp           (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T...\n",
            "  * daytype             (daytype) object 'weekday' 'weekend'\n",
            "Data variables:\n",
            "    BANKS               (timestamp, daytype) float64 0.02518 0.03954 ... 0.03992\n",
            "    COMMERCIAL OFFICES  (timestamp, daytype) float64 0.02911 0.03711 ... 0.03904\n",
            "    HOSPITALS           (timestamp, daytype) float64 0.02599 0.03053 ... 0.03109\n",
            "    HOTELS              (timestamp, daytype) float64 0.02757 0.0289 ... 0.0294\n",
            "    RESTAURANTS         (timestamp, daytype) float64 0.02144 0.02646 ... 0.02779\n",
    -       "    SCHOOLS             (timestamp, daytype) float64 0.02336 0.03543 ... 0.03794
    " + " SCHOOLS (timestamp, daytype) float64 0.02336 0.03543 ... 0.03794
    " ], "text/plain": [ "\n", "Dimensions: (daytype: 2, timestamp: 288)\n", "Coordinates:\n", - " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n", + " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T...\n", " * daytype (daytype) object 'weekday' 'weekend'\n", "Data variables:\n", " BANKS (timestamp, daytype) float64 0.02518 0.03954 ... 0.03992\n", " COMMERCIAL OFFICES (timestamp, daytype) float64 0.02911 0.03711 ... 0.03904\n", " HOSPITALS (timestamp, daytype) float64 0.02599 0.03053 ... 0.03109\n", " HOTELS (timestamp, daytype) float64 0.02757 0.0289 ... 0.0294\n", " RESTAURANTS (timestamp, daytype) float64 0.02144 0.02646 ... 0.02779\n", " SCHOOLS (timestamp, daytype) float64 0.02336 0.03543 ... 0.03794" ] }, - "execution_count": 15, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "service_xr" ] }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
    <xarray.Dataset>\n",
    +       "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
            "Dimensions:             ()\n",
            "Data variables:\n",
            "    BANKS               float64 365.0\n",
            "    COMMERCIAL OFFICES  float64 365.0\n",
            "    HOSPITALS           float64 365.0\n",
            "    HOTELS              float64 365.0\n",
            "    RESTAURANTS         float64 365.0\n",
    -       "    SCHOOLS             float64 365.0
    " + " SCHOOLS float64 365.0
    " ], "text/plain": [ "\n", "Dimensions: ()\n", "Data variables:\n", " BANKS float64 365.0\n", " COMMERCIAL OFFICES float64 365.0\n", " HOSPITALS float64 365.0\n", " HOTELS float64 365.0\n", " RESTAURANTS float64 365.0\n", " SCHOOLS float64 365.0" ] }, - "execution_count": 16, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_yearly_sum(service_xr)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Electricity demand: communal areas in buildings\n", "\n", "Hi Alina,\n", "\n", "Yeah sure! \n", "It is called commun d'immeuble and is different for Geneva and rest of the cantons, as GEneva has a policy of having the lights on in the corridors for 24 hours.\n", "Therefore the values I give you is 2.12MWh/app for geneva and 0.7Mwh/app. So if you are modelling a building in Geneca with 50 appartments inside, simply multiply with 2.12 Mwh * 50 for the whole building (MFH), then use the normalised values to construct the load curves for 12 months and 2 day types.\n", "\n", "Let me know if you have any questions.\n", "\n", "Best wishes\n", "Selin" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Get monthly weights" ] }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 18, "metadata": { "scrolled": true }, "outputs": [], "source": [ - "fp = '/work/hyenergy/output/demand/commundimmeuble_norm_monthly_for_alina.csv'\n", - "norm_monthly = pd.read_csv(fp, header = None, names = ['month', 'daytype', 'weight'])" + "comm_fp = 'commundimmeuble_norm_monthly_for_alina.csv'\n", + "norm_monthly = pd.read_csv(os.path.join(fp, comm_fp), header = None, names = ['month', 'daytype', 'weight'])" ] }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "GVA_abs = 2.12 * 1e6 # 2.12 MWh/dwelling\n", "rest_abs = 0.70 * 1e6 # 0.7 MWh/dwelling" ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2.000000001" ] }, - "execution_count": 19, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "norm_monthly.weight.sum()" ] }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    monthdaytypeweight
    01.0weekday0.080016
    11.0weekend0.067735
    22.0weekday0.042714
    32.0weekend0.036158
    43.0weekday0.043156
    \n", "
    " ], "text/plain": [ " month daytype weight\n", "0 1.0 weekday 0.080016\n", "1 1.0 weekend 0.067735\n", "2 2.0 weekday 0.042714\n", "3 2.0 weekend 0.036158\n", "4 3.0 weekday 0.043156" ] }, - "execution_count": 20, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "norm_monthly.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Compute the monthly demand based on the given weights" ] }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ "norm_monthly['demand_GVA'] = norm_monthly.weight * GVA_abs\n", "norm_monthly['demand_rest'] = norm_monthly.weight * rest_abs" ] }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    monthdaytypeweightdemand_GVAdemand_rest
    01.0weekday0.080016169634.4266856011.3673
    11.0weekend0.067735143597.7972047414.3670
    22.0weekday0.04271490554.4389629900.0506
    32.0weekend0.03615876655.5366425310.7904
    43.0weekday0.04315691490.6500430209.1769
    \n", "
    " ], "text/plain": [ " month daytype weight demand_GVA demand_rest\n", "0 1.0 weekday 0.080016 169634.42668 56011.3673\n", "1 1.0 weekend 0.067735 143597.79720 47414.3670\n", "2 2.0 weekday 0.042714 90554.43896 29900.0506\n", "3 2.0 weekend 0.036158 76655.53664 25310.7904\n", "4 3.0 weekday 0.043156 91490.65004 30209.1769" ] }, - "execution_count": 22, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "norm_monthly.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Compute the average number of days in each month for weekdays and weekends and get the daily demand" ] }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "dm = pd.Series(data = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], index = range(1,13))\n", "week_weights = {'weekday' : 5/7, 'weekend' : 2/7}" ] }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "norm_monthly = norm_monthly.merge(dm.rename('dm'), left_on = 'month', right_index = True)\n", "norm_monthly['dm_week'] = norm_monthly.daytype.map(week_weights) * norm_monthly.dm" ] }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "norm_monthly['demand_GVA_day'] = norm_monthly.demand_GVA / norm_monthly.dm_week\n", "norm_monthly['demand_rest_day'] = norm_monthly.demand_rest / norm_monthly.dm_week" ] }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    monthdaytypeweightdemand_GVAdemand_restdmdm_weekdemand_GVA_daydemand_rest_day
    01.0weekday0.080016169634.4266856011.36733122.1428577660.9095922529.545620
    11.0weekend0.067735143597.7972047414.3670318.85714316212.6545235353.234984
    22.0weekday0.04271490554.4389629900.05062820.0000004527.7219481495.002530
    32.0weekend0.03615876655.5366425310.7904288.0000009581.9420803163.848800
    43.0weekday0.04315691490.6500430209.17693122.1428574131.8358081364.285408
    \n", "
    " ], "text/plain": [ " month daytype weight demand_GVA demand_rest dm dm_week \\\n", "0 1.0 weekday 0.080016 169634.42668 56011.3673 31 22.142857 \n", "1 1.0 weekend 0.067735 143597.79720 47414.3670 31 8.857143 \n", "2 2.0 weekday 0.042714 90554.43896 29900.0506 28 20.000000 \n", "3 2.0 weekend 0.036158 76655.53664 25310.7904 28 8.000000 \n", "4 3.0 weekday 0.043156 91490.65004 30209.1769 31 22.142857 \n", "\n", " demand_GVA_day demand_rest_day \n", "0 7660.909592 2529.545620 \n", "1 16212.654523 5353.234984 \n", "2 4527.721948 1495.002530 \n", "3 9581.942080 3163.848800 \n", "4 4131.835808 1364.285408 " ] }, - "execution_count": 26, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "norm_monthly.head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Load the hourly weights" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 28, "metadata": {}, "outputs": [], "source": [ - "fp = '/work/hyenergy/output/demand/commundimmeuble_norm_for_alina.csv'\n", - "norm_hourly = pd.read_csv(fp)" + "comm_fp = 'commundimmeuble_norm_for_alina.csv' \n", + "norm_hourly = pd.read_csv(os.path.join(fp, comm_fp))" ] }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 29, "metadata": {}, "outputs": [], "source": [ "norm_hourly['hour'] = norm_hourly.hour - 1\n", "norm_hourly['timestamp'] = [pd.to_datetime('2001-%02d-15 %02d:00' %(x.month, x.hour)) \n", " for i,x in norm_hourly.iterrows()]" ] }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 30, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    monthdaytypehour16timestamp
    01weekday00.0314922001-01-15 00:00:00
    11weekday10.0297062001-01-15 01:00:00
    21weekday20.0297062001-01-15 02:00:00
    31weekday30.0297062001-01-15 03:00:00
    41weekday40.0297062001-01-15 04:00:00
    \n", "
    " ], "text/plain": [ " month daytype hour 16 timestamp\n", "0 1 weekday 0 0.031492 2001-01-15 00:00:00\n", "1 1 weekday 1 0.029706 2001-01-15 01:00:00\n", "2 1 weekday 2 0.029706 2001-01-15 02:00:00\n", "3 1 weekday 3 0.029706 2001-01-15 03:00:00\n", "4 1 weekday 4 0.029706 2001-01-15 04:00:00" ] }, - "execution_count": 29, + "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "norm_hourly.head()" ] }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 31, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    hour16
    monthdaytype
    1weekday2761.0
    weekend2761.0
    2weekday2761.0
    weekend2761.0
    3weekday2761.0
    \n", "
    " ], "text/plain": [ " hour 16\n", "month daytype \n", "1 weekday 276 1.0\n", " weekend 276 1.0\n", "2 weekday 276 1.0\n", " weekend 276 1.0\n", "3 weekday 276 1.0" ] }, - "execution_count": 30, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "norm_hourly.groupby(['month', 'daytype']).sum().head()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Merge the daily demand" ] }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 32, "metadata": {}, "outputs": [], "source": [ "norm_merged = norm_hourly.merge(norm_monthly[['month', 'daytype', 'demand_GVA_day', 'demand_rest_day']], \n", " on = ['month', 'daytype'])" ] }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 33, "metadata": {}, "outputs": [], "source": [ "norm_merged['communal_GVA'] = norm_merged.demand_GVA_day * norm_merged['16']\n", "norm_merged['communal_rest'] = norm_merged.demand_rest_day * norm_merged['16']" ] }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 34, "metadata": {}, "outputs": [], "source": [ "norm_merged['weight'] = norm_merged.communal_rest / rest_abs" ] }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    monthdaytypehour16timestampdemand_GVA_daydemand_rest_daycommunal_GVAcommunal_restweight
    01weekday00.0314922001-01-15 00:00:007660.9095922529.54562241.26015379.6613710.000114
    11weekday10.0297062001-01-15 01:00:007660.9095922529.54562227.57334175.1421410.000107
    21weekday20.0297062001-01-15 02:00:007660.9095922529.54562227.57334175.1421410.000107
    31weekday30.0297062001-01-15 03:00:007660.9095922529.54562227.57334175.1421410.000107
    41weekday40.0297062001-01-15 04:00:007660.9095922529.54562227.57334175.1421410.000107
    \n", "
    " ], "text/plain": [ " month daytype hour 16 timestamp demand_GVA_day \\\n", "0 1 weekday 0 0.031492 2001-01-15 00:00:00 7660.909592 \n", "1 1 weekday 1 0.029706 2001-01-15 01:00:00 7660.909592 \n", "2 1 weekday 2 0.029706 2001-01-15 02:00:00 7660.909592 \n", "3 1 weekday 3 0.029706 2001-01-15 03:00:00 7660.909592 \n", "4 1 weekday 4 0.029706 2001-01-15 04:00:00 7660.909592 \n", "\n", " demand_rest_day communal_GVA communal_rest weight \n", "0 2529.54562 241.260153 79.661371 0.000114 \n", "1 2529.54562 227.573341 75.142141 0.000107 \n", "2 2529.54562 227.573341 75.142141 0.000107 \n", "3 2529.54562 227.573341 75.142141 0.000107 \n", "4 2529.54562 227.573341 75.142141 0.000107 " ] }, - "execution_count": 34, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "norm_merged.head()" ] }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 36, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
    \n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
    timestampdaytypecategorypower_W
    02001-01-15 00:00:00weekdaycommunal_GVA241.260153
    12001-01-15 01:00:00weekdaycommunal_GVA227.573341
    22001-01-15 02:00:00weekdaycommunal_GVA227.573341
    32001-01-15 03:00:00weekdaycommunal_GVA227.573341
    42001-01-15 04:00:00weekdaycommunal_GVA227.573341
    \n", "
    " ], "text/plain": [ " timestamp daytype category power_W\n", "0 2001-01-15 00:00:00 weekday communal_GVA 241.260153\n", "1 2001-01-15 01:00:00 weekday communal_GVA 227.573341\n", "2 2001-01-15 02:00:00 weekday communal_GVA 227.573341\n", "3 2001-01-15 03:00:00 weekday communal_GVA 227.573341\n", "4 2001-01-15 04:00:00 weekday communal_GVA 227.573341" ] }, - "execution_count": 35, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ "communal_W = norm_merged.melt( id_vars = ['timestamp', 'daytype'], value_vars = ['communal_GVA', 'communal_rest', 'weight'], \n", " var_name = 'category', value_name = 'power_W')\n", "communal_W.head()" ] }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 37, "metadata": {}, "outputs": [], "source": [ "comm_pivoted = []\n", "\n", "for cat in communal_W['category'].unique():\n", " data = communal_W[ communal_W['category'] == cat ]\n", " comm_pivoted.append(data.set_index(['timestamp', 'daytype']).power_W.rename(cat))\n", "comm_pivoted = pd.concat(comm_pivoted, axis = 1)" ] }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
    <xarray.Dataset>\n",
    +       "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
            "Dimensions:        (daytype: 2, timestamp: 288)\n",
            "Coordinates:\n",
            "  * timestamp      (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n",
            "  * daytype        (daytype) object 'weekday' 'weekend'\n",
            "Data variables:\n",
            "    communal_GVA   (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n",
            "    communal_rest  (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n",
            "    weight         (timestamp, daytype) float64 0.0001138 ... 0.0001427\n",
            "    GVA_annual     float64 2.12e+06\n",
    -       "    rest_annual    float64 7e+05
    " + " rest_annual float64 7e+05
    " ], "text/plain": [ "\n", "Dimensions: (daytype: 2, timestamp: 288)\n", "Coordinates:\n", " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n", " * daytype (daytype) object 'weekday' 'weekend'\n", "Data variables:\n", " communal_GVA (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n", " communal_rest (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n", " weight (timestamp, daytype) float64 0.0001138 ... 0.0001427\n", " GVA_annual float64 2.12e+06\n", " rest_annual float64 7e+05" ] }, - "execution_count": 37, + "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# communal_xr = communal_W.set_index(['category', 'timestamp', 'daytype']).to_xarray()\n", "communal_xr = comm_pivoted.to_xarray()\n", "communal_xr['GVA_annual' ] = GVA_abs\n", "communal_xr['rest_annual'] = rest_abs\n", "communal_xr" ] }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 39, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ - "
    <xarray.Dataset>\n",
    +       "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
            "Dimensions:        ()\n",
            "Data variables:\n",
            "    communal_GVA   float64 2.12e+06\n",
            "    communal_rest  float64 7e+05\n",
            "    weight         float64 1.0\n",
            "    GVA_annual     float64 1.857e+10\n",
    -       "    rest_annual    float64 6.132e+09
    " + " rest_annual float64 6.132e+09
    " ], "text/plain": [ "\n", "Dimensions: ()\n", "Data variables:\n", " communal_GVA float64 2.12e+06\n", " communal_rest float64 7e+05\n", " weight float64 1.0\n", " GVA_annual float64 1.857e+10\n", " rest_annual float64 6.132e+09" ] }, - "execution_count": 38, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "get_yearly_sum(communal_xr)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Merge information and save" ] }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 40, "metadata": {}, "outputs": [], "source": [ "residential_xr = xr.merge([residential_xr, communal_xr])" ] }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
    <xarray.Dataset>\n",
    +       "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
            "Dimensions:        (daytype: 2, timestamp: 288)\n",
            "Coordinates:\n",
            "  * timestamp      (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n",
            "  * daytype        (daytype) object 'weekday' 'weekend'\n",
            "Data variables:\n",
            "    appart         (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n",
            "    maison         (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n",
            "    communal_GVA   (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n",
            "    communal_rest  (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n",
            "    weight         (timestamp, daytype) float64 0.0001138 ... 0.0001427\n",
            "    GVA_annual     float64 2.12e+06\n",
    -       "    rest_annual    float64 7e+05
    " + " rest_annual float64 7e+05
    " ], "text/plain": [ "\n", "Dimensions: (daytype: 2, timestamp: 288)\n", "Coordinates:\n", " * timestamp (timestamp) datetime64[ns] 2001-01-15 ... 2001-12-15T23:00:00\n", " * daytype (daytype) object 'weekday' 'weekend'\n", "Data variables:\n", " appart (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n", " maison (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n", " communal_GVA (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n", " communal_rest (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n", " weight (timestamp, daytype) float64 0.0001138 ... 0.0001427\n", " GVA_annual float64 2.12e+06\n", " rest_annual float64 7e+05" ] }, - "execution_count": 40, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "residential_xr" ] }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 42, "metadata": {}, "outputs": [], "source": [ - "residential_xr.to_netcdf('/work/hyenergy/output/demand/electricity_demand_residential.nc')" + "residential_xr.to_netcdf(os.path.join(fp, 'electricity_demand_residential.nc')) " ] }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 43, "metadata": {}, "outputs": [], "source": [ - "service_xr.to_netcdf('/work/hyenergy/output/demand/electricity_demand_services.nc')" + "service_xr.to_netcdf(os.path.join(fp, 'electricity_demand_services.nc'))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Plot results" ] }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 44, "metadata": {}, "outputs": [], "source": [ "import calendar" ] }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "residential_plot = residential_xr.copy()" ] }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 46, "metadata": {}, "outputs": [], "source": [ "residential_plot.coords['timestamp'] = (residential_plot.timestamp.dt.month-1) * 24 + residential_plot.timestamp.dt.hour" ] }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 47, "metadata": {}, "outputs": [ { "data": { "text/html": [ - "
    <xarray.Dataset>\n",
    +       "
    \n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
    <xarray.Dataset>\n",
            "Dimensions:        (daytype: 2, timestamp: 288)\n",
            "Coordinates:\n",
            "  * timestamp      (timestamp) int64 0 1 2 3 4 5 6 ... 282 283 284 285 286 287\n",
            "  * daytype        (daytype) object 'weekday' 'weekend'\n",
            "Data variables:\n",
            "    appart         (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n",
            "    maison         (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n",
            "    communal_GVA   (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n",
            "    communal_rest  (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n",
            "    weight         (timestamp, daytype) float64 0.0001138 ... 0.0001427\n",
            "    GVA_annual     float64 2.12e+06\n",
    -       "    rest_annual    float64 7e+05
    " + " rest_annual float64 7e+05
    " ], "text/plain": [ "\n", "Dimensions: (daytype: 2, timestamp: 288)\n", "Coordinates:\n", " * timestamp (timestamp) int64 0 1 2 3 4 5 6 ... 282 283 284 285 286 287\n", " * daytype (daytype) object 'weekday' 'weekend'\n", "Data variables:\n", " appart (timestamp, daytype) float64 162.3 181.7 ... 233.7 227.8\n", " maison (timestamp, daytype) float64 298.2 344.7 ... 377.5 411.3\n", " communal_GVA (timestamp, daytype) float64 241.3 557.0 ... 121.0 302.5\n", " communal_rest (timestamp, daytype) float64 79.66 183.9 75.14 ... 39.96 99.9\n", " weight (timestamp, daytype) float64 0.0001138 ... 0.0001427\n", " GVA_annual float64 2.12e+06\n", " rest_annual float64 7e+05" ] }, - "execution_count": 46, + "execution_count": 47, "metadata": {}, "output_type": "execute_result" } ], "source": [ "residential_plot" ] }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 48, "metadata": { "scrolled": false }, "outputs": [ { "data": { "application/javascript": [ "/* Put everything inside the global mpl namespace */\n", "window.mpl = {};\n", "\n", "\n", "mpl.get_websocket_type = function() {\n", " if (typeof(WebSocket) !== 'undefined') {\n", " return WebSocket;\n", " } else if (typeof(MozWebSocket) !== 'undefined') {\n", " return MozWebSocket;\n", " } else {\n", " alert('Your browser does not have WebSocket support. ' +\n", " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", " 'Firefox 4 and 5 are also supported but you ' +\n", " 'have to enable WebSockets in about:config.');\n", " };\n", "}\n", "\n", "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", " this.id = figure_id;\n", "\n", " this.ws = websocket;\n", "\n", " this.supports_binary = (this.ws.binaryType != undefined);\n", "\n", " if (!this.supports_binary) {\n", " var warnings = document.getElementById(\"mpl-warnings\");\n", " if (warnings) {\n", " warnings.style.display = 'block';\n", " warnings.textContent = (\n", " \"This browser does not support binary websocket messages. \" +\n", " \"Performance may be slow.\");\n", " }\n", " }\n", "\n", " this.imageObj = new Image();\n", "\n", " this.context = undefined;\n", " this.message = undefined;\n", " this.canvas = undefined;\n", " this.rubberband_canvas = undefined;\n", " this.rubberband_context = undefined;\n", " this.format_dropdown = undefined;\n", "\n", " this.image_mode = 'full';\n", "\n", " this.root = $('
    ');\n", " this._root_extra_style(this.root)\n", " this.root.attr('style', 'display: inline-block');\n", "\n", " $(parent_element).append(this.root);\n", "\n", " this._init_header(this);\n", " this._init_canvas(this);\n", " this._init_toolbar(this);\n", "\n", " var fig = this;\n", "\n", " this.waiting = false;\n", "\n", " this.ws.onopen = function () {\n", " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", " fig.send_message(\"send_image_mode\", {});\n", " if (mpl.ratio != 1) {\n", " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", " }\n", " fig.send_message(\"refresh\", {});\n", " }\n", "\n", " this.imageObj.onload = function() {\n", " if (fig.image_mode == 'full') {\n", " // Full images could contain transparency (where diff images\n", " // almost always do), so we need to clear the canvas so that\n", " // there is no ghosting.\n", " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", " }\n", " fig.context.drawImage(fig.imageObj, 0, 0);\n", " };\n", "\n", " this.imageObj.onunload = function() {\n", " fig.ws.close();\n", " }\n", "\n", " this.ws.onmessage = this._make_on_message_function(this);\n", "\n", " this.ondownload = ondownload;\n", "}\n", "\n", "mpl.figure.prototype._init_header = function() {\n", " var titlebar = $(\n", " '
    ');\n", " var titletext = $(\n", " '
    ');\n", " titlebar.append(titletext)\n", " this.root.append(titlebar);\n", " this.header = titletext[0];\n", "}\n", "\n", "\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "\n", "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "mpl.figure.prototype._init_canvas = function() {\n", " var fig = this;\n", "\n", " var canvas_div = $('
    ');\n", "\n", " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", "\n", " function canvas_keyboard_event(event) {\n", " return fig.key_event(event, event['data']);\n", " }\n", "\n", " canvas_div.keydown('key_press', canvas_keyboard_event);\n", " canvas_div.keyup('key_release', canvas_keyboard_event);\n", " this.canvas_div = canvas_div\n", " this._canvas_extra_style(canvas_div)\n", " this.root.append(canvas_div);\n", "\n", " var canvas = $('');\n", " canvas.addClass('mpl-canvas');\n", " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", "\n", " this.canvas = canvas[0];\n", " this.context = canvas[0].getContext(\"2d\");\n", "\n", " var backingStore = this.context.backingStorePixelRatio ||\n", "\tthis.context.webkitBackingStorePixelRatio ||\n", "\tthis.context.mozBackingStorePixelRatio ||\n", "\tthis.context.msBackingStorePixelRatio ||\n", "\tthis.context.oBackingStorePixelRatio ||\n", "\tthis.context.backingStorePixelRatio || 1;\n", "\n", " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", "\n", " var rubberband = $('');\n", " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", "\n", " var pass_mouse_events = true;\n", "\n", " canvas_div.resizable({\n", " start: function(event, ui) {\n", " pass_mouse_events = false;\n", " },\n", " resize: function(event, ui) {\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " stop: function(event, ui) {\n", " pass_mouse_events = true;\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " });\n", "\n", " function mouse_event_fn(event) {\n", " if (pass_mouse_events)\n", " return fig.mouse_event(event, event['data']);\n", " }\n", "\n", " rubberband.mousedown('button_press', mouse_event_fn);\n", " rubberband.mouseup('button_release', mouse_event_fn);\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband.mousemove('motion_notify', mouse_event_fn);\n", "\n", " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", "\n", " canvas_div.on(\"wheel\", function (event) {\n", " event = event.originalEvent;\n", " event['data'] = 'scroll'\n", " if (event.deltaY < 0) {\n", " event.step = 1;\n", " } else {\n", " event.step = -1;\n", " }\n", " mouse_event_fn(event);\n", " });\n", "\n", " canvas_div.append(canvas);\n", " canvas_div.append(rubberband);\n", "\n", " this.rubberband = rubberband;\n", " this.rubberband_canvas = rubberband[0];\n", " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", " this.rubberband_context.strokeStyle = \"#000000\";\n", "\n", " this._resize_canvas = function(width, height) {\n", " // Keep the size of the canvas, canvas container, and rubber band\n", " // canvas in synch.\n", " canvas_div.css('width', width)\n", " canvas_div.css('height', height)\n", "\n", " canvas.attr('width', width * mpl.ratio);\n", " canvas.attr('height', height * mpl.ratio);\n", " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", "\n", " rubberband.attr('width', width);\n", " rubberband.attr('height', height);\n", " }\n", "\n", " // Set the figure to an initial 600x600px, this will subsequently be updated\n", " // upon first draw.\n", " this._resize_canvas(600, 600);\n", "\n", " // Disable right mouse context menu.\n", " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", " return false;\n", " });\n", "\n", " function set_focus () {\n", " canvas.focus();\n", " canvas_div.focus();\n", " }\n", "\n", " window.setTimeout(set_focus, 100);\n", "}\n", "\n", "mpl.figure.prototype._init_toolbar = function() {\n", " var fig = this;\n", "\n", " var nav_element = $('
    ');\n", " nav_element.attr('style', 'width: 100%');\n", " this.root.append(nav_element);\n", "\n", " // Define a callback function for later on.\n", " function toolbar_event(event) {\n", " return fig.toolbar_button_onclick(event['data']);\n", " }\n", " function toolbar_mouse_event(event) {\n", " return fig.toolbar_button_onmouseover(event['data']);\n", " }\n", "\n", " for(var toolbar_ind in mpl.toolbar_items) {\n", " var name = mpl.toolbar_items[toolbar_ind][0];\n", " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", " var image = mpl.toolbar_items[toolbar_ind][2];\n", " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", "\n", " if (!name) {\n", " // put a spacer in here.\n", " continue;\n", " }\n", " var button = $('