Files
remote-sensing/cloud_new/draw/draw_graph.ipynb
T

6237 lines
1.4 MiB
Plaintext
Raw Normal View History

2025-12-21 14:34:18 +07:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "c61a1a84-ca37-4bfb-8935-a21312c11410",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
"*[data-root-id] > * {\n",
" box-sizing: border-box;\n",
" font-family: var(--jp-ui-font-family);\n",
" font-size: var(--jp-ui-font-size1);\n",
" color: var(--vscode-editor-foreground, var(--jp-ui-font-color1));\n",
"}\n",
"\n",
"/* Override VSCode background color */\n",
".cell-output-ipywidget-background:has(\n",
" > .cell-output-ipywidget-background > .lm-Widget > *[data-root-id]\n",
" ),\n",
".cell-output-ipywidget-background:has(> .lm-Widget > *[data-root-id]) {\n",
" background-color: transparent !important;\n",
"}\n",
"</style>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" const force = true;\n",
" const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n",
" const reloading = false;\n",
" const Bokeh = root.Bokeh;\n",
"\n",
" // Set a timeout for this load but only if we are not already initializing\n",
" if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_failed_load = false;\n",
" }\n",
"\n",
" function run_callbacks() {\n",
" try {\n",
" root._bokeh_onload_callbacks.forEach(function(callback) {\n",
" if (callback != null)\n",
" callback();\n",
" });\n",
" } finally {\n",
" delete root._bokeh_onload_callbacks;\n",
" }\n",
" console.debug(\"Bokeh: all callbacks have finished\");\n",
" }\n",
"\n",
" function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n",
" if (css_urls == null) css_urls = [];\n",
" if (js_urls == null) js_urls = [];\n",
" if (js_modules == null) js_modules = [];\n",
" if (js_exports == null) js_exports = {};\n",
"\n",
" root._bokeh_onload_callbacks.push(callback);\n",
"\n",
" if (root._bokeh_is_loading > 0) {\n",
" // Don't load bokeh if it is still initializing\n",
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
" return null;\n",
" } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n",
" // There is nothing to load\n",
" run_callbacks();\n",
" return null;\n",
" }\n",
"\n",
" function on_load() {\n",
" root._bokeh_is_loading--;\n",
" if (root._bokeh_is_loading === 0) {\n",
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
" run_callbacks()\n",
" }\n",
" }\n",
" window._bokeh_on_load = on_load\n",
"\n",
" function on_error(e) {\n",
" const src_el = e.srcElement\n",
" console.error(\"failed to load \" + (src_el.href || src_el.src));\n",
" }\n",
"\n",
" const skip = [];\n",
" if (window.requirejs) {\n",
" window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n",
" root._bokeh_is_loading = css_urls.length + 0;\n",
" } else {\n",
" root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n",
" }\n",
"\n",
" const existing_stylesheets = []\n",
" const links = document.getElementsByTagName('link')\n",
" for (let i = 0; i < links.length; i++) {\n",
" const link = links[i]\n",
" if (link.href != null) {\n",
" existing_stylesheets.push(link.href)\n",
" }\n",
" }\n",
" for (let i = 0; i < css_urls.length; i++) {\n",
" const url = css_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (existing_stylesheets.indexOf(escaped) !== -1) {\n",
" on_load()\n",
" continue;\n",
" }\n",
" const element = document.createElement(\"link\");\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.rel = \"stylesheet\";\n",
" element.type = \"text/css\";\n",
" element.href = url;\n",
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
" document.body.appendChild(element);\n",
" } var existing_scripts = []\n",
" const scripts = document.getElementsByTagName('script')\n",
" for (let i = 0; i < scripts.length; i++) {\n",
" var script = scripts[i]\n",
" if (script.src != null) {\n",
" existing_scripts.push(script.src)\n",
" }\n",
" }\n",
" for (let i = 0; i < js_urls.length; i++) {\n",
" const url = js_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" const element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (let i = 0; i < js_modules.length; i++) {\n",
" const url = js_modules[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (const name in js_exports) {\n",
" const url = js_exports[name];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" element.textContent = `\n",
" import ${name} from \"${url}\"\n",
" window.${name} = ${name}\n",
" window._bokeh_on_load()\n",
" `\n",
" document.head.appendChild(element);\n",
" }\n",
" if (!js_urls.length && !js_modules.length) {\n",
" on_load()\n",
" }\n",
" };\n",
"\n",
" function inject_raw_css(css) {\n",
" const element = document.createElement(\"style\");\n",
" element.appendChild(document.createTextNode(css));\n",
" document.body.appendChild(element);\n",
" }\n",
"\n",
" const js_urls = [\"https://cdn.holoviz.org/panel/1.5.4/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-3.5.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.5.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.5.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.5.2.min.js\", \"https://cdn.holoviz.org/panel/1.5.4/dist/panel.min.js\"];\n",
" const js_modules = [];\n",
" const js_exports = {};\n",
" const css_urls = [];\n",
" const inline_js = [ function(Bokeh) {\n",
" Bokeh.set_log_level(\"info\");\n",
" },\n",
"function(Bokeh) {} // ensure no trailing comma for IE\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" if ((root.Bokeh !== undefined) || (force === true)) {\n",
" for (let i = 0; i < inline_js.length; i++) {\n",
" try {\n",
" inline_js[i].call(root, root.Bokeh);\n",
" } catch(e) {\n",
" if (!reloading) {\n",
" throw e;\n",
" }\n",
" }\n",
" }\n",
" // Cache old bokeh versions\n",
" if (Bokeh != undefined && !reloading) {\n",
" var NewBokeh = root.Bokeh;\n",
" if (Bokeh.versions === undefined) {\n",
" Bokeh.versions = new Map();\n",
" }\n",
" if (NewBokeh.version !== Bokeh.version) {\n",
" Bokeh.versions.set(NewBokeh.version, NewBokeh)\n",
" }\n",
" root.Bokeh = Bokeh;\n",
" }\n",
" } else if (Date.now() < root._bokeh_timeout) {\n",
" setTimeout(run_inline_js, 100);\n",
" } else if (!root._bokeh_failed_load) {\n",
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
" root._bokeh_failed_load = true;\n",
" }\n",
" root._bokeh_is_initializing = false\n",
" }\n",
"\n",
" function load_or_wait() {\n",
" // Implement a backoff loop that tries to ensure we do not load multiple\n",
" // versions of Bokeh and its dependencies at the same time.\n",
" // In recent versions we use the root._bokeh_is_initializing flag\n",
" // to determine whether there is an ongoing attempt to initialize\n",
" // bokeh, however for backward compatibility we also try to ensure\n",
" // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n",
" // before older versions are fully initialized.\n",
" if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n",
" // If the timeout and bokeh was not successfully loaded we reset\n",
" // everything and try loading again\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_is_initializing = false;\n",
" root._bokeh_onload_callbacks = undefined;\n",
" root._bokeh_is_loading = 0\n",
" console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n",
" load_or_wait();\n",
" } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n",
" setTimeout(load_or_wait, 100);\n",
" } else {\n",
" root._bokeh_is_initializing = true\n",
" root._bokeh_onload_callbacks = []\n",
" const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n",
" if (!reloading && !bokeh_loaded) {\n",
" if (root.Bokeh) {\n",
" root.Bokeh = undefined;\n",
" }\n",
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
" }\n",
" load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n",
" console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
" run_inline_js();\n",
" });\n",
" }\n",
" }\n",
" // Give older versions of the autoload script a head-start to ensure\n",
" // they initialize before we start loading newer version.\n",
" setTimeout(load_or_wait, 100)\n",
"}(window));"
],
"application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = true;\n const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n const reloading = false;\n const Bokeh = root.Bokeh;\n\n // Set a timeout for this load but only if we are not already initializing\n if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n // Don't load bokeh if it is still initializing\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n // There is nothing to load\n run_callbacks();\n return null;\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error(e) {\n const src_el = e.srcElement\n console.error(\"failed to load \" + (src_el.href || src_el.src));\n }\n\n const skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n root._bokeh_is_loading = css_urls.length + 0;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n const existing_stylesheets = []\n const links = document.getElementsByTagName('link')\n for (let i = 0; i < links.length; i++) {\n const link = links[i]\n if (link.href != null) {\n existing_stylesheets.push(link.href)\n }\n }\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const escaped = encodeURI(url)\n if (existing_stylesheets.indexOf(escaped) !== -1) {\n on_load()\n continue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } var existing_scripts = []\n const scripts = document.getElementsByTagName('script')\n for (let i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n existing_scripts.push(script.src)\n }\n }\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (let i = 0; i < js_modules.length; i++) {\n const url = js_modules[i];\n con
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
"if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n",
" window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n",
"}\n",
"\n",
"\n",
" function JupyterCommManager() {\n",
" }\n",
"\n",
" JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n",
" if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" comm_manager.register_target(comm_id, function(comm) {\n",
" comm.on_msg(msg_handler);\n",
" });\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n",
" comm.onMsg = msg_handler;\n",
" });\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" console.log(message)\n",
" var content = {data: message.data, comm_id};\n",
" var buffers = []\n",
" for (var buffer of message.buffers || []) {\n",
" buffers.push(new DataView(buffer))\n",
" }\n",
" var metadata = message.metadata || {};\n",
" var msg = {content, buffers, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" })\n",
" }\n",
" }\n",
"\n",
" JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n",
" if (comm_id in window.PyViz.comms) {\n",
" return window.PyViz.comms[comm_id];\n",
" } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n",
" if (msg_handler) {\n",
" comm.on_msg(msg_handler);\n",
" }\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n",
" comm.open();\n",
" if (msg_handler) {\n",
" comm.onMsg = msg_handler;\n",
" }\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" var comm_promise = google.colab.kernel.comms.open(comm_id)\n",
" comm_promise.then((comm) => {\n",
" window.PyViz.comms[comm_id] = comm;\n",
" if (msg_handler) {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" var content = {data: message.data};\n",
" var metadata = message.metadata || {comm_id};\n",
" var msg = {content, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" }) \n",
" var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n",
" return comm_promise.then((comm) => {\n",
" comm.send(data, metadata, buffers, disposeOnDone);\n",
" });\n",
" };\n",
" var comm = {\n",
" send: sendClosure\n",
" };\n",
" }\n",
" window.PyViz.comms[comm_id] = comm;\n",
" return comm;\n",
" }\n",
" window.PyViz.comm_manager = new JupyterCommManager();\n",
" \n",
"\n",
"\n",
"var JS_MIME_TYPE = 'application/javascript';\n",
"var HTML_MIME_TYPE = 'text/html';\n",
"var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n",
"var CLASS_NAME = 'output';\n",
"\n",
"/**\n",
" * Render data to the DOM node\n",
" */\n",
"function render(props, node) {\n",
" var div = document.createElement(\"div\");\n",
" var script = document.createElement(\"script\");\n",
" node.appendChild(div);\n",
" node.appendChild(script);\n",
"}\n",
"\n",
"/**\n",
" * Handle when a new output is added\n",
" */\n",
"function handle_add_output(event, handle) {\n",
" var output_area = handle.output_area;\n",
" var output = handle.output;\n",
" if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
" return\n",
" }\n",
" var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
" var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
" if (id !== undefined) {\n",
" var nchildren = toinsert.length;\n",
" var html_node = toinsert[nchildren-1].children[0];\n",
" html_node.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var scripts = [];\n",
" var nodelist = html_node.querySelectorAll(\"script\");\n",
" for (var i in nodelist) {\n",
" if (nodelist.hasOwnProperty(i)) {\n",
" scripts.push(nodelist[i])\n",
" }\n",
" }\n",
"\n",
" scripts.forEach( function (oldScript) {\n",
" var newScript = document.createElement(\"script\");\n",
" var attrs = [];\n",
" var nodemap = oldScript.attributes;\n",
" for (var j in nodemap) {\n",
" if (nodemap.hasOwnProperty(j)) {\n",
" attrs.push(nodemap[j])\n",
" }\n",
" }\n",
" attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n",
" newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n",
" oldScript.parentNode.replaceChild(newScript, oldScript);\n",
" });\n",
" if (JS_MIME_TYPE in output.data) {\n",
" toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n",
" }\n",
" output_area._hv_plot_id = id;\n",
" if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n",
" window.PyViz.plot_index[id] = Bokeh.index[id];\n",
" } else {\n",
" window.PyViz.plot_index[id] = null;\n",
" }\n",
" } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
" var bk_div = document.createElement(\"div\");\n",
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var script_attrs = bk_div.children[0].attributes;\n",
" for (var i = 0; i < script_attrs.length; i++) {\n",
" toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
" }\n",
" // store reference to server id on output_area\n",
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle when an output is cleared or removed\n",
" */\n",
"function handle_clear_output(event, handle) {\n",
" var id = handle.cell.output_area._hv_plot_id;\n",
" var server_id = handle.cell.output_area._bokeh_server_id;\n",
" if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n",
" var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n",
" if (server_id !== null) {\n",
" comm.send({event_type: 'server_delete', 'id': server_id});\n",
" return;\n",
" } else if (comm !== null) {\n",
" comm.send({event_type: 'delete', 'id': id});\n",
" }\n",
" delete PyViz.plot_index[id];\n",
" if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n",
" var doc = window.Bokeh.index[id].model.document\n",
" doc.clear();\n",
" const i = window.Bokeh.documents.indexOf(doc);\n",
" if (i > -1) {\n",
" window.Bokeh.documents.splice(i, 1);\n",
" }\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle kernel restart event\n",
" */\n",
"function handle_kernel_cleanup(event, handle) {\n",
" delete PyViz.comms[\"hv-extension-comm\"];\n",
" window.PyViz.plot_index = {}\n",
"}\n",
"\n",
"/**\n",
" * Handle update_display_data messages\n",
" */\n",
"function handle_update_output(event, handle) {\n",
" handle_clear_output(event, {cell: {output_area: handle.output_area}})\n",
" handle_add_output(event, handle)\n",
"}\n",
"\n",
"function register_renderer(events, OutputArea) {\n",
" function append_mime(data, metadata, element) {\n",
" // create a DOM node to render to\n",
" var toinsert = this.create_output_subarea(\n",
" metadata,\n",
" CLASS_NAME,\n",
" EXEC_MIME_TYPE\n",
" );\n",
" this.keyboard_manager.register_events(toinsert);\n",
" // Render to node\n",
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
" render(props, toinsert[0]);\n",
" element.append(toinsert);\n",
" return toinsert\n",
" }\n",
"\n",
" events.on('output_added.OutputArea', handle_add_output);\n",
" events.on('output_updated.OutputArea', handle_update_output);\n",
" events.on('clear_output.CodeCell', handle_clear_output);\n",
" events.on('delete.Cell', handle_clear_output);\n",
" events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n",
"\n",
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
" safe: true,\n",
" index: 0\n",
" });\n",
"}\n",
"\n",
"if (window.Jupyter !== undefined) {\n",
" try {\n",
" var events = require('base/js/events');\n",
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
" register_renderer(events, OutputArea);\n",
" }\n",
" } catch(err) {\n",
" }\n",
"}\n"
],
"application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.creat
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/vnd.holoviews_exec.v0+json": "",
"text/html": [
"<div id='5241c75c-67b6-43a8-ae5b-07639967566f'>\n",
" <div id=\"fe640fb2-97df-43f3-b7bd-3c4ae44fb11c\" data-root-id=\"5241c75c-67b6-43a8-ae5b-07639967566f\" style=\"display: contents;\"></div>\n",
"</div>\n",
"<script type=\"application/javascript\">(function(root) {\n",
" var docs_json = {\"1d23d827-506c-4c81-b16b-2e20b9494f89\":{\"version\":\"3.5.2\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"panel.models.browser.BrowserInfo\",\"id\":\"5241c75c-67b6-43a8-ae5b-07639967566f\"},{\"type\":\"object\",\"name\":\"panel.models.comm_manager.CommManager\",\"id\":\"88e08001-8dea-4438-ac3b-05914234f584\",\"attributes\":{\"plot_id\":\"5241c75c-67b6-43a8-ae5b-07639967566f\",\"comm_id\":\"84ef4b84eb4948c6a1b65d5b67f1c7cc\",\"client_comm_id\":\"0849ef9b2d5a4f02a7e0a06964f1803f\"}}],\"defs\":[{\"type\":\"model\",\"name\":\"ReactiveHTML1\"},{\"type\":\"model\",\"name\":\"FlexBox1\",\"properties\":[{\"name\":\"align_content\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"align_items\",\"kind\":\"Any\",\"default\":\"flex-start\"},{\"name\":\"flex_direction\",\"kind\":\"Any\",\"default\":\"row\"},{\"name\":\"flex_wrap\",\"kind\":\"Any\",\"default\":\"wrap\"},{\"name\":\"gap\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"justify_content\",\"kind\":\"Any\",\"default\":\"flex-start\"}]},{\"type\":\"model\",\"name\":\"FloatPanel1\",\"properties\":[{\"name\":\"config\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"contained\",\"kind\":\"Any\",\"default\":true},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"right-top\"},{\"name\":\"offsetx\",\"kind\":\"Any\",\"default\":null},{\"name\":\"offsety\",\"kind\":\"Any\",\"default\":null},{\"name\":\"theme\",\"kind\":\"Any\",\"default\":\"primary\"},{\"name\":\"status\",\"kind\":\"Any\",\"default\":\"normalized\"}]},{\"type\":\"model\",\"name\":\"GridStack1\",\"properties\":[{\"name\":\"mode\",\"kind\":\"Any\",\"default\":\"warn\"},{\"name\":\"ncols\",\"kind\":\"Any\",\"default\":null},{\"name\":\"nrows\",\"kind\":\"Any\",\"default\":null},{\"name\":\"allow_resize\",\"kind\":\"Any\",\"default\":true},{\"name\":\"allow_drag\",\"kind\":\"Any\",\"default\":true},{\"name\":\"state\",\"kind\":\"Any\",\"default\":[]}]},{\"type\":\"model\",\"name\":\"drag1\",\"properties\":[{\"name\":\"slider_width\",\"kind\":\"Any\",\"default\":5},{\"name\":\"slider_color\",\"kind\":\"Any\",\"default\":\"black\"},{\"name\":\"value\",\"kind\":\"Any\",\"default\":50}]},{\"type\":\"model\",\"name\":\"click1\",\"properties\":[{\"name\":\"terminal_output\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"debug_name\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"clears\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"FastWrapper1\",\"properties\":[{\"name\":\"object\",\"kind\":\"Any\",\"default\":null},{\"name\":\"style\",\"kind\":\"Any\",\"default\":null}]},{\"type\":\"model\",\"name\":\"NotificationAreaBase1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0}]},{\"type\":\"model\",\"name\":\"NotificationArea1\",\"properties\":[{\"name\":\"js_events\",\"kind\":\"Any\",\"default\":{\"type\":\"map\"}},{\"name\":\"notifications\",\"kind\":\"Any\",\"default\":[]},{\"name\":\"position\",\"kind\":\"Any\",\"default\":\"bottom-right\"},{\"name\":\"_clear\",\"kind\":\"Any\",\"default\":0},{\"name\":\"types\",\"kind\":\"Any\",\"default\":[{\"type\":\"map\",\"entries\":[[\"type\",\"warning\"],[\"background\",\"#ffc107\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-exclamation-triangle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]},{\"type\":\"map\",\"entries\":[[\"type\",\"info\"],[\"background\",\"#007bff\"],[\"icon\",{\"type\":\"map\",\"entries\":[[\"className\",\"fas fa-info-circle\"],[\"tagName\",\"i\"],[\"color\",\"white\"]]}]]}]}]},{\"type\":\"model\",\"name\":\"Notification\",\"properties\":[{\"name\":\"background\",\"kind\":\"Any\",\"default\":null},{\"name\":\"duration\",\"kind\":\"Any\",\"default\":3000},{\"name\":\"icon\",\"kind\":\"Any\",\"default\":null},{\"name\":\"message\",\"kind\":\"Any\",\"default\":\"\"},{\"name\":\"notification_type\",\"kind\":\"Any\",\"default\":null},{\"name\":\"_destroyed\",\"kind\":\"Any\",\"
" var render_items = [{\"docid\":\"1d23d827-506c-4c81-b16b-2e20b9494f89\",\"roots\":{\"5241c75c-67b6-43a8-ae5b-07639967566f\":\"fe640fb2-97df-43f3-b7bd-3c4ae44fb11c\"},\"root_ids\":[\"5241c75c-67b6-43a8-ae5b-07639967566f\"]}];\n",
" var docs = Object.values(docs_json)\n",
" if (!docs) {\n",
" return\n",
" }\n",
" const py_version = docs[0].version.replace('rc', '-rc.').replace('.dev', '-dev.')\n",
" async function embed_document(root) {\n",
" var Bokeh = get_bokeh(root)\n",
" await Bokeh.embed.embed_items_notebook(docs_json, render_items);\n",
" for (const render_item of render_items) {\n",
" for (const root_id of render_item.root_ids) {\n",
"\tconst id_el = document.getElementById(root_id)\n",
"\tif (id_el.children.length && id_el.children[0].hasAttribute('data-root-id')) {\n",
"\t const root_el = id_el.children[0]\n",
"\t root_el.id = root_el.id + '-rendered'\n",
"\t for (const child of root_el.children) {\n",
" // Ensure JupyterLab does not capture keyboard shortcuts\n",
" // see: https://jupyterlab.readthedocs.io/en/4.1.x/extension/notebook.html#keyboard-interaction-model\n",
"\t child.setAttribute('data-lm-suppress-shortcuts', 'true')\n",
"\t }\n",
"\t}\n",
" }\n",
" }\n",
" }\n",
" function get_bokeh(root) {\n",
" if (root.Bokeh === undefined) {\n",
" return null\n",
" } else if (root.Bokeh.version !== py_version) {\n",
" if (root.Bokeh.versions === undefined || !root.Bokeh.versions.has(py_version)) {\n",
"\treturn null\n",
" }\n",
" return root.Bokeh.versions.get(py_version);\n",
" } else if (root.Bokeh.version === py_version) {\n",
" return root.Bokeh\n",
" }\n",
" return null\n",
" }\n",
" function is_loaded(root) {\n",
" var Bokeh = get_bokeh(root)\n",
" return (Bokeh != null && Bokeh.Panel !== undefined)\n",
" }\n",
" if (is_loaded(root)) {\n",
" embed_document(root);\n",
" } else {\n",
" var attempts = 0;\n",
" var timer = setInterval(function(root) {\n",
" if (is_loaded(root)) {\n",
" clearInterval(timer);\n",
" embed_document(root);\n",
" } else if (document.readyState == \"complete\") {\n",
" attempts++;\n",
" if (attempts > 200) {\n",
" clearInterval(timer);\n",
"\t var Bokeh = get_bokeh(root)\n",
"\t if (Bokeh == null || Bokeh.Panel == null) {\n",
" console.warn(\"Panel: ERROR: Unable to run Panel code because Bokeh or Panel library is missing\");\n",
"\t } else {\n",
"\t console.warn(\"Panel: WARNING: Attempting to render but not all required libraries could be resolved.\")\n",
"\t embed_document(root)\n",
"\t }\n",
" }\n",
" }\n",
" }, 25, root)\n",
" }\n",
"})(window);</script>"
]
},
"metadata": {
"application/vnd.holoviews_exec.v0+json": {
"id": "5241c75c-67b6-43a8-ae5b-07639967566f"
}
},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
"*[data-root-id] > * {\n",
" box-sizing: border-box;\n",
" font-family: var(--jp-ui-font-family);\n",
" font-size: var(--jp-ui-font-size1);\n",
" color: var(--vscode-editor-foreground, var(--jp-ui-font-color1));\n",
"}\n",
"\n",
"/* Override VSCode background color */\n",
".cell-output-ipywidget-background:has(\n",
" > .cell-output-ipywidget-background > .lm-Widget > *[data-root-id]\n",
" ),\n",
".cell-output-ipywidget-background:has(> .lm-Widget > *[data-root-id]) {\n",
" background-color: transparent !important;\n",
"}\n",
"</style>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" const force = false;\n",
" const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n",
" const reloading = true;\n",
" const Bokeh = root.Bokeh;\n",
"\n",
" // Set a timeout for this load but only if we are not already initializing\n",
" if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_failed_load = false;\n",
" }\n",
"\n",
" function run_callbacks() {\n",
" try {\n",
" root._bokeh_onload_callbacks.forEach(function(callback) {\n",
" if (callback != null)\n",
" callback();\n",
" });\n",
" } finally {\n",
" delete root._bokeh_onload_callbacks;\n",
" }\n",
" console.debug(\"Bokeh: all callbacks have finished\");\n",
" }\n",
"\n",
" function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n",
" if (css_urls == null) css_urls = [];\n",
" if (js_urls == null) js_urls = [];\n",
" if (js_modules == null) js_modules = [];\n",
" if (js_exports == null) js_exports = {};\n",
"\n",
" root._bokeh_onload_callbacks.push(callback);\n",
"\n",
" if (root._bokeh_is_loading > 0) {\n",
" // Don't load bokeh if it is still initializing\n",
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
" return null;\n",
" } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n",
" // There is nothing to load\n",
" run_callbacks();\n",
" return null;\n",
" }\n",
"\n",
" function on_load() {\n",
" root._bokeh_is_loading--;\n",
" if (root._bokeh_is_loading === 0) {\n",
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
" run_callbacks()\n",
" }\n",
" }\n",
" window._bokeh_on_load = on_load\n",
"\n",
" function on_error(e) {\n",
" const src_el = e.srcElement\n",
" console.error(\"failed to load \" + (src_el.href || src_el.src));\n",
" }\n",
"\n",
" const skip = [];\n",
" if (window.requirejs) {\n",
" window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n",
" root._bokeh_is_loading = css_urls.length + 0;\n",
" } else {\n",
" root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n",
" }\n",
"\n",
" const existing_stylesheets = []\n",
" const links = document.getElementsByTagName('link')\n",
" for (let i = 0; i < links.length; i++) {\n",
" const link = links[i]\n",
" if (link.href != null) {\n",
" existing_stylesheets.push(link.href)\n",
" }\n",
" }\n",
" for (let i = 0; i < css_urls.length; i++) {\n",
" const url = css_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (existing_stylesheets.indexOf(escaped) !== -1) {\n",
" on_load()\n",
" continue;\n",
" }\n",
" const element = document.createElement(\"link\");\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.rel = \"stylesheet\";\n",
" element.type = \"text/css\";\n",
" element.href = url;\n",
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
" document.body.appendChild(element);\n",
" } var existing_scripts = []\n",
" const scripts = document.getElementsByTagName('script')\n",
" for (let i = 0; i < scripts.length; i++) {\n",
" var script = scripts[i]\n",
" if (script.src != null) {\n",
" existing_scripts.push(script.src)\n",
" }\n",
" }\n",
" for (let i = 0; i < js_urls.length; i++) {\n",
" const url = js_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" const element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (let i = 0; i < js_modules.length; i++) {\n",
" const url = js_modules[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (const name in js_exports) {\n",
" const url = js_exports[name];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" element.textContent = `\n",
" import ${name} from \"${url}\"\n",
" window.${name} = ${name}\n",
" window._bokeh_on_load()\n",
" `\n",
" document.head.appendChild(element);\n",
" }\n",
" if (!js_urls.length && !js_modules.length) {\n",
" on_load()\n",
" }\n",
" };\n",
"\n",
" function inject_raw_css(css) {\n",
" const element = document.createElement(\"style\");\n",
" element.appendChild(document.createTextNode(css));\n",
" document.body.appendChild(element);\n",
" }\n",
"\n",
" const js_urls = [\"https://cdn.holoviz.org/panel/1.5.4/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\"];\n",
" const js_modules = [];\n",
" const js_exports = {};\n",
" const css_urls = [];\n",
" const inline_js = [ function(Bokeh) {\n",
" Bokeh.set_log_level(\"info\");\n",
" },\n",
"function(Bokeh) {} // ensure no trailing comma for IE\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" if ((root.Bokeh !== undefined) || (force === true)) {\n",
" for (let i = 0; i < inline_js.length; i++) {\n",
" try {\n",
" inline_js[i].call(root, root.Bokeh);\n",
" } catch(e) {\n",
" if (!reloading) {\n",
" throw e;\n",
" }\n",
" }\n",
" }\n",
" // Cache old bokeh versions\n",
" if (Bokeh != undefined && !reloading) {\n",
" var NewBokeh = root.Bokeh;\n",
" if (Bokeh.versions === undefined) {\n",
" Bokeh.versions = new Map();\n",
" }\n",
" if (NewBokeh.version !== Bokeh.version) {\n",
" Bokeh.versions.set(NewBokeh.version, NewBokeh)\n",
" }\n",
" root.Bokeh = Bokeh;\n",
" }\n",
" } else if (Date.now() < root._bokeh_timeout) {\n",
" setTimeout(run_inline_js, 100);\n",
" } else if (!root._bokeh_failed_load) {\n",
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
" root._bokeh_failed_load = true;\n",
" }\n",
" root._bokeh_is_initializing = false\n",
" }\n",
"\n",
" function load_or_wait() {\n",
" // Implement a backoff loop that tries to ensure we do not load multiple\n",
" // versions of Bokeh and its dependencies at the same time.\n",
" // In recent versions we use the root._bokeh_is_initializing flag\n",
" // to determine whether there is an ongoing attempt to initialize\n",
" // bokeh, however for backward compatibility we also try to ensure\n",
" // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n",
" // before older versions are fully initialized.\n",
" if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n",
" // If the timeout and bokeh was not successfully loaded we reset\n",
" // everything and try loading again\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_is_initializing = false;\n",
" root._bokeh_onload_callbacks = undefined;\n",
" root._bokeh_is_loading = 0\n",
" console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n",
" load_or_wait();\n",
" } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n",
" setTimeout(load_or_wait, 100);\n",
" } else {\n",
" root._bokeh_is_initializing = true\n",
" root._bokeh_onload_callbacks = []\n",
" const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n",
" if (!reloading && !bokeh_loaded) {\n",
" if (root.Bokeh) {\n",
" root.Bokeh = undefined;\n",
" }\n",
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
" }\n",
" load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n",
" console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
" run_inline_js();\n",
" });\n",
" }\n",
" }\n",
" // Give older versions of the autoload script a head-start to ensure\n",
" // they initialize before we start loading newer version.\n",
" setTimeout(load_or_wait, 100)\n",
"}(window));"
],
"application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = false;\n const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n const reloading = true;\n const Bokeh = root.Bokeh;\n\n // Set a timeout for this load but only if we are not already initializing\n if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n // Don't load bokeh if it is still initializing\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n // There is nothing to load\n run_callbacks();\n return null;\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error(e) {\n const src_el = e.srcElement\n console.error(\"failed to load \" + (src_el.href || src_el.src));\n }\n\n const skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n root._bokeh_is_loading = css_urls.length + 0;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n const existing_stylesheets = []\n const links = document.getElementsByTagName('link')\n for (let i = 0; i < links.length; i++) {\n const link = links[i]\n if (link.href != null) {\n existing_stylesheets.push(link.href)\n }\n }\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const escaped = encodeURI(url)\n if (existing_stylesheets.indexOf(escaped) !== -1) {\n on_load()\n continue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } var existing_scripts = []\n const scripts = document.getElementsByTagName('script')\n for (let i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n existing_scripts.push(script.src)\n }\n }\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (let i = 0; i < js_modules.length; i++) {\n const url = js_modules[i];\n con
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
"if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n",
" window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n",
"}\n",
"\n",
"\n",
" function JupyterCommManager() {\n",
" }\n",
"\n",
" JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n",
" if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" comm_manager.register_target(comm_id, function(comm) {\n",
" comm.on_msg(msg_handler);\n",
" });\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n",
" comm.onMsg = msg_handler;\n",
" });\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" console.log(message)\n",
" var content = {data: message.data, comm_id};\n",
" var buffers = []\n",
" for (var buffer of message.buffers || []) {\n",
" buffers.push(new DataView(buffer))\n",
" }\n",
" var metadata = message.metadata || {};\n",
" var msg = {content, buffers, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" })\n",
" }\n",
" }\n",
"\n",
" JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n",
" if (comm_id in window.PyViz.comms) {\n",
" return window.PyViz.comms[comm_id];\n",
" } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n",
" if (msg_handler) {\n",
" comm.on_msg(msg_handler);\n",
" }\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n",
" comm.open();\n",
" if (msg_handler) {\n",
" comm.onMsg = msg_handler;\n",
" }\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" var comm_promise = google.colab.kernel.comms.open(comm_id)\n",
" comm_promise.then((comm) => {\n",
" window.PyViz.comms[comm_id] = comm;\n",
" if (msg_handler) {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" var content = {data: message.data};\n",
" var metadata = message.metadata || {comm_id};\n",
" var msg = {content, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" }) \n",
" var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n",
" return comm_promise.then((comm) => {\n",
" comm.send(data, metadata, buffers, disposeOnDone);\n",
" });\n",
" };\n",
" var comm = {\n",
" send: sendClosure\n",
" };\n",
" }\n",
" window.PyViz.comms[comm_id] = comm;\n",
" return comm;\n",
" }\n",
" window.PyViz.comm_manager = new JupyterCommManager();\n",
" \n",
"\n",
"\n",
"var JS_MIME_TYPE = 'application/javascript';\n",
"var HTML_MIME_TYPE = 'text/html';\n",
"var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n",
"var CLASS_NAME = 'output';\n",
"\n",
"/**\n",
" * Render data to the DOM node\n",
" */\n",
"function render(props, node) {\n",
" var div = document.createElement(\"div\");\n",
" var script = document.createElement(\"script\");\n",
" node.appendChild(div);\n",
" node.appendChild(script);\n",
"}\n",
"\n",
"/**\n",
" * Handle when a new output is added\n",
" */\n",
"function handle_add_output(event, handle) {\n",
" var output_area = handle.output_area;\n",
" var output = handle.output;\n",
" if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
" return\n",
" }\n",
" var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
" var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
" if (id !== undefined) {\n",
" var nchildren = toinsert.length;\n",
" var html_node = toinsert[nchildren-1].children[0];\n",
" html_node.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var scripts = [];\n",
" var nodelist = html_node.querySelectorAll(\"script\");\n",
" for (var i in nodelist) {\n",
" if (nodelist.hasOwnProperty(i)) {\n",
" scripts.push(nodelist[i])\n",
" }\n",
" }\n",
"\n",
" scripts.forEach( function (oldScript) {\n",
" var newScript = document.createElement(\"script\");\n",
" var attrs = [];\n",
" var nodemap = oldScript.attributes;\n",
" for (var j in nodemap) {\n",
" if (nodemap.hasOwnProperty(j)) {\n",
" attrs.push(nodemap[j])\n",
" }\n",
" }\n",
" attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n",
" newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n",
" oldScript.parentNode.replaceChild(newScript, oldScript);\n",
" });\n",
" if (JS_MIME_TYPE in output.data) {\n",
" toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n",
" }\n",
" output_area._hv_plot_id = id;\n",
" if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n",
" window.PyViz.plot_index[id] = Bokeh.index[id];\n",
" } else {\n",
" window.PyViz.plot_index[id] = null;\n",
" }\n",
" } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
" var bk_div = document.createElement(\"div\");\n",
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var script_attrs = bk_div.children[0].attributes;\n",
" for (var i = 0; i < script_attrs.length; i++) {\n",
" toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
" }\n",
" // store reference to server id on output_area\n",
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle when an output is cleared or removed\n",
" */\n",
"function handle_clear_output(event, handle) {\n",
" var id = handle.cell.output_area._hv_plot_id;\n",
" var server_id = handle.cell.output_area._bokeh_server_id;\n",
" if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n",
" var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n",
" if (server_id !== null) {\n",
" comm.send({event_type: 'server_delete', 'id': server_id});\n",
" return;\n",
" } else if (comm !== null) {\n",
" comm.send({event_type: 'delete', 'id': id});\n",
" }\n",
" delete PyViz.plot_index[id];\n",
" if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n",
" var doc = window.Bokeh.index[id].model.document\n",
" doc.clear();\n",
" const i = window.Bokeh.documents.indexOf(doc);\n",
" if (i > -1) {\n",
" window.Bokeh.documents.splice(i, 1);\n",
" }\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle kernel restart event\n",
" */\n",
"function handle_kernel_cleanup(event, handle) {\n",
" delete PyViz.comms[\"hv-extension-comm\"];\n",
" window.PyViz.plot_index = {}\n",
"}\n",
"\n",
"/**\n",
" * Handle update_display_data messages\n",
" */\n",
"function handle_update_output(event, handle) {\n",
" handle_clear_output(event, {cell: {output_area: handle.output_area}})\n",
" handle_add_output(event, handle)\n",
"}\n",
"\n",
"function register_renderer(events, OutputArea) {\n",
" function append_mime(data, metadata, element) {\n",
" // create a DOM node to render to\n",
" var toinsert = this.create_output_subarea(\n",
" metadata,\n",
" CLASS_NAME,\n",
" EXEC_MIME_TYPE\n",
" );\n",
" this.keyboard_manager.register_events(toinsert);\n",
" // Render to node\n",
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
" render(props, toinsert[0]);\n",
" element.append(toinsert);\n",
" return toinsert\n",
" }\n",
"\n",
" events.on('output_added.OutputArea', handle_add_output);\n",
" events.on('output_updated.OutputArea', handle_update_output);\n",
" events.on('clear_output.CodeCell', handle_clear_output);\n",
" events.on('delete.Cell', handle_clear_output);\n",
" events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n",
"\n",
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
" safe: true,\n",
" index: 0\n",
" });\n",
"}\n",
"\n",
"if (window.Jupyter !== undefined) {\n",
" try {\n",
" var events = require('base/js/events');\n",
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
" register_renderer(events, OutputArea);\n",
" }\n",
" } catch(err) {\n",
" }\n",
"}\n"
],
"application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.creat
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
"*[data-root-id] > * {\n",
" box-sizing: border-box;\n",
" font-family: var(--jp-ui-font-family);\n",
" font-size: var(--jp-ui-font-size1);\n",
" color: var(--vscode-editor-foreground, var(--jp-ui-font-color1));\n",
"}\n",
"\n",
"/* Override VSCode background color */\n",
".cell-output-ipywidget-background:has(\n",
" > .cell-output-ipywidget-background > .lm-Widget > *[data-root-id]\n",
" ),\n",
".cell-output-ipywidget-background:has(> .lm-Widget > *[data-root-id]) {\n",
" background-color: transparent !important;\n",
"}\n",
"</style>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" const force = false;\n",
" const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n",
" const reloading = true;\n",
" const Bokeh = root.Bokeh;\n",
"\n",
" // Set a timeout for this load but only if we are not already initializing\n",
" if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_failed_load = false;\n",
" }\n",
"\n",
" function run_callbacks() {\n",
" try {\n",
" root._bokeh_onload_callbacks.forEach(function(callback) {\n",
" if (callback != null)\n",
" callback();\n",
" });\n",
" } finally {\n",
" delete root._bokeh_onload_callbacks;\n",
" }\n",
" console.debug(\"Bokeh: all callbacks have finished\");\n",
" }\n",
"\n",
" function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n",
" if (css_urls == null) css_urls = [];\n",
" if (js_urls == null) js_urls = [];\n",
" if (js_modules == null) js_modules = [];\n",
" if (js_exports == null) js_exports = {};\n",
"\n",
" root._bokeh_onload_callbacks.push(callback);\n",
"\n",
" if (root._bokeh_is_loading > 0) {\n",
" // Don't load bokeh if it is still initializing\n",
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
" return null;\n",
" } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n",
" // There is nothing to load\n",
" run_callbacks();\n",
" return null;\n",
" }\n",
"\n",
" function on_load() {\n",
" root._bokeh_is_loading--;\n",
" if (root._bokeh_is_loading === 0) {\n",
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
" run_callbacks()\n",
" }\n",
" }\n",
" window._bokeh_on_load = on_load\n",
"\n",
" function on_error(e) {\n",
" const src_el = e.srcElement\n",
" console.error(\"failed to load \" + (src_el.href || src_el.src));\n",
" }\n",
"\n",
" const skip = [];\n",
" if (window.requirejs) {\n",
" window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n",
" root._bokeh_is_loading = css_urls.length + 0;\n",
" } else {\n",
" root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n",
" }\n",
"\n",
" const existing_stylesheets = []\n",
" const links = document.getElementsByTagName('link')\n",
" for (let i = 0; i < links.length; i++) {\n",
" const link = links[i]\n",
" if (link.href != null) {\n",
" existing_stylesheets.push(link.href)\n",
" }\n",
" }\n",
" for (let i = 0; i < css_urls.length; i++) {\n",
" const url = css_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (existing_stylesheets.indexOf(escaped) !== -1) {\n",
" on_load()\n",
" continue;\n",
" }\n",
" const element = document.createElement(\"link\");\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.rel = \"stylesheet\";\n",
" element.type = \"text/css\";\n",
" element.href = url;\n",
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
" document.body.appendChild(element);\n",
" } var existing_scripts = []\n",
" const scripts = document.getElementsByTagName('script')\n",
" for (let i = 0; i < scripts.length; i++) {\n",
" var script = scripts[i]\n",
" if (script.src != null) {\n",
" existing_scripts.push(script.src)\n",
" }\n",
" }\n",
" for (let i = 0; i < js_urls.length; i++) {\n",
" const url = js_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" const element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (let i = 0; i < js_modules.length; i++) {\n",
" const url = js_modules[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (const name in js_exports) {\n",
" const url = js_exports[name];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" element.textContent = `\n",
" import ${name} from \"${url}\"\n",
" window.${name} = ${name}\n",
" window._bokeh_on_load()\n",
" `\n",
" document.head.appendChild(element);\n",
" }\n",
" if (!js_urls.length && !js_modules.length) {\n",
" on_load()\n",
" }\n",
" };\n",
"\n",
" function inject_raw_css(css) {\n",
" const element = document.createElement(\"style\");\n",
" element.appendChild(document.createTextNode(css));\n",
" document.body.appendChild(element);\n",
" }\n",
"\n",
" const js_urls = [\"https://cdn.holoviz.org/panel/1.5.4/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\"];\n",
" const js_modules = [];\n",
" const js_exports = {};\n",
" const css_urls = [];\n",
" const inline_js = [ function(Bokeh) {\n",
" Bokeh.set_log_level(\"info\");\n",
" },\n",
"function(Bokeh) {} // ensure no trailing comma for IE\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" if ((root.Bokeh !== undefined) || (force === true)) {\n",
" for (let i = 0; i < inline_js.length; i++) {\n",
" try {\n",
" inline_js[i].call(root, root.Bokeh);\n",
" } catch(e) {\n",
" if (!reloading) {\n",
" throw e;\n",
" }\n",
" }\n",
" }\n",
" // Cache old bokeh versions\n",
" if (Bokeh != undefined && !reloading) {\n",
" var NewBokeh = root.Bokeh;\n",
" if (Bokeh.versions === undefined) {\n",
" Bokeh.versions = new Map();\n",
" }\n",
" if (NewBokeh.version !== Bokeh.version) {\n",
" Bokeh.versions.set(NewBokeh.version, NewBokeh)\n",
" }\n",
" root.Bokeh = Bokeh;\n",
" }\n",
" } else if (Date.now() < root._bokeh_timeout) {\n",
" setTimeout(run_inline_js, 100);\n",
" } else if (!root._bokeh_failed_load) {\n",
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
" root._bokeh_failed_load = true;\n",
" }\n",
" root._bokeh_is_initializing = false\n",
" }\n",
"\n",
" function load_or_wait() {\n",
" // Implement a backoff loop that tries to ensure we do not load multiple\n",
" // versions of Bokeh and its dependencies at the same time.\n",
" // In recent versions we use the root._bokeh_is_initializing flag\n",
" // to determine whether there is an ongoing attempt to initialize\n",
" // bokeh, however for backward compatibility we also try to ensure\n",
" // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n",
" // before older versions are fully initialized.\n",
" if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n",
" // If the timeout and bokeh was not successfully loaded we reset\n",
" // everything and try loading again\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_is_initializing = false;\n",
" root._bokeh_onload_callbacks = undefined;\n",
" root._bokeh_is_loading = 0\n",
" console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n",
" load_or_wait();\n",
" } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n",
" setTimeout(load_or_wait, 100);\n",
" } else {\n",
" root._bokeh_is_initializing = true\n",
" root._bokeh_onload_callbacks = []\n",
" const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n",
" if (!reloading && !bokeh_loaded) {\n",
" if (root.Bokeh) {\n",
" root.Bokeh = undefined;\n",
" }\n",
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
" }\n",
" load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n",
" console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
" run_inline_js();\n",
" });\n",
" }\n",
" }\n",
" // Give older versions of the autoload script a head-start to ensure\n",
" // they initialize before we start loading newer version.\n",
" setTimeout(load_or_wait, 100)\n",
"}(window));"
],
"application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = false;\n const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n const reloading = true;\n const Bokeh = root.Bokeh;\n\n // Set a timeout for this load but only if we are not already initializing\n if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n // Don't load bokeh if it is still initializing\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n // There is nothing to load\n run_callbacks();\n return null;\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error(e) {\n const src_el = e.srcElement\n console.error(\"failed to load \" + (src_el.href || src_el.src));\n }\n\n const skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n root._bokeh_is_loading = css_urls.length + 0;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n const existing_stylesheets = []\n const links = document.getElementsByTagName('link')\n for (let i = 0; i < links.length; i++) {\n const link = links[i]\n if (link.href != null) {\n existing_stylesheets.push(link.href)\n }\n }\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const escaped = encodeURI(url)\n if (existing_stylesheets.indexOf(escaped) !== -1) {\n on_load()\n continue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } var existing_scripts = []\n const scripts = document.getElementsByTagName('script')\n for (let i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n existing_scripts.push(script.src)\n }\n }\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (let i = 0; i < js_modules.length; i++) {\n const url = js_modules[i];\n con
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
"if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n",
" window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n",
"}\n",
"\n",
"\n",
" function JupyterCommManager() {\n",
" }\n",
"\n",
" JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n",
" if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" comm_manager.register_target(comm_id, function(comm) {\n",
" comm.on_msg(msg_handler);\n",
" });\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n",
" comm.onMsg = msg_handler;\n",
" });\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" console.log(message)\n",
" var content = {data: message.data, comm_id};\n",
" var buffers = []\n",
" for (var buffer of message.buffers || []) {\n",
" buffers.push(new DataView(buffer))\n",
" }\n",
" var metadata = message.metadata || {};\n",
" var msg = {content, buffers, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" })\n",
" }\n",
" }\n",
"\n",
" JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n",
" if (comm_id in window.PyViz.comms) {\n",
" return window.PyViz.comms[comm_id];\n",
" } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n",
" if (msg_handler) {\n",
" comm.on_msg(msg_handler);\n",
" }\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n",
" comm.open();\n",
" if (msg_handler) {\n",
" comm.onMsg = msg_handler;\n",
" }\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" var comm_promise = google.colab.kernel.comms.open(comm_id)\n",
" comm_promise.then((comm) => {\n",
" window.PyViz.comms[comm_id] = comm;\n",
" if (msg_handler) {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" var content = {data: message.data};\n",
" var metadata = message.metadata || {comm_id};\n",
" var msg = {content, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" }) \n",
" var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n",
" return comm_promise.then((comm) => {\n",
" comm.send(data, metadata, buffers, disposeOnDone);\n",
" });\n",
" };\n",
" var comm = {\n",
" send: sendClosure\n",
" };\n",
" }\n",
" window.PyViz.comms[comm_id] = comm;\n",
" return comm;\n",
" }\n",
" window.PyViz.comm_manager = new JupyterCommManager();\n",
" \n",
"\n",
"\n",
"var JS_MIME_TYPE = 'application/javascript';\n",
"var HTML_MIME_TYPE = 'text/html';\n",
"var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n",
"var CLASS_NAME = 'output';\n",
"\n",
"/**\n",
" * Render data to the DOM node\n",
" */\n",
"function render(props, node) {\n",
" var div = document.createElement(\"div\");\n",
" var script = document.createElement(\"script\");\n",
" node.appendChild(div);\n",
" node.appendChild(script);\n",
"}\n",
"\n",
"/**\n",
" * Handle when a new output is added\n",
" */\n",
"function handle_add_output(event, handle) {\n",
" var output_area = handle.output_area;\n",
" var output = handle.output;\n",
" if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
" return\n",
" }\n",
" var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
" var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
" if (id !== undefined) {\n",
" var nchildren = toinsert.length;\n",
" var html_node = toinsert[nchildren-1].children[0];\n",
" html_node.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var scripts = [];\n",
" var nodelist = html_node.querySelectorAll(\"script\");\n",
" for (var i in nodelist) {\n",
" if (nodelist.hasOwnProperty(i)) {\n",
" scripts.push(nodelist[i])\n",
" }\n",
" }\n",
"\n",
" scripts.forEach( function (oldScript) {\n",
" var newScript = document.createElement(\"script\");\n",
" var attrs = [];\n",
" var nodemap = oldScript.attributes;\n",
" for (var j in nodemap) {\n",
" if (nodemap.hasOwnProperty(j)) {\n",
" attrs.push(nodemap[j])\n",
" }\n",
" }\n",
" attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n",
" newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n",
" oldScript.parentNode.replaceChild(newScript, oldScript);\n",
" });\n",
" if (JS_MIME_TYPE in output.data) {\n",
" toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n",
" }\n",
" output_area._hv_plot_id = id;\n",
" if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n",
" window.PyViz.plot_index[id] = Bokeh.index[id];\n",
" } else {\n",
" window.PyViz.plot_index[id] = null;\n",
" }\n",
" } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
" var bk_div = document.createElement(\"div\");\n",
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var script_attrs = bk_div.children[0].attributes;\n",
" for (var i = 0; i < script_attrs.length; i++) {\n",
" toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
" }\n",
" // store reference to server id on output_area\n",
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle when an output is cleared or removed\n",
" */\n",
"function handle_clear_output(event, handle) {\n",
" var id = handle.cell.output_area._hv_plot_id;\n",
" var server_id = handle.cell.output_area._bokeh_server_id;\n",
" if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n",
" var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n",
" if (server_id !== null) {\n",
" comm.send({event_type: 'server_delete', 'id': server_id});\n",
" return;\n",
" } else if (comm !== null) {\n",
" comm.send({event_type: 'delete', 'id': id});\n",
" }\n",
" delete PyViz.plot_index[id];\n",
" if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n",
" var doc = window.Bokeh.index[id].model.document\n",
" doc.clear();\n",
" const i = window.Bokeh.documents.indexOf(doc);\n",
" if (i > -1) {\n",
" window.Bokeh.documents.splice(i, 1);\n",
" }\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle kernel restart event\n",
" */\n",
"function handle_kernel_cleanup(event, handle) {\n",
" delete PyViz.comms[\"hv-extension-comm\"];\n",
" window.PyViz.plot_index = {}\n",
"}\n",
"\n",
"/**\n",
" * Handle update_display_data messages\n",
" */\n",
"function handle_update_output(event, handle) {\n",
" handle_clear_output(event, {cell: {output_area: handle.output_area}})\n",
" handle_add_output(event, handle)\n",
"}\n",
"\n",
"function register_renderer(events, OutputArea) {\n",
" function append_mime(data, metadata, element) {\n",
" // create a DOM node to render to\n",
" var toinsert = this.create_output_subarea(\n",
" metadata,\n",
" CLASS_NAME,\n",
" EXEC_MIME_TYPE\n",
" );\n",
" this.keyboard_manager.register_events(toinsert);\n",
" // Render to node\n",
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
" render(props, toinsert[0]);\n",
" element.append(toinsert);\n",
" return toinsert\n",
" }\n",
"\n",
" events.on('output_added.OutputArea', handle_add_output);\n",
" events.on('output_updated.OutputArea', handle_update_output);\n",
" events.on('clear_output.CodeCell', handle_clear_output);\n",
" events.on('delete.Cell', handle_clear_output);\n",
" events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n",
"\n",
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
" safe: true,\n",
" index: 0\n",
" });\n",
"}\n",
"\n",
"if (window.Jupyter !== undefined) {\n",
" try {\n",
" var events = require('base/js/events');\n",
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
" register_renderer(events, OutputArea);\n",
" }\n",
" } catch(err) {\n",
" }\n",
"}\n"
],
"application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.creat
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
"*[data-root-id] > * {\n",
" box-sizing: border-box;\n",
" font-family: var(--jp-ui-font-family);\n",
" font-size: var(--jp-ui-font-size1);\n",
" color: var(--vscode-editor-foreground, var(--jp-ui-font-color1));\n",
"}\n",
"\n",
"/* Override VSCode background color */\n",
".cell-output-ipywidget-background:has(\n",
" > .cell-output-ipywidget-background > .lm-Widget > *[data-root-id]\n",
" ),\n",
".cell-output-ipywidget-background:has(> .lm-Widget > *[data-root-id]) {\n",
" background-color: transparent !important;\n",
"}\n",
"</style>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" const force = false;\n",
" const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n",
" const reloading = true;\n",
" const Bokeh = root.Bokeh;\n",
"\n",
" // Set a timeout for this load but only if we are not already initializing\n",
" if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_failed_load = false;\n",
" }\n",
"\n",
" function run_callbacks() {\n",
" try {\n",
" root._bokeh_onload_callbacks.forEach(function(callback) {\n",
" if (callback != null)\n",
" callback();\n",
" });\n",
" } finally {\n",
" delete root._bokeh_onload_callbacks;\n",
" }\n",
" console.debug(\"Bokeh: all callbacks have finished\");\n",
" }\n",
"\n",
" function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n",
" if (css_urls == null) css_urls = [];\n",
" if (js_urls == null) js_urls = [];\n",
" if (js_modules == null) js_modules = [];\n",
" if (js_exports == null) js_exports = {};\n",
"\n",
" root._bokeh_onload_callbacks.push(callback);\n",
"\n",
" if (root._bokeh_is_loading > 0) {\n",
" // Don't load bokeh if it is still initializing\n",
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n",
" return null;\n",
" } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n",
" // There is nothing to load\n",
" run_callbacks();\n",
" return null;\n",
" }\n",
"\n",
" function on_load() {\n",
" root._bokeh_is_loading--;\n",
" if (root._bokeh_is_loading === 0) {\n",
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n",
" run_callbacks()\n",
" }\n",
" }\n",
" window._bokeh_on_load = on_load\n",
"\n",
" function on_error(e) {\n",
" const src_el = e.srcElement\n",
" console.error(\"failed to load \" + (src_el.href || src_el.src));\n",
" }\n",
"\n",
" const skip = [];\n",
" if (window.requirejs) {\n",
" window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n",
" root._bokeh_is_loading = css_urls.length + 0;\n",
" } else {\n",
" root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n",
" }\n",
"\n",
" const existing_stylesheets = []\n",
" const links = document.getElementsByTagName('link')\n",
" for (let i = 0; i < links.length; i++) {\n",
" const link = links[i]\n",
" if (link.href != null) {\n",
" existing_stylesheets.push(link.href)\n",
" }\n",
" }\n",
" for (let i = 0; i < css_urls.length; i++) {\n",
" const url = css_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (existing_stylesheets.indexOf(escaped) !== -1) {\n",
" on_load()\n",
" continue;\n",
" }\n",
" const element = document.createElement(\"link\");\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.rel = \"stylesheet\";\n",
" element.type = \"text/css\";\n",
" element.href = url;\n",
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n",
" document.body.appendChild(element);\n",
" } var existing_scripts = []\n",
" const scripts = document.getElementsByTagName('script')\n",
" for (let i = 0; i < scripts.length; i++) {\n",
" var script = scripts[i]\n",
" if (script.src != null) {\n",
" existing_scripts.push(script.src)\n",
" }\n",
" }\n",
" for (let i = 0; i < js_urls.length; i++) {\n",
" const url = js_urls[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" const element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (let i = 0; i < js_modules.length; i++) {\n",
" const url = js_modules[i];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onload = on_load;\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.src = url;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.head.appendChild(element);\n",
" }\n",
" for (const name in js_exports) {\n",
" const url = js_exports[name];\n",
" const escaped = encodeURI(url)\n",
" if (skip.indexOf(escaped) >= 0 || root[name] != null) {\n",
" if (!window.requirejs) {\n",
" on_load();\n",
" }\n",
" continue;\n",
" }\n",
" var element = document.createElement('script');\n",
" element.onerror = on_error;\n",
" element.async = false;\n",
" element.type = \"module\";\n",
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" element.textContent = `\n",
" import ${name} from \"${url}\"\n",
" window.${name} = ${name}\n",
" window._bokeh_on_load()\n",
" `\n",
" document.head.appendChild(element);\n",
" }\n",
" if (!js_urls.length && !js_modules.length) {\n",
" on_load()\n",
" }\n",
" };\n",
"\n",
" function inject_raw_css(css) {\n",
" const element = document.createElement(\"style\");\n",
" element.appendChild(document.createTextNode(css));\n",
" document.body.appendChild(element);\n",
" }\n",
"\n",
" const js_urls = [\"https://cdn.holoviz.org/panel/1.5.4/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\"];\n",
" const js_modules = [];\n",
" const js_exports = {};\n",
" const css_urls = [];\n",
" const inline_js = [ function(Bokeh) {\n",
" Bokeh.set_log_level(\"info\");\n",
" },\n",
"function(Bokeh) {} // ensure no trailing comma for IE\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" if ((root.Bokeh !== undefined) || (force === true)) {\n",
" for (let i = 0; i < inline_js.length; i++) {\n",
" try {\n",
" inline_js[i].call(root, root.Bokeh);\n",
" } catch(e) {\n",
" if (!reloading) {\n",
" throw e;\n",
" }\n",
" }\n",
" }\n",
" // Cache old bokeh versions\n",
" if (Bokeh != undefined && !reloading) {\n",
" var NewBokeh = root.Bokeh;\n",
" if (Bokeh.versions === undefined) {\n",
" Bokeh.versions = new Map();\n",
" }\n",
" if (NewBokeh.version !== Bokeh.version) {\n",
" Bokeh.versions.set(NewBokeh.version, NewBokeh)\n",
" }\n",
" root.Bokeh = Bokeh;\n",
" }\n",
" } else if (Date.now() < root._bokeh_timeout) {\n",
" setTimeout(run_inline_js, 100);\n",
" } else if (!root._bokeh_failed_load) {\n",
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
" root._bokeh_failed_load = true;\n",
" }\n",
" root._bokeh_is_initializing = false\n",
" }\n",
"\n",
" function load_or_wait() {\n",
" // Implement a backoff loop that tries to ensure we do not load multiple\n",
" // versions of Bokeh and its dependencies at the same time.\n",
" // In recent versions we use the root._bokeh_is_initializing flag\n",
" // to determine whether there is an ongoing attempt to initialize\n",
" // bokeh, however for backward compatibility we also try to ensure\n",
" // that we do not start loading a newer (Panel>=1.0 and Bokeh>3) version\n",
" // before older versions are fully initialized.\n",
" if (root._bokeh_is_initializing && Date.now() > root._bokeh_timeout) {\n",
" // If the timeout and bokeh was not successfully loaded we reset\n",
" // everything and try loading again\n",
" root._bokeh_timeout = Date.now() + 5000;\n",
" root._bokeh_is_initializing = false;\n",
" root._bokeh_onload_callbacks = undefined;\n",
" root._bokeh_is_loading = 0\n",
" console.log(\"Bokeh: BokehJS was loaded multiple times but one version failed to initialize.\");\n",
" load_or_wait();\n",
" } else if (root._bokeh_is_initializing || (typeof root._bokeh_is_initializing === \"undefined\" && root._bokeh_onload_callbacks !== undefined)) {\n",
" setTimeout(load_or_wait, 100);\n",
" } else {\n",
" root._bokeh_is_initializing = true\n",
" root._bokeh_onload_callbacks = []\n",
" const bokeh_loaded = root.Bokeh != null && (root.Bokeh.version === py_version || (root.Bokeh.versions !== undefined && root.Bokeh.versions.has(py_version)));\n",
" if (!reloading && !bokeh_loaded) {\n",
" if (root.Bokeh) {\n",
" root.Bokeh = undefined;\n",
" }\n",
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
" }\n",
" load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n",
" console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
" run_inline_js();\n",
" });\n",
" }\n",
" }\n",
" // Give older versions of the autoload script a head-start to ensure\n",
" // they initialize before we start loading newer version.\n",
" setTimeout(load_or_wait, 100)\n",
"}(window));"
],
"application/vnd.holoviews_load.v0+json": "(function(root) {\n function now() {\n return new Date();\n }\n\n const force = false;\n const py_version = '3.5.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n const reloading = true;\n const Bokeh = root.Bokeh;\n\n // Set a timeout for this load but only if we are not already initializing\n if (typeof (root._bokeh_timeout) === \"undefined\" || (force || !root._bokeh_is_initializing)) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) {\n if (callback != null)\n callback();\n });\n } finally {\n delete root._bokeh_onload_callbacks;\n }\n console.debug(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(css_urls, js_urls, js_modules, js_exports, callback) {\n if (css_urls == null) css_urls = [];\n if (js_urls == null) js_urls = [];\n if (js_modules == null) js_modules = [];\n if (js_exports == null) js_exports = {};\n\n root._bokeh_onload_callbacks.push(callback);\n\n if (root._bokeh_is_loading > 0) {\n // Don't load bokeh if it is still initializing\n console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n } else if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n // There is nothing to load\n run_callbacks();\n return null;\n }\n\n function on_load() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n run_callbacks()\n }\n }\n window._bokeh_on_load = on_load\n\n function on_error(e) {\n const src_el = e.srcElement\n console.error(\"failed to load \" + (src_el.href || src_el.src));\n }\n\n const skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {}, 'shim': {}});\n root._bokeh_is_loading = css_urls.length + 0;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n const existing_stylesheets = []\n const links = document.getElementsByTagName('link')\n for (let i = 0; i < links.length; i++) {\n const link = links[i]\n if (link.href != null) {\n existing_stylesheets.push(link.href)\n }\n }\n for (let i = 0; i < css_urls.length; i++) {\n const url = css_urls[i];\n const escaped = encodeURI(url)\n if (existing_stylesheets.indexOf(escaped) !== -1) {\n on_load()\n continue;\n }\n const element = document.createElement(\"link\");\n element.onload = on_load;\n element.onerror = on_error;\n element.rel = \"stylesheet\";\n element.type = \"text/css\";\n element.href = url;\n console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n document.body.appendChild(element);\n } var existing_scripts = []\n const scripts = document.getElementsByTagName('script')\n for (let i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n existing_scripts.push(script.src)\n }\n }\n for (let i = 0; i < js_urls.length; i++) {\n const url = js_urls[i];\n const escaped = encodeURI(url)\n if (skip.indexOf(escaped) !== -1 || existing_scripts.indexOf(escaped) !== -1) {\n if (!window.requirejs) {\n on_load();\n }\n continue;\n }\n const element = document.createElement('script');\n element.onload = on_load;\n element.onerror = on_error;\n element.async = false;\n element.src = url;\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (let i = 0; i < js_modules.length; i++) {\n const url = js_modules[i];\n con
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
"if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n",
" window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n",
"}\n",
"\n",
"\n",
" function JupyterCommManager() {\n",
" }\n",
"\n",
" JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n",
" if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" comm_manager.register_target(comm_id, function(comm) {\n",
" comm.on_msg(msg_handler);\n",
" });\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n",
" comm.onMsg = msg_handler;\n",
" });\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" console.log(message)\n",
" var content = {data: message.data, comm_id};\n",
" var buffers = []\n",
" for (var buffer of message.buffers || []) {\n",
" buffers.push(new DataView(buffer))\n",
" }\n",
" var metadata = message.metadata || {};\n",
" var msg = {content, buffers, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" })\n",
" }\n",
" }\n",
"\n",
" JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n",
" if (comm_id in window.PyViz.comms) {\n",
" return window.PyViz.comms[comm_id];\n",
" } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n",
" var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n",
" var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n",
" if (msg_handler) {\n",
" comm.on_msg(msg_handler);\n",
" }\n",
" } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n",
" var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n",
" comm.open();\n",
" if (msg_handler) {\n",
" comm.onMsg = msg_handler;\n",
" }\n",
" } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n",
" var comm_promise = google.colab.kernel.comms.open(comm_id)\n",
" comm_promise.then((comm) => {\n",
" window.PyViz.comms[comm_id] = comm;\n",
" if (msg_handler) {\n",
" var messages = comm.messages[Symbol.asyncIterator]();\n",
" function processIteratorResult(result) {\n",
" var message = result.value;\n",
" var content = {data: message.data};\n",
" var metadata = message.metadata || {comm_id};\n",
" var msg = {content, metadata}\n",
" msg_handler(msg);\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" return messages.next().then(processIteratorResult);\n",
" }\n",
" }) \n",
" var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n",
" return comm_promise.then((comm) => {\n",
" comm.send(data, metadata, buffers, disposeOnDone);\n",
" });\n",
" };\n",
" var comm = {\n",
" send: sendClosure\n",
" };\n",
" }\n",
" window.PyViz.comms[comm_id] = comm;\n",
" return comm;\n",
" }\n",
" window.PyViz.comm_manager = new JupyterCommManager();\n",
" \n",
"\n",
"\n",
"var JS_MIME_TYPE = 'application/javascript';\n",
"var HTML_MIME_TYPE = 'text/html';\n",
"var EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\n",
"var CLASS_NAME = 'output';\n",
"\n",
"/**\n",
" * Render data to the DOM node\n",
" */\n",
"function render(props, node) {\n",
" var div = document.createElement(\"div\");\n",
" var script = document.createElement(\"script\");\n",
" node.appendChild(div);\n",
" node.appendChild(script);\n",
"}\n",
"\n",
"/**\n",
" * Handle when a new output is added\n",
" */\n",
"function handle_add_output(event, handle) {\n",
" var output_area = handle.output_area;\n",
" var output = handle.output;\n",
" if ((output.data == undefined) || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n",
" return\n",
" }\n",
" var id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n",
" var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n",
" if (id !== undefined) {\n",
" var nchildren = toinsert.length;\n",
" var html_node = toinsert[nchildren-1].children[0];\n",
" html_node.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var scripts = [];\n",
" var nodelist = html_node.querySelectorAll(\"script\");\n",
" for (var i in nodelist) {\n",
" if (nodelist.hasOwnProperty(i)) {\n",
" scripts.push(nodelist[i])\n",
" }\n",
" }\n",
"\n",
" scripts.forEach( function (oldScript) {\n",
" var newScript = document.createElement(\"script\");\n",
" var attrs = [];\n",
" var nodemap = oldScript.attributes;\n",
" for (var j in nodemap) {\n",
" if (nodemap.hasOwnProperty(j)) {\n",
" attrs.push(nodemap[j])\n",
" }\n",
" }\n",
" attrs.forEach(function(attr) { newScript.setAttribute(attr.name, attr.value) });\n",
" newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n",
" oldScript.parentNode.replaceChild(newScript, oldScript);\n",
" });\n",
" if (JS_MIME_TYPE in output.data) {\n",
" toinsert[nchildren-1].children[1].textContent = output.data[JS_MIME_TYPE];\n",
" }\n",
" output_area._hv_plot_id = id;\n",
" if ((window.Bokeh !== undefined) && (id in Bokeh.index)) {\n",
" window.PyViz.plot_index[id] = Bokeh.index[id];\n",
" } else {\n",
" window.PyViz.plot_index[id] = null;\n",
" }\n",
" } else if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n",
" var bk_div = document.createElement(\"div\");\n",
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n",
" var script_attrs = bk_div.children[0].attributes;\n",
" for (var i = 0; i < script_attrs.length; i++) {\n",
" toinsert[toinsert.length - 1].childNodes[1].setAttribute(script_attrs[i].name, script_attrs[i].value);\n",
" }\n",
" // store reference to server id on output_area\n",
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle when an output is cleared or removed\n",
" */\n",
"function handle_clear_output(event, handle) {\n",
" var id = handle.cell.output_area._hv_plot_id;\n",
" var server_id = handle.cell.output_area._bokeh_server_id;\n",
" if (((id === undefined) || !(id in PyViz.plot_index)) && (server_id !== undefined)) { return; }\n",
" var comm = window.PyViz.comm_manager.get_client_comm(\"hv-extension-comm\", \"hv-extension-comm\", function () {});\n",
" if (server_id !== null) {\n",
" comm.send({event_type: 'server_delete', 'id': server_id});\n",
" return;\n",
" } else if (comm !== null) {\n",
" comm.send({event_type: 'delete', 'id': id});\n",
" }\n",
" delete PyViz.plot_index[id];\n",
" if ((window.Bokeh !== undefined) & (id in window.Bokeh.index)) {\n",
" var doc = window.Bokeh.index[id].model.document\n",
" doc.clear();\n",
" const i = window.Bokeh.documents.indexOf(doc);\n",
" if (i > -1) {\n",
" window.Bokeh.documents.splice(i, 1);\n",
" }\n",
" }\n",
"}\n",
"\n",
"/**\n",
" * Handle kernel restart event\n",
" */\n",
"function handle_kernel_cleanup(event, handle) {\n",
" delete PyViz.comms[\"hv-extension-comm\"];\n",
" window.PyViz.plot_index = {}\n",
"}\n",
"\n",
"/**\n",
" * Handle update_display_data messages\n",
" */\n",
"function handle_update_output(event, handle) {\n",
" handle_clear_output(event, {cell: {output_area: handle.output_area}})\n",
" handle_add_output(event, handle)\n",
"}\n",
"\n",
"function register_renderer(events, OutputArea) {\n",
" function append_mime(data, metadata, element) {\n",
" // create a DOM node to render to\n",
" var toinsert = this.create_output_subarea(\n",
" metadata,\n",
" CLASS_NAME,\n",
" EXEC_MIME_TYPE\n",
" );\n",
" this.keyboard_manager.register_events(toinsert);\n",
" // Render to node\n",
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n",
" render(props, toinsert[0]);\n",
" element.append(toinsert);\n",
" return toinsert\n",
" }\n",
"\n",
" events.on('output_added.OutputArea', handle_add_output);\n",
" events.on('output_updated.OutputArea', handle_update_output);\n",
" events.on('clear_output.CodeCell', handle_clear_output);\n",
" events.on('delete.Cell', handle_clear_output);\n",
" events.on('kernel_ready.Kernel', handle_kernel_cleanup);\n",
"\n",
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n",
" safe: true,\n",
" index: 0\n",
" });\n",
"}\n",
"\n",
"if (window.Jupyter !== undefined) {\n",
" try {\n",
" var events = require('base/js/events');\n",
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n",
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n",
" register_renderer(events, OutputArea);\n",
" }\n",
" } catch(err) {\n",
" }\n",
"}\n"
],
"application/vnd.holoviews_load.v0+json": "\nif ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {\n window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}\n}\n\n\n function JupyterCommManager() {\n }\n\n JupyterCommManager.prototype.register_target = function(plot_id, comm_id, msg_handler) {\n if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n comm_manager.register_target(comm_id, function(comm) {\n comm.on_msg(msg_handler);\n });\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n window.PyViz.kernels[plot_id].registerCommTarget(comm_id, function(comm) {\n comm.onMsg = msg_handler;\n });\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n google.colab.kernel.comms.registerTarget(comm_id, (comm) => {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n console.log(message)\n var content = {data: message.data, comm_id};\n var buffers = []\n for (var buffer of message.buffers || []) {\n buffers.push(new DataView(buffer))\n }\n var metadata = message.metadata || {};\n var msg = {content, buffers, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n })\n }\n }\n\n JupyterCommManager.prototype.get_client_comm = function(plot_id, comm_id, msg_handler) {\n if (comm_id in window.PyViz.comms) {\n return window.PyViz.comms[comm_id];\n } else if (window.comm_manager || ((window.Jupyter !== undefined) && (Jupyter.notebook.kernel != null))) {\n var comm_manager = window.comm_manager || Jupyter.notebook.kernel.comm_manager;\n var comm = comm_manager.new_comm(comm_id, {}, {}, {}, comm_id);\n if (msg_handler) {\n comm.on_msg(msg_handler);\n }\n } else if ((plot_id in window.PyViz.kernels) && (window.PyViz.kernels[plot_id])) {\n var comm = window.PyViz.kernels[plot_id].connectToComm(comm_id);\n comm.open();\n if (msg_handler) {\n comm.onMsg = msg_handler;\n }\n } else if (typeof google != 'undefined' && google.colab.kernel != null) {\n var comm_promise = google.colab.kernel.comms.open(comm_id)\n comm_promise.then((comm) => {\n window.PyViz.comms[comm_id] = comm;\n if (msg_handler) {\n var messages = comm.messages[Symbol.asyncIterator]();\n function processIteratorResult(result) {\n var message = result.value;\n var content = {data: message.data};\n var metadata = message.metadata || {comm_id};\n var msg = {content, metadata}\n msg_handler(msg);\n return messages.next().then(processIteratorResult);\n }\n return messages.next().then(processIteratorResult);\n }\n }) \n var sendClosure = (data, metadata, buffers, disposeOnDone) => {\n return comm_promise.then((comm) => {\n comm.send(data, metadata, buffers, disposeOnDone);\n });\n };\n var comm = {\n send: sendClosure\n };\n }\n window.PyViz.comms[comm_id] = comm;\n return comm;\n }\n window.PyViz.comm_manager = new JupyterCommManager();\n \n\n\nvar JS_MIME_TYPE = 'application/javascript';\nvar HTML_MIME_TYPE = 'text/html';\nvar EXEC_MIME_TYPE = 'application/vnd.holoviews_exec.v0+json';\nvar CLASS_NAME = 'output';\n\n/**\n * Render data to the DOM node\n */\nfunction render(props, node) {\n var div = document.createElement(\"div\");\n var script = document.creat
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 13.1 s, sys: 3.24 s, total: 16.4 s\n",
"Wall time: 10.3 s\n"
]
}
],
"source": [
"%%time\n",
"%matplotlib inline\n",
"\n",
"import importlib\n",
"import new_import \n",
"\n",
"importlib.reload(new_import)\n",
"\n",
"\n",
"from new_import import *"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "2298b035-c320-4c52-a2e4-6d8084f66b92",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Starting new cluster.\n",
"CPU times: user 671 ms, sys: 68.2 ms, total: 739 ms\n",
"Wall time: 2min 43s\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
" <div style=\"margin-left: 48px;\">\n",
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-a865d2b6-d583-11ef-8082-79cd5c8df936</p>\n",
" <table style=\"width: 100%; text-align: left;\">\n",
"\n",
" <tr>\n",
" \n",
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> dask_gateway.GatewayCluster</td>\n",
" \n",
" </tr>\n",
"\n",
" \n",
" <tr>\n",
" <td style=\"text-align: left;\">\n",
" <strong>Dashboard: </strong> <a href=\"https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.8daaa179e4964dc7b211b4302753bf26/status\" target=\"_blank\">https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.8daaa179e4964dc7b211b4302753bf26/status</a>\n",
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" \n",
"\n",
" </table>\n",
"\n",
" \n",
" <button style=\"margin-bottom: 12px;\" data-commandlinker-command=\"dask:populate-and-launch-layout\" data-commandlinker-args='{\"url\": \"https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.8daaa179e4964dc7b211b4302753bf26/status\" }'>\n",
" Launch dashboard in JupyterLab\n",
" </button>\n",
" \n",
"\n",
" \n",
" <details>\n",
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
" <div style='background-color: #f2f2f2; display: inline-block; padding: 10px; border: 1px solid #999999;'>\n",
" <h3>GatewayCluster</h3>\n",
" <ul>\n",
" <li><b>Name: </b>easihub.8daaa179e4964dc7b211b4302753bf26\n",
" <li><b>Dashboard: </b><a href='https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.8daaa179e4964dc7b211b4302753bf26/status' target='_blank'>https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.8daaa179e4964dc7b211b4302753bf26/status</a>\n",
" </ul>\n",
"</div>\n",
"\n",
" </details>\n",
" \n",
"\n",
" </div>\n",
"</div>"
],
"text/plain": [
"<Client: 'tls://10.0.44.52:8786' processes=0 threads=0, memory=0 B>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-01-18 10:50:14,308 - distributed.client - ERROR - Failed to reconnect to scheduler after 30.00 seconds, closing client\n"
]
}
],
"source": [
"%%time\n",
"# Cấu hình Daskgateway\n",
"cluster, client = notebook_utils.initialize_dask(use_gateway=True, workers=(1,10))\n",
"# Khai báo 1 Datacube là dc\n",
"dc = datacube.Datacube()\n",
"\n",
"client"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "c5df2663-2524-4b99-aef4-cc0c625519e4",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"date_range = ('2023-3-01', '2023-3-30')\n",
"longtitude_range = (105.5, 106.4)\n",
"latitude_range = (9.2, 10.0) \n",
"\n",
"coordinates = (longtitude_range, latitude_range)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "f0422603-cca1-41bc-a12a-810d6a13e736",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<h4>Dataset size: 1.96 GB</h4>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=\"dark\"],\n",
"html[data-theme=\"dark\"],\n",
"body[data-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 !important;\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 0 20px 0 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: inline-block;\n",
" opacity: 0;\n",
" height: 0;\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:focus + label {\n",
" border: 2px solid var(--xr-font-color0);\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-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\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",
".xr-index-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",
".xr-index-data-in:checked ~ .xr-index-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-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-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,\n",
".xr-attrs 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",
".xr-no-icon {\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",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 2GB\n",
"Dimensions: (time: 3, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 24B 2023-03-05T22:46:10.500000 ... 202...\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648\n",
"Data variables:\n",
" vv (time, y, x) float32 1GB dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;\n",
" vh (time, y, x) float32 1GB dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;\n",
"Attributes:\n",
" crs: EPSG:32648\n",
" grid_mapping: spatial_ref</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e326b911-74b5-4ed5-9348-8b5762d8645d' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e326b911-74b5-4ed5-9348-8b5762d8645d' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 3</li><li><span class='xr-has-index'>y</span>: 8874</li><li><span class='xr-has-index'>x</span>: 9902</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-aa5a5322-2148-45e1-aeb6-90977c27d053' class='xr-section-summary-in' type='checkbox' checked><label for='section-aa5a5322-2148-45e1-aeb6-90977c27d053' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2023-03-05T22:46:10.500000 ... 2...</div><input id='attrs-53ff7ab6-b2c3-4e48-a764-10e76191c7c1' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-53ff7ab6-b2c3-4e48-a764-10e76191c7c1' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-cc0c1f64-dc58-4274-9253-9316fc14f513' class='xr-var-data-in' type='checkbox'><label for='data-cc0c1f64-dc58-4274-9253-9316fc14f513' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>seconds since 1970-01-01 00:00:00</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2023-03-05T22:46:10.500000000&#x27;, &#x27;2023-03-17T22:46:10.500000000&#x27;,\n",
" &#x27;2023-03-29T22:46:10.500000000&#x27;], dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.106e+06 1.106e+06 ... 1.017e+06</div><input id='attrs-7c2810f7-6c69-41e4-ac96-07d7c9f478c5' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-7c2810f7-6c69-41e4-ac96-07d7c9f478c5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a1dec7dd-c483-4f66-bca0-b6c3aaf07703' class='xr-var-data-in' type='checkbox'><label for='data-a1dec7dd-c483-4f66-bca0-b6c3aaf07703' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>-10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([1105735., 1105725., 1105715., ..., 1017025., 1017015., 1017005.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>5.548e+05 5.548e+05 ... 6.538e+05</div><input id='attrs-b2e61ccf-59b6-4019-9ea0-f637f839d92b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b2e61ccf-59b6-4019-9ea0-f637f839d92b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-09b15f6e-b318-4c95-9d19-868b407515c9' class='xr-var-data-in' type='checkbox'><label for='data-09b15f6e-b318-4c95-9d19-868b407515c9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([554795., 554805., 554815., ..., 653785., 653795., 653805.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spatial_ref</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>32648</div><input id='attrs-22a9b6ab-eaa1-4e98-8704-195ba616f3ff' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-22a9b6ab-eaa1-4e98-8704-195ba616f3ff' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-caf9707a-683b-46e1-9dac-24c6928f66b9' class='xr-var-data-in' type='checkbox'><label for='data-caf9707a-683b-46e1-9dac-24c6928f66b9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>spatial_ref :</span></dt><dd>PROJCS[&quot;WGS 84 / UTM zone 48N&quot;,GEOGCS[&quot;WGS 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridian&quot;,105],PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[&quot;false_easting&quot;,500000],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],AXIS[&quot;Easting&quot;,EAST],AXIS[&quot;Northing&quot;,NORTH],AUTHORITY[&quot;EPSG&quot;,&quot;32648&quot;]]</dd><dt><span>grid_mapping_name :</span></dt><dd>transverse_mercator</dd></dl></div><div class='xr
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 0.98 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (3, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 75 chunks in 1 graph layer </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"194\" height=\"172\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"24\" y2=\"39\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"24\" y2=\"64\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"24\" y2=\"89\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"24\" y2=\"114\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"112\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,122.49050867486044 10.0,107.54191072510604\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"49\" y2=\"14\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"74\" y2=\"14\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"99\" y2=\"14\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"124\" y2=\"14\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"39\" x2=\"144\" y2=\"39\" />\n",
" <line x1=\"24\" y1=\"64\" x2=\"144\" y2=\"64\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" />\n",
" <line x1=\"24\" y1=\"114\" x2=\"144\" y2=\"114\" />\n",
" <line x1=\"24\" y1=\"122\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
" <line x1=\"49\" y1=\"14\" x2=\"49\" y2=\"122\" />\n",
" <line x1=\"74\" y1=\"14\" x2=\"74\" y2=\"122\" />\n",
" <line x1=\"99\" y1=\"14\" x2=\"99\" y2=\"122\" />\n",
" <line x1=\"124\" y1=\"14\" x2=\"124\" y2=\"122\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,122.49050867486044 24.9485979497544,122.49050867486044\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"84.948598\" y=\"142.490509\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"164.948598\" y=\"68.719553\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,68.719553)\">8874</text>\n",
" <text x=\"7.474299\" y=\"135.016210\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,135.016210)\">3</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>vh</span></div><div class='xr-var-dims'>(time, y, x)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;</div><input id='attrs-585c6d95-4cca-4686-b2fb-b194b33210c6' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-585c6d95-4cca-4686-b2fb-b194b33210c6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-ddd2796d-eea0-42eb-afbe-b03c2edd1b02' class='xr-var-data-in' type='checkbox'><label for='data-ddd2796d-eea0-42eb-afbe-b03c2edd1b02' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>intensity</dd><dt><span>nodata :</span></dt><dd>nan</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 0.98 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (3, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 75 chunks in 1 graph layer </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"194\" height=\"172\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"24\" y2=\"39\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"24\" y2=\"64\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"24\" y2=\"89\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"24\" y2=\"114\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"112\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,122.49050867486044 10.0,107.54191072510604\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"49\" y2=\"14\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"74\" y2=\"14\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"99\" y2=\"14\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"124\" y2=\"14\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"39\" x2=\"144\" y2=\"39\" />\n",
" <line x1=\"24\" y1=\"64\" x2=\"144\" y2=\"64\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" />\n",
" <line x1=\"24\" y1=\"114\" x2=\"144\" y2=\"114\" />\n",
" <line x1=\"24\" y1=\"122\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
" <line x1=\"49\" y1=\"14\" x2=\"49\" y2=\"122\" />\n",
" <line x1=\"74\" y1=\"14\" x2=\"74\" y2=\"122\" />\n",
" <line x1=\"99\" y1=\"14\" x2=\"99\" y2=\"122\" />\n",
" <line x1=\"124\" y1=\"14\" x2=\"124\" y2=\"122\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,122.49050867486044 24.9485979497544,122.49050867486044\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"84.948598\" y=\"142.490509\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"164.948598\" y=\"68.719553\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,68.719553)\">8874</text>\n",
" <text x=\"7.474299\" y=\"135.016210\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,135.016210)\">3</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-68407c27-4bd2-4c1c-8fe5-a2683bd3f15d' class='xr-section-summary-in' type='checkbox' ><label for='section-68407c27-4bd2-4c1c-8fe5-a2683bd3f15d' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-a82082bf-39e7-4b4a-b949-1050075894b7' class='xr-index-data-in' type='checkbox'/><label for='index-a82082bf-39e7-4b4a-b949-1050075894b7' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2023-03-05 22:46:10.500000&#x27;, &#x27;2023-03-17 22:46:10.500000&#x27;,\n",
" &#x27;2023-03-29 22:46:10.500000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;time&#x27;, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-a9d98a0f-cf61-4a2e-b457-377f9b7de528' class='xr-index-data-in' type='checkbox'/><label for='index-a9d98a0f-cf61-4a2e-b457-377f9b7de528' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([1105735.0, 1105725.0, 1105715.0, 1105705.0, 1105695.0, 1105685.0,\n",
" 1105675.0, 1105665.0, 1105655.0, 1105645.0,\n",
" ...\n",
" 1017095.0, 1017085.0, 1017075.0, 1017065.0, 1017055.0, 1017045.0,\n",
" 1017035.0, 1017025.0, 1017015.0, 1017005.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;y&#x27;, length=8874))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-c28a01a7-cb21-4662-a622-efa443d82ee4' class='xr-index-data-in' type='checkbox'/><label for='index-c28a01a7-cb21-4662-a622-efa443d82ee4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([554795.0, 554805.0, 554815.0, 554825.0, 554835.0, 554845.0, 554855.0,\n",
" 554865.0, 554875.0, 554885.0,\n",
" ...\n",
" 653715.0, 653725.0, 653735.0, 653745.0, 653755.0, 653765.0, 653775.0,\n",
" 653785.0, 653795.0, 653805.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;x&#x27;, length=9902))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-b27701af-bbc7-4e95-86e5-c7114e66505f' class='xr-section-summary-in' type='checkbox' checked><label for='section-b27701af-bbc7-4e95-86e5-c7114e66505f' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>crs :</span></dt><dd>EPSG:32648</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset> Size: 2GB\n",
"Dimensions: (time: 3, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 24B 2023-03-05T22:46:10.500000 ... 202...\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648\n",
"Data variables:\n",
" vv (time, y, x) float32 1GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" vh (time, y, x) float32 1GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
"Attributes:\n",
" crs: EPSG:32648\n",
" grid_mapping: spatial_ref"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# tải dữ liệu vh vv từ vệ tinh sentinel-1\n",
"dsvh, dsvv = load_data_sen1(dc, date_range, coordinates)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "c4d11ba1-b40a-4969-b911-e70914629dc9",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/env/lib/python3.12/site-packages/xarray/groupers.py:487: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.\n",
" self.index_grouper = pd.Grouper(\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9a110b2168ff48519e40f3ef5658f2bd",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"average_vh = calculate_average(dsvh, time_pattern='1M')\n",
"progress(average_vh)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "3849455c-e4ea-4c83-9693-990a8edce2e8",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/env/lib/python3.12/site-packages/xarray/groupers.py:487: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.\n",
" self.index_grouper = pd.Grouper(\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "3de2ee24759f477da7dda25e23b042e2",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"average_vv = calculate_average(dsvv, time_pattern='1M')\n",
"progress(average_vv)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "b6a66c55-ae30-4af9-9b8d-8d4f2152cf93",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 764 ms, sys: 635 ms, total: 1.4 s\n",
"Wall time: 4min 38s\n"
]
},
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=\"dark\"],\n",
"html[data-theme=\"dark\"],\n",
"body[data-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 !important;\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 0 20px 0 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: inline-block;\n",
" opacity: 0;\n",
" height: 0;\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:focus + label {\n",
" border: 2px solid var(--xr-font-color0);\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-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\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",
".xr-index-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",
".xr-index-data-in:checked ~ .xr-index-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-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-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,\n",
".xr-attrs 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",
".xr-no-icon {\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",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;vv&#x27; (time: 1, y: 8874, x: 9902)&gt; Size: 351MB\n",
"array([[[0.19917326, 0.2036858 , 0.20597248, ..., 0.23972352,\n",
" 0.23907872, 0.23844711],\n",
" [0.19917326, 0.2036858 , 0.20597248, ..., 0.25530738,\n",
" 0.25576517, 0.25507364],\n",
" [0.20632547, 0.20605431, 0.2029686 , ..., 0.28056654,\n",
" 0.28108242, 0.27629215],\n",
" ...,\n",
" [0.06841445, 0.07078951, 0.07297197, ..., 0.06806423,\n",
" 0.06924058, 0.06730109],\n",
" [0.07230996, 0.07190628, 0.07310792, ..., 0.06789783,\n",
" 0.06905217, 0.06681374],\n",
" [0.07501791, 0.07259221, 0.07343484, ..., 0.06789783,\n",
" 0.06905217, 0.06681374]]], dtype=float32)\n",
"Coordinates:\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648\n",
" * time (time) datetime64[ns] 8B 2023-03-31\n",
"Attributes:\n",
" units: intensity\n",
" nodata: nan\n",
" crs: EPSG:32648\n",
" grid_mapping: spatial_ref</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'vv'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 1</li><li><span class='xr-has-index'>y</span>: 8874</li><li><span class='xr-has-index'>x</span>: 9902</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-b08ca762-5e43-4f6a-8a69-2f6a7e643e7b' class='xr-array-in' type='checkbox' checked><label for='section-b08ca762-5e43-4f6a-8a69-2f6a7e643e7b' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>0.1992 0.2037 0.206 0.206 0.2044 ... 0.06654 0.0679 0.06905 0.06681</span></div><div class='xr-array-data'><pre>array([[[0.19917326, 0.2036858 , 0.20597248, ..., 0.23972352,\n",
" 0.23907872, 0.23844711],\n",
" [0.19917326, 0.2036858 , 0.20597248, ..., 0.25530738,\n",
" 0.25576517, 0.25507364],\n",
" [0.20632547, 0.20605431, 0.2029686 , ..., 0.28056654,\n",
" 0.28108242, 0.27629215],\n",
" ...,\n",
" [0.06841445, 0.07078951, 0.07297197, ..., 0.06806423,\n",
" 0.06924058, 0.06730109],\n",
" [0.07230996, 0.07190628, 0.07310792, ..., 0.06789783,\n",
" 0.06905217, 0.06681374],\n",
" [0.07501791, 0.07259221, 0.07343484, ..., 0.06789783,\n",
" 0.06905217, 0.06681374]]], dtype=float32)</pre></div></div></li><li class='xr-section-item'><input id='section-ea8ad5ca-a0c6-4598-848b-9c5d078a5755' class='xr-section-summary-in' type='checkbox' checked><label for='section-ea8ad5ca-a0c6-4598-848b-9c5d078a5755' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.106e+06 1.106e+06 ... 1.017e+06</div><input id='attrs-573d5235-d7af-41c7-97fb-bc9839767964' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-573d5235-d7af-41c7-97fb-bc9839767964' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-73c740c7-9450-4a8d-8063-256a51294b42' class='xr-var-data-in' type='checkbox'><label for='data-73c740c7-9450-4a8d-8063-256a51294b42' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>-10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([1105735., 1105725., 1105715., ..., 1017025., 1017015., 1017005.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>5.548e+05 5.548e+05 ... 6.538e+05</div><input id='attrs-3ccab7b3-5167-4de6-9099-d9a19bb73a8c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3ccab7b3-5167-4de6-9099-d9a19bb73a8c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-168c404e-4368-4353-bcc7-2e4b3a5551ad' class='xr-var-data-in' type='checkbox'><label for='data-168c404e-4368-4353-bcc7-2e4b3a5551ad' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([554795., 554805., 554815., ..., 653785., 653795., 653805.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spatial_ref</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>32648</div><input id='attrs-339ea60e-6367-4e33-ba2f-35c22cb1b4cf' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-339ea60e-6367-4e33-ba2f-35c22cb1b4cf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2be5dab8-b289-4bf2-a483-ff61ac4ec949' class='xr-var-data-in' type='checkbox'><label for='data-2be5dab8-b289-4bf2-a483-ff61ac4ec949' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>spatial_ref :</span></dt><dd>PROJCS[&quot;WGS 84 / UTM zone 48N&quot;,GEOGCS[&quot;WGS 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridian&quot;,105],PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[&quot;false_eastin
" 1105675.0, 1105665.0, 1105655.0, 1105645.0,\n",
" ...\n",
" 1017095.0, 1017085.0, 1017075.0, 1017065.0, 1017055.0, 1017045.0,\n",
" 1017035.0, 1017025.0, 1017015.0, 1017005.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;y&#x27;, length=8874))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-2e1737e1-abe5-46a8-9202-8c1fad434803' class='xr-index-data-in' type='checkbox'/><label for='index-2e1737e1-abe5-46a8-9202-8c1fad434803' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([554795.0, 554805.0, 554815.0, 554825.0, 554835.0, 554845.0, 554855.0,\n",
" 554865.0, 554875.0, 554885.0,\n",
" ...\n",
" 653715.0, 653725.0, 653735.0, 653745.0, 653755.0, 653765.0, 653775.0,\n",
" 653785.0, 653795.0, 653805.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;x&#x27;, length=9902))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-0a482f91-b68f-4485-9c4d-4fe9442103f4' class='xr-index-data-in' type='checkbox'/><label for='index-0a482f91-b68f-4485-9c4d-4fe9442103f4' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2023-03-31&#x27;], dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;time&#x27;, freq=&#x27;ME&#x27;))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-c5f1e4db-6685-4503-aab6-fb9cc05569c2' class='xr-section-summary-in' type='checkbox' checked><label for='section-c5f1e4db-6685-4503-aab6-fb9cc05569c2' class='xr-section-summary' >Attributes: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>intensity</dd><dt><span>nodata :</span></dt><dd>nan</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'vv' (time: 1, y: 8874, x: 9902)> Size: 351MB\n",
"array([[[0.19917326, 0.2036858 , 0.20597248, ..., 0.23972352,\n",
" 0.23907872, 0.23844711],\n",
" [0.19917326, 0.2036858 , 0.20597248, ..., 0.25530738,\n",
" 0.25576517, 0.25507364],\n",
" [0.20632547, 0.20605431, 0.2029686 , ..., 0.28056654,\n",
" 0.28108242, 0.27629215],\n",
" ...,\n",
" [0.06841445, 0.07078951, 0.07297197, ..., 0.06806423,\n",
" 0.06924058, 0.06730109],\n",
" [0.07230996, 0.07190628, 0.07310792, ..., 0.06789783,\n",
" 0.06905217, 0.06681374],\n",
" [0.07501791, 0.07259221, 0.07343484, ..., 0.06789783,\n",
" 0.06905217, 0.06681374]]], dtype=float32)\n",
"Coordinates:\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648\n",
" * time (time) datetime64[ns] 8B 2023-03-31\n",
"Attributes:\n",
" units: intensity\n",
" nodata: nan\n",
" crs: EPSG:32648\n",
" grid_mapping: spatial_ref"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%time\n",
"average_vh.compute()\n",
"average_vv.compute()"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "46f285ce-490c-42e1-9822-8154b37704f6",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"No datasets require offset correction\n",
"The valid_data_mask and scale (no offset) have been applied to the reflectance bands\n"
]
},
{
"data": {
"text/html": [
"<h4>Dataset size: 8.84 GB</h4>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=\"dark\"],\n",
"html[data-theme=\"dark\"],\n",
"body[data-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 !important;\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 0 20px 0 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: inline-block;\n",
" opacity: 0;\n",
" height: 0;\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:focus + label {\n",
" border: 2px solid var(--xr-font-color0);\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-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\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",
".xr-index-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",
".xr-index-data-in:checked ~ .xr-index-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-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-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,\n",
".xr-attrs 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",
".xr-no-icon {\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",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 9GB\n",
"Dimensions: (time: 12, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 96B 2023-03-01T03:35:09.182000 ... 202...\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648\n",
"Data variables:\n",
" red (time, y, x) float32 4GB dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;\n",
" nir (time, y, x) float32 4GB dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;\n",
" scl (time, y, x) uint8 1GB dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;\n",
"Attributes:\n",
" crs: EPSG:32648\n",
" grid_mapping: spatial_ref</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-e71382f4-a8f2-4d68-ae0f-d0c0df04b406' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-e71382f4-a8f2-4d68-ae0f-d0c0df04b406' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 12</li><li><span class='xr-has-index'>y</span>: 8874</li><li><span class='xr-has-index'>x</span>: 9902</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-e6032e8a-e77c-46ad-8b38-b407ce0c0d97' class='xr-section-summary-in' type='checkbox' checked><label for='section-e6032e8a-e77c-46ad-8b38-b407ce0c0d97' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2023-03-01T03:35:09.182000 ... 2...</div><input id='attrs-baf3b878-fee7-4c8c-8f7e-b42f758aac99' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-baf3b878-fee7-4c8c-8f7e-b42f758aac99' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-84458791-a1fc-469b-830c-bbfc97461e3e' class='xr-var-data-in' type='checkbox'><label for='data-84458791-a1fc-469b-830c-bbfc97461e3e' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>seconds since 1970-01-01 00:00:00</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2023-03-01T03:35:09.182000000&#x27;, &#x27;2023-03-03T03:25:17.841000000&#x27;,\n",
" &#x27;2023-03-06T03:35:14.717000000&#x27;, &#x27;2023-03-08T03:25:12.032000000&#x27;,\n",
" &#x27;2023-03-11T03:35:07.230000000&#x27;, &#x27;2023-03-13T03:25:20.837000000&#x27;,\n",
" &#x27;2023-03-16T03:35:15.940000000&#x27;, &#x27;2023-03-18T03:25:14.467000000&#x27;,\n",
" &#x27;2023-03-21T03:35:10.279000000&#x27;, &#x27;2023-03-23T03:25:18.795000000&#x27;,\n",
" &#x27;2023-03-26T03:35:14.570000000&#x27;, &#x27;2023-03-28T03:25:14.536000000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.106e+06 1.106e+06 ... 1.017e+06</div><input id='attrs-557266f6-73d0-4829-8277-e19a349006ba' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-557266f6-73d0-4829-8277-e19a349006ba' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-861de701-ed0f-4801-8ec9-cae0c34a0628' class='xr-var-data-in' type='checkbox'><label for='data-861de701-ed0f-4801-8ec9-cae0c34a0628' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>-10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([1105735., 1105725., 1105715., ..., 1017025., 1017015., 1017005.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>5.548e+05 5.548e+05 ... 6.538e+05</div><input id='attrs-5d51e9c9-f7f9-4394-a200-cc35b61b8925' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5d51e9c9-f7f9-4394-a200-cc35b61b8925' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8e7b4e4a-8090-422d-bc59-049055dba504' class='xr-var-data-in' type='checkbox'><label for='data-8e7b4e4a-8090-422d-bc59-049055dba504' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([554795., 554805., 554815., ..., 653785., 653795., 653805.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spatial_ref</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>32648</div><input id='attrs-5fb78602-b659-4bbb-bbca-f9e4236c60bc' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5fb78602-b659-4bbb-bbca-f9e4236c60bc' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-efa0eebd-58f0-4276-8004-07b9680a4cf2' class='xr-var-data-in' type='checkbox'><label for='data-efa0eebd-58f0-4276-8004-07b9680a4cf2' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>spatial_ref :</span></dt><dd>PROJCS[&quot;WGS 84 / UTM zone 48N&quot;,GEOGCS[&quot;WGS 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridian&quot;,105],PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[&quot;false_easting&quot;,500000],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],AXIS[&quot;Easting&quot;,EAST],AXIS[&quot;Northing&quot;,NORTH],AUTHORITY[&quot;EPSG&quot;,&quot;32648&quot;]]</dd><dt><span>grid_mapping_name :</span></dt><dd>transverse_mercator</dd></dl></div><div class='xr-var-data'><pre>array(32648, dtype=int32)</pr
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 3.93 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (12, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 300 chunks in 8 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"194\" height=\"172\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"24\" y2=\"39\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"24\" y2=\"64\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"24\" y2=\"89\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"24\" y2=\"114\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"108\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"111\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"112\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"113\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"17\" y2=\"115\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"18\" y2=\"116\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"119\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,122.49050867486044 10.0,107.54191072510604\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"131\" y2=\"1\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"132\" y2=\"2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"133\" y2=\"3\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"136\" y2=\"6\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"137\" y2=\"7\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"138\" y2=\"8\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"142\" y2=\"12\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"143\" y2=\"13\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"49\" y2=\"14\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"74\" y2=\"14\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"99\" y2=\"14\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"124\" y2=\"14\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"39\" x2=\"144\" y2=\"39\" />\n",
" <line x1=\"24\" y1=\"64\" x2=\"144\" y2=\"64\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" />\n",
" <line x1=\"24\" y1=\"114\" x2=\"144\" y2=\"114\" />\n",
" <line x1=\"24\" y1=\"122\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
" <line x1=\"49\" y1=\"14\" x2=\"49\" y2=\"122\" />\n",
" <line x1=\"74\" y1=\"14\" x2=\"74\" y2=\"122\" />\n",
" <line x1=\"99\" y1=\"14\" x2=\"99\" y2=\"122\" />\n",
" <line x1=\"124\" y1=\"14\" x2=\"124\" y2=\"122\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,122.49050867486044 24.9485979497544,122.49050867486044\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"84.948598\" y=\"142.490509\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"164.948598\" y=\"68.719553\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,68.719553)\">8874</text>\n",
" <text x=\"7.474299\" y=\"135.016210\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,135.016210)\">12</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>nir</span></div><div class='xr-var-dims'>(time, y, x)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;</div><input id='attrs-2acae4d9-2964-4adb-8ab0-c8cb9d2ca215' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-2acae4d9-2964-4adb-8ab0-c8cb9d2ca215' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-da6c0822-527d-4cf4-8860-f8a3dd42b656' class='xr-var-data-in' type='checkbox'><label for='data-da6c0822-527d-4cf4-8860-f8a3dd42b656' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 3.93 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (12, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 300 chunks in 8 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"194\" height=\"172\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"24\" y2=\"39\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"24\" y2=\"64\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"24\" y2=\"89\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"24\" y2=\"114\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"108\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"111\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"112\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"113\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"17\" y2=\"115\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"18\" y2=\"116\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"119\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,122.49050867486044 10.0,107.54191072510604\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"131\" y2=\"1\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"132\" y2=\"2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"133\" y2=\"3\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"136\" y2=\"6\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"137\" y2=\"7\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"138\" y2=\"8\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"142\" y2=\"12\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"143\" y2=\"13\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"49\" y2=\"14\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"74\" y2=\"14\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"99\" y2=\"14\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"124\" y2=\"14\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"39\" x2=\"144\" y2=\"39\" />\n",
" <line x1=\"24\" y1=\"64\" x2=\"144\" y2=\"64\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" />\n",
" <line x1=\"24\" y1=\"114\" x2=\"144\" y2=\"114\" />\n",
" <line x1=\"24\" y1=\"122\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
" <line x1=\"49\" y1=\"14\" x2=\"49\" y2=\"122\" />\n",
" <line x1=\"74\" y1=\"14\" x2=\"74\" y2=\"122\" />\n",
" <line x1=\"99\" y1=\"14\" x2=\"99\" y2=\"122\" />\n",
" <line x1=\"124\" y1=\"14\" x2=\"124\" y2=\"122\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,122.49050867486044 24.9485979497544,122.49050867486044\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"84.948598\" y=\"142.490509\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"164.948598\" y=\"68.719553\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,68.719553)\">8874</text>\n",
" <text x=\"7.474299\" y=\"135.016210\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,135.016210)\">12</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li><li class='xr-var-item'><div class='xr-var-name'><span>scl</span></div><div class='xr-var-dims'>(time, y, x)</div><div class='xr-var-dtype'>uint8</div><div class='xr-var-preview xr-preview'>dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;</div><input id='attrs-212aed99-d735-45c3-a418-59881ff49cf7' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-212aed99-d735-45c3-a418-59881ff49cf7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a27f74f4-df79-4d88-9e76-561643b1a71a' class='xr-var-data-in' type='checkbox'><label for='data-a27f74f4-df79-4d88-9e76-561643b1a71a' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>1</dd><dt><span>nodata :</span></dt><dd>0</dd><dt><span>flags_definition :</span></dt><dd>{&#x27;qa&#x27;: {&#x27;bits&#x27;: [0, 1, 2, 3, 4, 5, 6, 7], &#x27;values&#x27;: {&#x27;0&#x27;: &#x27;no data&#x27;, &#x27;1&#x27;: &#x27;saturated or defective&#x27;, &#x27;2&#x27;: &#x27;dark area pixels&#x27;, &#x27;3&#x27;: &#x27;cloud shadows&#x27;, &#x27;4&#x27;: &#x27;vegetation&#x27;, &#x27;5&#x27;: &#x27;bare soils&#x27;, &#x27;6&#x27;: &#x27;water&#x27;, &#x27;7&#x27;: &#x27;unclassified&#x27;, &#x27;8&#x27;: &#x27;cloud medium probability&#x27;, &#x27;9&#x27;: &#x27;cloud high probability&#x27;, &#x27;10&#x27;: &#x27;thin cirrus&#x27;, &#x27;11&#x27;: &#x27;snow or ice&#x27;}, &#x27;description&#x27;: &#x27;Sen2Cor Scene Classification&#x27;}}</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div><div class='xr-var-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 0.98 GiB </td>\n",
" <td> 4.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (12, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 300 chunks in 1 graph layer </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> uint8 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"194\" height=\"172\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"24\" y2=\"39\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"24\" y2=\"64\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"24\" y2=\"89\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"24\" y2=\"114\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"108\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"111\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"112\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"113\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"17\" y2=\"115\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"18\" y2=\"116\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"119\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,122.49050867486044 10.0,107.54191072510604\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"131\" y2=\"1\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"132\" y2=\"2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"133\" y2=\"3\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"136\" y2=\"6\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"137\" y2=\"7\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"138\" y2=\"8\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"142\" y2=\"12\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"143\" y2=\"13\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"49\" y2=\"14\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"74\" y2=\"14\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"99\" y2=\"14\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"124\" y2=\"14\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"39\" x2=\"144\" y2=\"39\" />\n",
" <line x1=\"24\" y1=\"64\" x2=\"144\" y2=\"64\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" />\n",
" <line x1=\"24\" y1=\"114\" x2=\"144\" y2=\"114\" />\n",
" <line x1=\"24\" y1=\"122\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
" <line x1=\"49\" y1=\"14\" x2=\"49\" y2=\"122\" />\n",
" <line x1=\"74\" y1=\"14\" x2=\"74\" y2=\"122\" />\n",
" <line x1=\"99\" y1=\"14\" x2=\"99\" y2=\"122\" />\n",
" <line x1=\"124\" y1=\"14\" x2=\"124\" y2=\"122\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,122.49050867486044 24.9485979497544,122.49050867486044\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"84.948598\" y=\"142.490509\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"164.948598\" y=\"68.719553\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,68.719553)\">8874</text>\n",
" <text x=\"7.474299\" y=\"135.016210\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,135.016210)\">12</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-a5404426-da99-4362-99fc-692206858c05' class='xr-section-summary-in' type='checkbox' ><label for='section-a5404426-da99-4362-99fc-692206858c05' class='xr-section-summary' >Indexes: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-index-name'><div>time</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-29de3431-c459-4353-b2d5-2cc0fc89ca63' class='xr-index-data-in' type='checkbox'/><label for='index-29de3431-c459-4353-b2d5-2cc0fc89ca63' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(DatetimeIndex([&#x27;2023-03-01 03:35:09.182000&#x27;, &#x27;2023-03-03 03:25:17.841000&#x27;,\n",
" &#x27;2023-03-06 03:35:14.717000&#x27;, &#x27;2023-03-08 03:25:12.032000&#x27;,\n",
" &#x27;2023-03-11 03:35:07.230000&#x27;, &#x27;2023-03-13 03:25:20.837000&#x27;,\n",
" &#x27;2023-03-16 03:35:15.940000&#x27;, &#x27;2023-03-18 03:25:14.467000&#x27;,\n",
" &#x27;2023-03-21 03:35:10.279000&#x27;, &#x27;2023-03-23 03:25:18.795000&#x27;,\n",
" &#x27;2023-03-26 03:35:14.570000&#x27;, &#x27;2023-03-28 03:25:14.536000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;time&#x27;, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-443a1276-f942-41b5-8b85-1af0fc651677' class='xr-index-data-in' type='checkbox'/><label for='index-443a1276-f942-41b5-8b85-1af0fc651677' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([1105735.0, 1105725.0, 1105715.0, 1105705.0, 1105695.0, 1105685.0,\n",
" 1105675.0, 1105665.0, 1105655.0, 1105645.0,\n",
" ...\n",
" 1017095.0, 1017085.0, 1017075.0, 1017065.0, 1017055.0, 1017045.0,\n",
" 1017035.0, 1017025.0, 1017015.0, 1017005.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;y&#x27;, length=8874))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-4016bfe6-c94e-4014-8692-4ee4b94cfbf1' class='xr-index-data-in' type='checkbox'/><label for='index-4016bfe6-c94e-4014-8692-4ee4b94cfbf1' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([554795.0, 554805.0, 554815.0, 554825.0, 554835.0, 554845.0, 554855.0,\n",
" 554865.0, 554875.0, 554885.0,\n",
" ...\n",
" 653715.0, 653725.0, 653735.0, 653745.0, 653755.0, 653765.0, 653775.0,\n",
" 653785.0, 653795.0, 653805.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;x&#x27;, length=9902))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-f3cdf257-ea97-4fc5-9a51-fb3ed55ae044' class='xr-section-summary-in' type='checkbox' checked><label for='section-f3cdf257-ea97-4fc5-9a51-fb3ed55ae044' class='xr-section-summary' >Attributes: <span>(2)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'><dt><span>crs :</span></dt><dd>EPSG:32648</dd><dt><span>grid_mapping :</span></dt><dd>spatial_ref</dd></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset> Size: 9GB\n",
"Dimensions: (time: 12, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 96B 2023-03-01T03:35:09.182000 ... 202...\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648\n",
"Data variables:\n",
" red (time, y, x) float32 4GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" nir (time, y, x) float32 4GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" scl (time, y, x) uint8 1GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
"Attributes:\n",
" crs: EPSG:32648\n",
" grid_mapping: spatial_ref"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data_sen2 = load_data_sen2(dc, date_range, coordinates)\n",
"notebook_utils.heading(notebook_utils.xarray_object_size(data_sen2))\n",
"display(data_sen2)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "8cb877b1-a69e-4ee8-b54c-235b5ba83084",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'0': 'no data',\n",
" '1': 'saturated or defective',\n",
" '2': 'dark area pixels',\n",
" '3': 'cloud shadows',\n",
" '4': 'vegetation',\n",
" '5': 'bare soils',\n",
" '6': 'water',\n",
" '7': 'unclassified',\n",
" '8': 'cloud medium probability',\n",
" '9': 'cloud high probability',\n",
" '10': 'thin cirrus',\n",
" '11': 'snow or ice'}"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 58.6 ms, sys: 480 μs, total: 59.1 ms\n",
"Wall time: 57.5 ms\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "e59e184129434d098bcab7a79ee8bf4c",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox()"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%time\n",
"# Tiến hành loại bỏ các vị trí bị mây ảnh hưởng\n",
"result = mask_cloud(data_sen2)\n",
"progress(result)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "325668db-040c-44d1-8cac-749f1850067d",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<div><svg style=\"position: absolute; width: 0; height: 0; overflow: hidden\">\n",
"<defs>\n",
"<symbol id=\"icon-database\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M16 0c-8.837 0-16 2.239-16 5v4c0 2.761 7.163 5 16 5s16-2.239 16-5v-4c0-2.761-7.163-5-16-5z\"></path>\n",
"<path d=\"M16 17c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"<path d=\"M16 26c-8.837 0-16-2.239-16-5v6c0 2.761 7.163 5 16 5s16-2.239 16-5v-6c0 2.761-7.163 5-16 5z\"></path>\n",
"</symbol>\n",
"<symbol id=\"icon-file-text2\" viewBox=\"0 0 32 32\">\n",
"<path d=\"M28.681 7.159c-0.694-0.947-1.662-2.053-2.724-3.116s-2.169-2.030-3.116-2.724c-1.612-1.182-2.393-1.319-2.841-1.319h-15.5c-1.378 0-2.5 1.121-2.5 2.5v27c0 1.378 1.122 2.5 2.5 2.5h23c1.378 0 2.5-1.122 2.5-2.5v-19.5c0-0.448-0.137-1.23-1.319-2.841zM24.543 5.457c0.959 0.959 1.712 1.825 2.268 2.543h-4.811v-4.811c0.718 0.556 1.584 1.309 2.543 2.268zM28 29.5c0 0.271-0.229 0.5-0.5 0.5h-23c-0.271 0-0.5-0.229-0.5-0.5v-27c0-0.271 0.229-0.5 0.5-0.5 0 0 15.499-0 15.5 0v7c0 0.552 0.448 1 1 1h7v19.5z\"></path>\n",
"<path d=\"M23 26h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 22h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"<path d=\"M23 18h-14c-0.552 0-1-0.448-1-1s0.448-1 1-1h14c0.552 0 1 0.448 1 1s-0.448 1-1 1z\"></path>\n",
"</symbol>\n",
"</defs>\n",
"</svg>\n",
"<style>/* CSS stylesheet for displaying xarray objects in jupyterlab.\n",
" *\n",
" */\n",
"\n",
":root {\n",
" --xr-font-color0: var(--jp-content-font-color0, rgba(0, 0, 0, 1));\n",
" --xr-font-color2: var(--jp-content-font-color2, rgba(0, 0, 0, 0.54));\n",
" --xr-font-color3: var(--jp-content-font-color3, rgba(0, 0, 0, 0.38));\n",
" --xr-border-color: var(--jp-border-color2, #e0e0e0);\n",
" --xr-disabled-color: var(--jp-layout-color3, #bdbdbd);\n",
" --xr-background-color: var(--jp-layout-color0, white);\n",
" --xr-background-color-row-even: var(--jp-layout-color1, white);\n",
" --xr-background-color-row-odd: var(--jp-layout-color2, #eeeeee);\n",
"}\n",
"\n",
"html[theme=\"dark\"],\n",
"html[data-theme=\"dark\"],\n",
"body[data-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 !important;\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 0 20px 0 20px;\n",
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
" display: inline-block;\n",
" opacity: 0;\n",
" height: 0;\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:focus + label {\n",
" border: 2px solid var(--xr-font-color0);\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-index-preview {\n",
" grid-column: 2 / 5;\n",
" color: var(--xr-font-color2);\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",
".xr-index-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",
".xr-index-data-in:checked ~ .xr-index-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-index-name div,\n",
".xr-index-data,\n",
".xr-attrs {\n",
" padding-left: 25px !important;\n",
"}\n",
"\n",
".xr-attrs,\n",
".xr-var-attrs,\n",
".xr-var-data,\n",
".xr-index-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,\n",
".xr-attrs 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",
".xr-no-icon {\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",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.DataArray &#x27;NDVI&#x27; (time: 12, y: 8874, x: 9902)&gt; Size: 4GB\n",
"dask.array&lt;truediv, shape=(12, 8874, 9902), dtype=float32, chunksize=(1, 2048, 2048), chunktype=numpy.ndarray&gt;\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 96B 2023-03-01T03:35:09.182000 ... 202...\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.DataArray</div><div class='xr-array-name'>'NDVI'</div><ul class='xr-dim-list'><li><span class='xr-has-index'>time</span>: 12</li><li><span class='xr-has-index'>y</span>: 8874</li><li><span class='xr-has-index'>x</span>: 9902</li></ul></div><ul class='xr-sections'><li class='xr-section-item'><div class='xr-array-wrap'><input id='section-290f86c8-8b82-4ed8-8925-73b7d4268bbf' class='xr-array-in' type='checkbox' checked><label for='section-290f86c8-8b82-4ed8-8925-73b7d4268bbf' title='Show/hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-array-preview xr-preview'><span>dask.array&lt;chunksize=(1, 2048, 2048), meta=np.ndarray&gt;</span></div><div class='xr-array-data'><table>\n",
" <tr>\n",
" <td>\n",
" <table style=\"border-collapse: collapse;\">\n",
" <thead>\n",
" <tr>\n",
" <td> </td>\n",
" <th> Array </th>\n",
" <th> Chunk </th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" \n",
" <tr>\n",
" <th> Bytes </th>\n",
" <td> 3.93 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (12, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 300 chunks in 7 graph layers </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Data type </th>\n",
" <td colspan=\"2\"> float32 numpy.ndarray </td>\n",
" </tr>\n",
" </tbody>\n",
" </table>\n",
" </td>\n",
" <td>\n",
" <svg width=\"194\" height=\"172\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"24\" y2=\"39\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"24\" y2=\"64\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"24\" y2=\"89\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"24\" y2=\"114\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"108\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"111\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"112\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"113\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"17\" y2=\"115\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"18\" y2=\"116\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"119\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 24.9485979497544,14.948597949754403 24.9485979497544,122.49050867486044 10.0,107.54191072510604\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"131\" y2=\"1\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"132\" y2=\"2\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"133\" y2=\"3\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"134\" y2=\"4\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"136\" y2=\"6\" />\n",
" <line x1=\"17\" y1=\"7\" x2=\"137\" y2=\"7\" />\n",
" <line x1=\"18\" y1=\"8\" x2=\"138\" y2=\"8\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"142\" y2=\"12\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"143\" y2=\"13\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"24\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"49\" y2=\"14\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"74\" y2=\"14\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"99\" y2=\"14\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"124\" y2=\"14\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 144.9485979497544,14.948597949754403 24.9485979497544,14.948597949754403\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"144\" y2=\"14\" style=\"stroke-width:2\" />\n",
" <line x1=\"24\" y1=\"39\" x2=\"144\" y2=\"39\" />\n",
" <line x1=\"24\" y1=\"64\" x2=\"144\" y2=\"64\" />\n",
" <line x1=\"24\" y1=\"89\" x2=\"144\" y2=\"89\" />\n",
" <line x1=\"24\" y1=\"114\" x2=\"144\" y2=\"114\" />\n",
" <line x1=\"24\" y1=\"122\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" style=\"stroke-width:2\" />\n",
" <line x1=\"49\" y1=\"14\" x2=\"49\" y2=\"122\" />\n",
" <line x1=\"74\" y1=\"14\" x2=\"74\" y2=\"122\" />\n",
" <line x1=\"99\" y1=\"14\" x2=\"99\" y2=\"122\" />\n",
" <line x1=\"124\" y1=\"14\" x2=\"124\" y2=\"122\" />\n",
" <line x1=\"144\" y1=\"14\" x2=\"144\" y2=\"122\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"24.9485979497544,14.948597949754403 144.9485979497544,14.948597949754403 144.9485979497544,122.49050867486044 24.9485979497544,122.49050867486044\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"84.948598\" y=\"142.490509\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"164.948598\" y=\"68.719553\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,164.948598,68.719553)\">8874</text>\n",
" <text x=\"7.474299\" y=\"135.016210\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,7.474299,135.016210)\">12</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
"</table></div></div></li><li class='xr-section-item'><input id='section-045b82f7-14fb-479a-b99e-59518aaa8dac' class='xr-section-summary-in' type='checkbox' checked><label for='section-045b82f7-14fb-479a-b99e-59518aaa8dac' class='xr-section-summary' >Coordinates: <span>(4)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>time</span></div><div class='xr-var-dims'>(time)</div><div class='xr-var-dtype'>datetime64[ns]</div><div class='xr-var-preview xr-preview'>2023-03-01T03:35:09.182000 ... 2...</div><input id='attrs-3ae849c4-f4fc-4de5-905b-3dbf38e4fc6c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3ae849c4-f4fc-4de5-905b-3dbf38e4fc6c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6e3ab0b7-f15f-4de6-af9c-cf29161aefb9' class='xr-var-data-in' type='checkbox'><label for='data-6e3ab0b7-f15f-4de6-af9c-cf29161aefb9' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>seconds since 1970-01-01 00:00:00</dd></dl></div><div class='xr-var-data'><pre>array([&#x27;2023-03-01T03:35:09.182000000&#x27;, &#x27;2023-03-03T03:25:17.841000000&#x27;,\n",
" &#x27;2023-03-06T03:35:14.717000000&#x27;, &#x27;2023-03-08T03:25:12.032000000&#x27;,\n",
" &#x27;2023-03-11T03:35:07.230000000&#x27;, &#x27;2023-03-13T03:25:20.837000000&#x27;,\n",
" &#x27;2023-03-16T03:35:15.940000000&#x27;, &#x27;2023-03-18T03:25:14.467000000&#x27;,\n",
" &#x27;2023-03-21T03:35:10.279000000&#x27;, &#x27;2023-03-23T03:25:18.795000000&#x27;,\n",
" &#x27;2023-03-26T03:35:14.570000000&#x27;, &#x27;2023-03-28T03:25:14.536000000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;)</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>y</span></div><div class='xr-var-dims'>(y)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>1.106e+06 1.106e+06 ... 1.017e+06</div><input id='attrs-4a04d986-8a03-460b-8c61-51c4a7f5b746' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-4a04d986-8a03-460b-8c61-51c4a7f5b746' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-1aabb136-dfe2-40f9-8a7c-bf752f9ca6a1' class='xr-var-data-in' type='checkbox'><label for='data-1aabb136-dfe2-40f9-8a7c-bf752f9ca6a1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>-10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([1105735., 1105725., 1105715., ..., 1017025., 1017015., 1017005.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span class='xr-has-index'>x</span></div><div class='xr-var-dims'>(x)</div><div class='xr-var-dtype'>float64</div><div class='xr-var-preview xr-preview'>5.548e+05 5.548e+05 ... 6.538e+05</div><input id='attrs-2a4bc434-0aa6-4c76-9d85-c52a41c9be39' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2a4bc434-0aa6-4c76-9d85-c52a41c9be39' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9d7e1cb0-f15a-418a-b643-5545177b2d64' class='xr-var-data-in' type='checkbox'><label for='data-9d7e1cb0-f15a-418a-b643-5545177b2d64' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>units :</span></dt><dd>metre</dd><dt><span>resolution :</span></dt><dd>10.0</dd><dt><span>crs :</span></dt><dd>EPSG:32648</dd></dl></div><div class='xr-var-data'><pre>array([554795., 554805., 554815., ..., 653785., 653795., 653805.])</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>spatial_ref</span></div><div class='xr-var-dims'>()</div><div class='xr-var-dtype'>int32</div><div class='xr-var-preview xr-preview'>32648</div><input id='attrs-d4ce968e-9a4c-499e-a9d0-9bdf7d1f00ca' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d4ce968e-9a4c-499e-a9d0-9bdf7d1f00ca' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-5a609810-7e3e-4bfe-a0c3-9f004650f0f1' class='xr-var-data-in' type='checkbox'><label for='data-5a609810-7e3e-4bfe-a0c3-9f004650f0f1' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>spatial_ref :</span></dt><dd>PROJCS[&quot;WGS 84 / UTM zone 48N&quot;,GEOGCS[&quot;WGS 84&quot;,DATUM[&quot;WGS_1984&quot;,SPHEROID[&quot;WGS 84&quot;,6378137,298.257223563,AUTHORITY[&quot;EPSG&quot;,&quot;7030&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;6326&quot;]],PRIMEM[&quot;Greenwich&quot;,0,AUTHORITY[&quot;EPSG&quot;,&quot;8901&quot;]],UNIT[&quot;degree&quot;,0.0174532925199433,AUTHORITY[&quot;EPSG&quot;,&quot;9122&quot;]],AUTHORITY[&quot;EPSG&quot;,&quot;4326&quot;]],PROJECTION[&quot;Transverse_Mercator&quot;],PARAMETER[&quot;latitude_of_origin&quot;,0],PARAMETER[&quot;central_meridian&quot;,105],PARAMETER[&quot;scale_factor&quot;,0.9996],PARAMETER[&quot;false_easting&quot;,500000],PARAMETER[&quot;false_northing&quot;,0],UNIT[&quot;metre&quot;,1,AUTHORITY[&quot;EPSG&quot;,&quot;9001&quot;]],AXIS[&quot;Easting&quot;,EAST],AXIS[&quot;Northing&quot;,NORTH],AUTHORITY[&quot;EPSG&quot;,&quot;32648&quot;]]</dd><dt><span>grid_mapping_name :</span></dt><dd>transverse_mercator</dd></dl></div><div class='xr-var-data'><pre>array(32648, dtype=int32)</pr
" &#x27;2023-03-06 03:35:14.717000&#x27;, &#x27;2023-03-08 03:25:12.032000&#x27;,\n",
" &#x27;2023-03-11 03:35:07.230000&#x27;, &#x27;2023-03-13 03:25:20.837000&#x27;,\n",
" &#x27;2023-03-16 03:35:15.940000&#x27;, &#x27;2023-03-18 03:25:14.467000&#x27;,\n",
" &#x27;2023-03-21 03:35:10.279000&#x27;, &#x27;2023-03-23 03:25:18.795000&#x27;,\n",
" &#x27;2023-03-26 03:35:14.570000&#x27;, &#x27;2023-03-28 03:25:14.536000&#x27;],\n",
" dtype=&#x27;datetime64[ns]&#x27;, name=&#x27;time&#x27;, freq=None))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>y</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-c7d4eb5e-30d1-4611-a4c8-abd2b1530f36' class='xr-index-data-in' type='checkbox'/><label for='index-c7d4eb5e-30d1-4611-a4c8-abd2b1530f36' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([1105735.0, 1105725.0, 1105715.0, 1105705.0, 1105695.0, 1105685.0,\n",
" 1105675.0, 1105665.0, 1105655.0, 1105645.0,\n",
" ...\n",
" 1017095.0, 1017085.0, 1017075.0, 1017065.0, 1017055.0, 1017045.0,\n",
" 1017035.0, 1017025.0, 1017015.0, 1017005.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;y&#x27;, length=8874))</pre></div></li><li class='xr-var-item'><div class='xr-index-name'><div>x</div></div><div class='xr-index-preview'>PandasIndex</div><input type='checkbox' disabled/><label></label><input id='index-ca95347a-6c89-4d04-a65e-6d0be72d7873' class='xr-index-data-in' type='checkbox'/><label for='index-ca95347a-6c89-4d04-a65e-6d0be72d7873' title='Show/Hide index repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-index-data'><pre>PandasIndex(Index([554795.0, 554805.0, 554815.0, 554825.0, 554835.0, 554845.0, 554855.0,\n",
" 554865.0, 554875.0, 554885.0,\n",
" ...\n",
" 653715.0, 653725.0, 653735.0, 653745.0, 653755.0, 653765.0, 653775.0,\n",
" 653785.0, 653795.0, 653805.0],\n",
" dtype=&#x27;float64&#x27;, name=&#x27;x&#x27;, length=9902))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9471386b-8aa0-43bb-b60b-0387cd694fe6' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-9471386b-8aa0-43bb-b60b-0387cd694fe6' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.DataArray 'NDVI' (time: 12, y: 8874, x: 9902)> Size: 4GB\n",
"dask.array<truediv, shape=(12, 8874, 9902), dtype=float32, chunksize=(1, 2048, 2048), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 96B 2023-03-01T03:35:09.182000 ... 202...\n",
" * y (y) float64 71kB 1.106e+06 1.106e+06 ... 1.017e+06 1.017e+06\n",
" * x (x) float64 79kB 5.548e+05 5.548e+05 ... 6.538e+05 6.538e+05\n",
" spatial_ref int32 4B 32648"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# calculate NDVI\n",
"dsNDVI = calculate_indices(result, index='NDVI', satellite_mission='s2')\n",
"ndvi = dsNDVI[\"NDVI\"]\n",
"display(ndvi)\n"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "f94969d8-d04f-4495-af63-6323d5c730ef",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 24.2 ms, sys: 0 ns, total: 24.2 ms\n",
"Wall time: 23.3 ms\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/env/lib/python3.12/site-packages/xarray/groupers.py:487: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.\n",
" self.index_grouper = pd.Grouper(\n"
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "51e16a0b9fcc432daddf5b30356f07b6",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox()"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-01-18 10:49:45,082 - tornado.application - ERROR - Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f40e8c330e0>>, <Task finished name='Task-412' coro=<MultiProgressBar.listen() done, defined at /env/lib/python3.12/site-packages/distributed/diagnostics/progressbar.py:281> exception=CommClosedError('in <TLS (closed) local=tls://10.0.74.241:58968 remote=gateway://traefik-dask-gateway.easihub:80/easihub.8daaa179e4964dc7b211b4302753bf26>: Stream is closed')>)\n",
"Traceback (most recent call last):\n",
" File \"/env/lib/python3.12/site-packages/distributed/comm/tcp.py\", line 225, in read\n",
" frames_nosplit_nbytes_bin = await stream.read_bytes(fmt_size)\n",
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
"tornado.iostream.StreamClosedError: Stream is closed\n",
"\n",
"The above exception was the direct cause of the following exception:\n",
"\n",
"Traceback (most recent call last):\n",
" File \"/env/lib/python3.12/site-packages/tornado/ioloop.py\", line 750, in _run_callback\n",
" ret = callback()\n",
" ^^^^^^^^^^\n",
" File \"/env/lib/python3.12/site-packages/tornado/ioloop.py\", line 774, in _discard_future_result\n",
" future.result()\n",
" File \"/env/lib/python3.12/site-packages/distributed/diagnostics/progressbar.py\", line 321, in listen\n",
" response = await self.comm.read(\n",
" ^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/env/lib/python3.12/site-packages/distributed/comm/tcp.py\", line 236, in read\n",
" convert_stream_closed_error(self, e)\n",
" File \"/env/lib/python3.12/site-packages/distributed/comm/tcp.py\", line 142, in convert_stream_closed_error\n",
" raise CommClosedError(f\"in {obj}: {exc}\") from exc\n",
"distributed.comm.core.CommClosedError: in <TLS (closed) local=tls://10.0.74.241:58968 remote=gateway://traefik-dask-gateway.easihub:80/easihub.8daaa179e4964dc7b211b4302753bf26>: Stream is closed\n"
]
}
],
"source": [
"%%time\n",
"# calculate average NDVI\n",
"average_ndvi = calculate_average (ndvi,time_pattern=\"1M\")\n",
"progress(average_ndvi)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "06bd6bda-aa8b-44a0-9c8a-d17ccf5b86c3",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"average_ndvi = average_ndvi.compute()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "af4fe58b-358a-42f8-b9a4-f3547d2c230b",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.image.AxesImage at 0x7f3fd2bcbef0>"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.imshow(average_ndvi.isel(time=0))"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "93929102-3ab5-4609-b9e9-dfafd3f32bcd",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "81220350-c319-4ed8-831c-5150c2a4e163",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "3a1a254b-78f6-4783-accc-d7b898bf1e2a",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "edab3c39-1d85-4ef5-831c-f64070c31355",
"metadata": {},
"source": [
"###########################################CALCULATE ACCURACY##########################################"
]
},
{
"cell_type": "code",
"execution_count": 68,
"id": "c83d666e-139c-4215-909e-32c535532b19",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"fill_nan_model = joblib.load('output/regressors/max/gb_cloud.pkl')"
]
},
{
"cell_type": "code",
"execution_count": 64,
"id": "044303a9-e620-46e7-953f-e7f9b3ef91c6",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"mask = ~np.isnan(average_ndvi)\n",
"data = np.stack([average_vh.values[mask], average_vv.values[mask]], axis=1)\n",
"label = average_ndvi.values[mask]"
]
},
{
"cell_type": "code",
"execution_count": 65,
"id": "c38dda57-604f-4705-a282-eaec22f3ea12",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(1000, 2)\n",
"(1000,)\n"
]
}
],
"source": [
"num_samples = 1000\n",
"\n",
"# Generate random indices\n",
"random_indices = np.random.choice(data.shape[0], size=num_samples, replace=False)\n",
"\n",
"# Subset the data using the random indices\n",
"x = data[random_indices]\n",
"y = label[random_indices]\n",
"\n",
"# Check the new shape\n",
"print(x.shape)\n",
"print(y.shape)"
]
},
{
"cell_type": "code",
"execution_count": 66,
"id": "89039d87-49cf-4cac-8020-350c516d9332",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# np.savez(\"input/saved_datasets/test_aug.npz\", data=x, label=y)"
]
},
{
"cell_type": "code",
"execution_count": 69,
"id": "8cdc9d56-6e4a-4da9-9280-e632a1434f12",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"MSE: 0.04130829795907553\n",
"MAE: 0.1617092873613522\n",
"R^2: 0.6916845336468708\n"
]
}
],
"source": [
"preds = fill_nan_model.predict(x)\n",
"mse = mean_squared_error(y, preds)\n",
"mae = mean_absolute_error(y, preds)\n",
"r2 = r2_score(y, preds)\n",
"print(f\"MSE: {mse}\")\n",
"print(f\"MAE: {mae}\")\n",
"print(f\"R^2: {r2}\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "859e29ca-731c-4877-ace3-033f828185f7",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "115ac772-ced4-4671-aeb3-9ee92aeef230",
"metadata": {},
"source": [
"#######################################DRAW GRAPH WITH DOTS##############################################"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0863baf5-5b38-4abe-bb9d-455dfcb188c6",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "73fb2cc1-71cd-4361-a876-f2ad35203848",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 14,
"id": "1be81b66-9ee6-4b4c-b511-3a57a541be31",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>No</th>\n",
" <th>X</th>\n",
" <th>Y</th>\n",
" <th>LU2022</th>\n",
" <th>Hientrang</th>\n",
" <th>HT_code</th>\n",
" <th>geometry</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1.0</td>\n",
" <td>603860.819</td>\n",
" <td>1081162.862</td>\n",
" <td>Pomelo</td>\n",
" <td>CLN</td>\n",
" <td>3</td>\n",
" <td>POINT (603860.819 1081162.862)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2.0</td>\n",
" <td>601306.410</td>\n",
" <td>1082782.940</td>\n",
" <td>Pomelo</td>\n",
" <td>CLN</td>\n",
" <td>3</td>\n",
" <td>POINT (601306.41 1082782.94)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3.0</td>\n",
" <td>601084.510</td>\n",
" <td>1081351.870</td>\n",
" <td>Pomelo</td>\n",
" <td>CLN</td>\n",
" <td>3</td>\n",
" <td>POINT (601084.51 1081351.87)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4.0</td>\n",
" <td>602193.760</td>\n",
" <td>1079205.220</td>\n",
" <td>Pomelo</td>\n",
" <td>CLN</td>\n",
" <td>3</td>\n",
" <td>POINT (602193.76 1079205.22)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5.0</td>\n",
" <td>602459.000</td>\n",
" <td>1080946.000</td>\n",
" <td>Pomelo</td>\n",
" <td>CLN</td>\n",
" <td>3</td>\n",
" <td>POINT (602459 1080946)</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" No X Y LU2022 Hientrang HT_code \\\n",
"0 1.0 603860.819 1081162.862 Pomelo CLN 3 \n",
"1 2.0 601306.410 1082782.940 Pomelo CLN 3 \n",
"2 3.0 601084.510 1081351.870 Pomelo CLN 3 \n",
"3 4.0 602193.760 1079205.220 Pomelo CLN 3 \n",
"4 5.0 602459.000 1080946.000 Pomelo CLN 3 \n",
"\n",
" geometry \n",
"0 POINT (603860.819 1081162.862) \n",
"1 POINT (601306.41 1082782.94) \n",
"2 POINT (601084.51 1081351.87) \n",
"3 POINT (602193.76 1079205.22) \n",
"4 POINT (602459 1080946) "
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"train_path = \"input/train_points/1130/ST_1130_points.shp\" \n",
"# train_path = \"train/updated_data/ThuanHoa_DKS_Kappa.shp\"\n",
"ground_points = load_data_geo(train_path)\n",
"ground_points.head()"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "a24a5b13-a620-4154-bf17-6d277c8d6eb8",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"fill_nan_model = joblib.load('output/regressors/mean_no_negative/rf_cloud.pkl')"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "fa9191d7-6784-4e1d-a1dd-69a9dab56228",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"\n",
"def extract_data_with_HTcode(ground_points, average_ndvi, dsvh, dsvv):\n",
" datasets = {}\n",
" for idx, point in ground_points.iterrows():\n",
" \n",
" # Ensure each HT_code has its own dictionary\n",
" if point.HT_code not in datasets:\n",
" datasets[point.HT_code] = {'ndvi': [], 'vh': [], 'vv': []}\n",
" # Get the data for this point\n",
" ndvi_data = average_ndvi.sel(x=point.geometry.x, y=point.geometry.y, method='nearest').values\n",
" vh_data = dsvh.sel(x=point.geometry.x, y=point.geometry.y, method='nearest').values\n",
" vv_data = dsvv.sel(x=point.geometry.x, y=point.geometry.y, method='nearest').values\n",
" \n",
" # Append the data to the lists for this HT_code\n",
" datasets[point.HT_code]['ndvi'].append(ndvi_data)\n",
" datasets[point.HT_code]['vh'].append(vh_data)\n",
" datasets[point.HT_code]['vv'].append(vv_data)\n",
" \n",
" return datasets"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "069c9adb-1671-4470-93b2-abda9d855be4",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"data = extract_data_with_HTcode(ground_points, average_ndvi, average_vh, average_vv)"
]
},
{
"cell_type": "code",
"execution_count": 361,
"id": "cabb6f91-ff1c-43a5-b02d-d83266e3a4c2",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"index = 0"
]
},
{
"cell_type": "code",
"execution_count": 362,
"id": "0d6f0534-17c7-413a-9cdd-742c4a12b221",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"(62,) (62, 2)\n"
]
}
],
"source": [
"ndvi = np.concatenate(data[index]['ndvi'])\n",
"vh = np.concatenate(data[index]['vh'])\n",
"vv = np.concatenate(data[index]['vv'])\n",
"X_pred = np.stack([vh, vv], axis=1)\n",
"print(ndvi.shape, X_pred.shape)"
]
},
{
"cell_type": "code",
"execution_count": 363,
"id": "3d9375c0-6300-4aa5-8c8b-f36004f908eb",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"(59,)"
]
},
"execution_count": 363,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mask = ~np.isnan(ndvi)\n",
"nonan_ndvi = ndvi[mask]\n",
"nonan_ndvi.shape"
]
},
{
"cell_type": "code",
"execution_count": 357,
"id": "1a191ed6-d10a-49b9-aa43-d87509a050f6",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"(55, 2)"
]
},
"execution_count": 357,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pred_data = X_pred[mask]\n",
"pred_data.shape"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ef84d16b-afce-4527-bfd0-b8d5f7dfb2c8",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 349,
"id": "423a14e8-46e7-4741-bc19-4dbac6edd14d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(75, 2)"
]
},
"execution_count": 349,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pred_data = pred_data[:75]\n",
"nonan_ndvi = nonan_ndvi[:75]\n",
"pred_data.shape"
]
},
{
"cell_type": "code",
"execution_count": 344,
"id": "9d0a8983-01ae-42b1-95d7-918219dcbcb3",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"preds = fill_nan_model.predict(pred_data)"
]
},
{
"cell_type": "code",
"execution_count": 223,
"id": "6cb5be9a-9420-43ce-aa1b-6d98aef655f0",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# print(nonan_ndvi)\n",
"# print(preds)"
]
},
{
"cell_type": "code",
"execution_count": 224,
"id": "02d51159-1654-4a44-9b30-1ee3f955538c",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"MAE: 0.062313261248912975\n",
"R^2: 0.3451370208505795\n"
]
}
],
"source": [
"mae = mean_squared_error(nonan_ndvi, preds)\n",
"r2 = r2_score(preds, nonan_ndvi)\n",
"print(\"MAE: \", mae)\n",
"print(\"R^2: \", r2)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b6402503-4e27-483d-94c5-052121e702f6",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "74318d1a-6e4d-423b-ba2c-26f6f32cfd96",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"# Create the scatter plot\n",
"plt.figure(figsize=(10, 6))\n",
"plt.scatter(nonan_ndvi, preds, color='blue', alpha=0.7, s=15)\n",
"plt.plot([-1, 1], [-1, 1], color='red', linestyle='--', label='y = x')\n",
"# plt.plot( color='red', linestyle='--', label='y = x')\n",
"# Set equal scaling and adjust x and y axis limits from -1 to 1\n",
"plt.gca().set_aspect('equal', adjustable='box')\n",
"# plt.xlim(-1, 1) # Set x-axis limits from -1 to 1\n",
"# plt.ylim(-1, 1) # Set y-axis limits from -1 to 1\n",
"\n",
"# Add minor ticks at intervals of 0.1\n",
"plt.xticks([i * 0.1 for i in range(-10, 11)], rotation=45)\n",
"plt.yticks([i * 0.1 for i in range(-10, 11)])\n",
"\n",
"plt.xlabel('Actual NDVI')\n",
"plt.ylabel('Predicted NDVI')\n",
"plt.title('Comparison between Actual and Predicted NDVI LUA TOM')\n",
"plt.legend()\n",
"plt.grid(True, which='both', linestyle='--', linewidth=0.5)\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3632b6f7-edd8-4a94-9f87-9484515465e1",
"metadata": {},
"outputs": [],
"source": [
"##############################LOOP OVER 7 HT ##############"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "c949778a-1ac4-4287-8ab2-dbbd514eb849",
"metadata": {},
"outputs": [],
"source": [
"def draw_dots(nonan_ndvi, preds, label):\n",
" plt.figure(figsize=(10, 6))\n",
" plt.scatter(nonan_ndvi, preds, color='blue', alpha=0.7, s=15)\n",
" plt.plot([-1, 1], [-1, 1], color='red', linestyle='--', label='y = x')\n",
" # plt.plot( color='red', linestyle='--', label='y = x')\n",
" # Set equal scaling and adjust x and y axis limits from -1 to 1\n",
" plt.gca().set_aspect('equal', adjustable='box')\n",
" # plt.xlim(-1, 1) # Set x-axis limits from -1 to 1\n",
" # plt.ylim(-1, 1) # Set y-axis limits from -1 to 1\n",
" # Add minor ticks at intervals of 0.1\n",
" plt.xticks([i * 0.1 for i in range(-10, 11)], rotation=45)\n",
" plt.yticks([i * 0.1 for i in range(-10, 11)])\n",
" plt.xlabel('Actual NDVI')\n",
" plt.ylabel('Predicted NDVI')\n",
" plt.title('Comparison between Actual and Predicted NDVI ' + label) \n",
" plt.legend()\n",
" plt.grid(True, which='both', linestyle='--', linewidth=0.5)\n",
" plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 59,
"id": "175499f0-891b-4cdf-a7d9-d957d46744e2",
"metadata": {},
"outputs": [],
"source": [
"labels = [\"LUA TOM\", \"LUA\", \"CHN\", \"CLN\", \"TS\", \"DXD\", \"RUNG\"]\n",
"def get_data(data, labels):\n",
" for index in range(0, 7):\n",
" ndvi = np.concatenate(data[index]['ndvi'])\n",
" vh = np.concatenate(data[index]['vh'])\n",
" vv = np.concatenate(data[index]['vv'])\n",
" X_pred = np.stack([vh, vv], axis=1)\n",
" mask = ~np.isnan(ndvi)\n",
" nonan_ndvi = ndvi[mask]\n",
" pred_data = X_pred[mask]\n",
" pred_data = pred_data[:75]\n",
" nonan_ndvi = nonan_ndvi[:75]\n",
" preds = fill_nan_model.predict(pred_data)\n",
" draw_dots(nonan_ndvi, preds, labels[index])\n"
]
},
{
"cell_type": "code",
"execution_count": 60,
"id": "a5127bb0-364e-48d6-a45b-3589019e63f7",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAioAAAI3CAYAAAC1eHD2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAD9vElEQVR4nOydeXhU1f2438wkk8lCNrJvJGQjJCQhq2gRVJTWpWqt4tKCWNGqWJVfta4gakttEelXUawVV1SqorXVYi1qrQWzQQKEhJCQkJCQjSQTJslkmTm/P8a5kg0myYRkkvM+zzwwN/e+95yTkzOfOfcsDkIIgUQikUgkEskERDXeCZBIJBKJRCIZChmoSCQSiUQimbDIQEUikUgkEsmERQYqEolEIpFIJiwyUJFIJBKJRDJhkYGKRCKRSCSSCYsMVCQSiUQikUxYZKAikUgkEolkwiIDFYlEIpFIJBMWGahIFBwcHHj88cfHOxmDEhERweWXXz7eyZCcJb766iscHBz46quvxjspChEREdx8883jnYwz8vjjj+Pg4NDn2ERL+2BplEiGQgYqp1BeXs7tt9/OzJkz0Wq1eHh4cN555/GnP/2Jzs7O8U6exIZ0dHTw+OOPT6gPwrHkuuuuw8HBgd/85jcjduzatYvHH3+c1tZW2yVsEuLg4KC8VCoVwcHBXHLJJXZX12pra3n88ccpKCgYtzTcfPPNODg4kJSUxGC7vTg4OLBy5UrlfWVlZZ/yd3JywtfXl3PPPZeHH36YqqqqPtcnJSURHh4+qNvCeeedR0BAAL29vYp//fr1Z0x7/7T1Z+HChSQmJg76s6amptN+cXzhhRdwcHAgKyvrjOkAeO211/qUy1CviIiIPtf973//4+qrryYgIABnZ2ciIiK4/fbbB5QjfB98qlQqqqurB/y8ra0NFxeXM5bLYDgO6+xJzCeffMK1116Ls7MzS5cuJTExke7ubr755hvuv/9+ioqK+POf/zzeyRxTOjs7cXScGlWio6ODtWvXAuYGYzLT1tbG3//+dyIiInjnnXf4/e9/P6Jvs7t27WLt2rXcfPPNeHl52T6hk4iLL76YpUuXIoSgoqKCF154gQsvvJBPPvmEH/3oR2c9PYcOHUKlGt730traWtauXUtERAQpKSljkzAr2b9/P9u3b+eaa66x6vwbbriBSy+9FJPJREtLC7m5uWzcuJE//elPvPLKK1x//fUA3HTTTTz44IP897//5fzzzx/gqaysZPfu3axcuXJCtY1bt24lIiKCnJwcysrKiI6OPu35559/Pm+++WafY7feeiuZmZncdtttyjF3d3fl/8899xz33HMPM2fO5O677yYoKIji4mL+8pe/sG3bNj799FPOPffcAfdydnbmnXfe4YEHHuhzfPv27SPJKiADFQAqKiq4/vrrmTFjBl988QVBQUHKz+666y7Kysr45JNPxjGFY4fJZKK7uxutVotWqx3v5EjGgA8++ACj0ciWLVu48MIL+frrr1mwYMF4J2tSExsby89+9jPl/dVXX01SUhIbN24cMlAxGAxoNJphBxTW4OzsbHPn2cLFxYWwsDCeeOIJfvKTn1gVZKempvYpf4CjR49yySWXsGzZMuLj40lOTubGG2/koYce4u233x40UHnnnXcQQnDTTTfZLD+jpaKigl27drF9+3Zuv/12tm7dypo1a057zcyZM5k5c2afY7/85S+ZOXPmgHICc0/Kvffeyw9+8AN27NiBq6ur8rM77riD8847j5/+9KcUFRXh7e3d59pLL7100EDl7bff5rLLLuODDz4Ybpblox+AP/zhD+j1el555ZU+QYqF6Oho7rnnHuV9b28vTz75JFFRUUp32MMPP0xXV1ef6yzjKr766ivS09NxcXFhzpw5Shfw9u3bmTNnDlqtlrS0NPbu3dvn+ptvvhl3d3eOHDnC4sWLcXNzIzg4mCeeeGJAV+X69es599xzmT59Oi4uLqSlpfH+++8PyIul223r1q0kJCTg7OzMjh07lJ+d2tV48uRJ7r33XiIiInB2dsbf35+LL76YPXv29HG+9957pKWl4eLigq+vLz/72c+oqakZNC81NTVcddVVuLu74+fnx69//WuMRuMQv5mB/Otf/yIlJQWtVsvs2bMHjdJbW1u59957CQsLw9nZmejoaJ5++mlMJhNg/pbk5+cHwNq1a5Vuz8cff5yPP/4YBwcH9u3bp/g++OADHBwc+MlPftLnPvHx8SxZsqTPsbfeekspCx8fH66//vpBu0Gzs7P54Q9/iKenJ66urixYsID//e9/fc6xdKWWlZUpvRienp4sX76cjo4Oq8ts69atXHzxxVxwwQXEx8ezdevWQc8rKSnhuuuuw8/PDxcXF+Li4njkkUeUtNx///0AREZGKmVWWVmpdIe/9tprA5z969TRo0e58847iYuLw8XFhenTp3PttddSWVlpdX5OxVqfpev7f//7H6tWrcLPzw83NzeuvvpqGhsb+5wrhOCpp54iNDQUV1dXLrjgAoqKikaUPgtz5szB19eXiooK4PsxOO+++y6PPvooISEhuLq60tbWBlhXPwC++eYbMjIy0Gq1REVF8dJLLw16/8HGqLS2tnLfffcpf9+hoaEsXbqUpqYmvvrqKzIyMgBYvny58vs+9Xds6zQOhUql4tFHH2Xfvn18+OGHw7r2VGbMmMFrr71Gd3c3f/jDHwAICwvj/PPP5/3336enp2fANW+//TZRUVFWP2I5G2zduhVvb28uu+wyfvrTnw759zwannzySRwcHHj99df7BCkAUVFR/OEPf+D48eOD/i5vvPFGCgoKKCkpUY7V1dXxxRdfcOONN44sQUIiQkJCxMyZM60+f9myZQIQP/3pT8WmTZvE0qVLBSCuuuqqPufNmDFDxMXFiaCgIPH444+LZ599VoSEhAh3d3fx1ltvifDwcPH73/9e/P73vxeenp4iOjpaGI3GPvfRarUiJiZG/PznPxfPP/+8uPzyywUgHnvssT73Cg0NFXfeead4/vnnxYYNG0RmZqYAxD/+8Y8+5wEiPj5e+Pn5ibVr14pNmzaJvXv3Kj9bs2aNcu6NN94oNBqNWLVqlfjLX/4inn76aXHFFVeIt956Sznn1VdfFYDIyMgQzz77rHjwwQeFi4uLiIiIEC0tLQPykpCQIG655Rbx4osvimuuuUYA4oUXXjhjmc+YMUPExsYKLy8v8eCDD4oNGzaIOXPmCJVKJf71r38p57W3t4ukpCQxffp08fDDD4vNmzeLpUuXCgcHB3HPPfcIIYTQ6/XixRdfFIC4+uqrxZtvvinefPNNUVhYKE6cOCEcHBzEc889pzjvueceoVKphJ+fn3KsoaFBAOL5559Xjj311FPCwcFBLFmyRLzwwgti7dq1wtfXd0BZ7Ny5U2g0GjFv3jzxzDPPiGeffVYkJSUJjUYjsrOzlfPWrFkjADF37lzxk5/8RLzwwgvi1ltvFYB44IEHzlhmQghRU1MjVCqVePPNN4UQQjzxxBPC29tbdHV19TmvsLBQeHh4iOnTp4uHHnpIvPTSS+KBBx4Qc+bMUX5+ww03CEA8++yzSpnp9XpRUVEhAPHqq68OuH//OvXee++J5ORksXr1avHnP/9ZPPzww8Lb21vMmDFDtLe3K+d9+eWXAhBffvnlafNnrc9ST+fOnSsuvPBC8dxzz4n/9//+n1Cr1eK6667r43z00UcFIC699FLx/PPPi1tuuUUEBwcLX19fsWzZsjOWOSDuuuuuPseam5uFWq0W55xzTp/8zZ49W6SkpIgNGzaIdevWifb2dqvrx759+4SLi4sIDw8X69atE08++aQICAgQSUlJon/TPmPGjD5pP3nypEhMTBRqtVqsWLFCvPjii+LJJ58UGRkZYu/evaKurk488cQTAhC33Xab8vsuLy8XQlhfh4eTxsFYtmyZcHNzE729vSImJkYkJycLk8k0ZFlb6uIf//jHIZ1RUVF9/pb//Oc/C0D8/e9/73Pevn37BCBWr149LP9QaevPggULREJCwqA/a2xsHPC3Y2HWrFniF7/4hRBCiK+//lo
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "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Vq1aRVNTE/v37yc1NRWANWvWyL/v/r9ja5fRFAqFgkceeYSCggI++ugji47tz6xZs3j99dfp7u7mmWeeASAkJITFixfzwQcf0NPTM+SYd999l4iICNLT0y06V0ZGBnv27OGXv/zlkOQD+hJCc2/jjMT555/PRRddxDPPPDNhwwREAmJl/vWvfzF79mzOO+88s/a/7bbb2LBhA0lJSbzwwgssWbKELVu2cOONNw7Zt7S0lJtvvpmrrrqKLVu20NLSwlVXXcU777zDfffdx89+9jM2b95MWVkZN9xwg/whaUSv13PppZfi5+fHM888Q3JyMhs3bmTjxo0D9nvxxRdZsGABjz32GE899RT29vZcf/31w165+eqrr7jvvvtYuXIlL774ImFhYcPW8/bbb+fPf/4z1113HS+//DL3338/Tk5OFBUVyfu8/vrr3HDDDSiVSrZs2cLatWvZvXs3F1xwwZBL9Xq9nuXLlzNz5ky2bt3KkiVLeO655/jrX/9qVrsfP36clStXctlll7Flyxa5jl988YW8T0dHB0uWLOHtt99m1apV/PGPf+T888/n4Ycflr8h+Pj48Oc//xno+2b61ltv8dZbb3HttddywQUXYGdnx9dffy07v/nmGxQKBd9++628rbGxkeLi4gHfmp588klWrVpFVFQUzz//PPfeey979+5l8eLFA9riq6++YvHixbS1tbFx40aeeuopWltbueiii8jMzBxS7xtuuIEzZ86wZcsWbrjhBl5//XU2b95sVpvV1tayb98+brrpJqDv0vQHH3xAd3f3gP0KCgpIT0/nq6++Yu3atbz44ousWLGCf/3rXwBce+21suOFF16Q28yYyJlLVlYWBw4c4MYbb+SPf/wjt99+O3v37mXp0qWjuoxsqe/uu+8mPz+fjRs3cscdd/Cvf/1rwBgCgA0bNvDoo4+SkJDAs88+y+zZs7nkkktob2+3uHxGWlpaaGlpYebMmQO2P/744+zZs4f777+fp556CpVKZXb/OHz4MJdccgkNDQ1s2rSJNWvWsHHjRrM+pLVaLYsWLeKll17ikksu4cUXX+T222+nuLiYkydPEhMTw2OPPQbAr371K/n3bezvE1HG/tx8881ERUUN++XLEhYuXEhERMSAmHHLLbdw+vRpPv/88wH7Hj58mCNHjozq6scnn3wCwM9//nOLjmtubqapqWnIa/DnQn82bdpEfX29HNPGHUlgNTQajQRIV199tVn75+XlSYB02223Ddh+//33S4D01VdfydtmzZolAdKBAwfkbZ9//rkESE5OTlJlZaW8/S9/+YsESPv27ZO3rV69WgKku+++W95mMBikK664QlKpVFJjY6O8vaOjY0B5uru7pbi4OOmiiy4asB2QFAqFVFhYOKRugLRx40b5vbu7u3TXXXeZbIvu7m7J19dXiouLkzo7O+Xt/+///T8JkDZs2DCkLo899tgAx4IFC6Tk5GST5zBibMsPP/xQ3qbRaKSAgABpwYIF8rbHH39ccnFxkUpKSgYc/9BDD0lKpVKqqqqSJEmSGhsbh9TXSGxsrHTDDTfI75OSkqTrr79eAqSioiJJkiRp9+7dEiDl5+dLkiRJFRUVklKplJ588skBrsOHD0v29vbydoPBIEVFRUnLly+XDAaDvF9HR4cUHh4u/fjHP5a
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAI3CAYAAACiWuA/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAD9bElEQVR4nOydeXhU1f2438wkk0kyZCP7RkI2spCErEWLoFJpXarWKi4tiBVbFZfyE79qFUSs1FZRqyi2ivtW19qq2IpSa8FsEAIhISQkJCRkI8mESTJZZs7vj3GuCUlgQiYkE877PPNA7tz73nNOTs585mzXSQghkEgkEolEIjmNqCY6ARKJRCKRSM48ZAAikUgkEonktCMDEIlEIpFIJKcdGYBIJBKJRCI57cgARCKRSCQSyWlHBiASiUQikUhOOzIAkUgkEolEctqRAYhEIpFIJJLTjgxAJBKJRCKRnHZkACIZF5ycnHjwwQcnOhnDEhkZycUXXzzRyZCcJrZt24aTkxPbtm2b6KQoREZGcv311090Mk7Kgw8+iJOT06Bjky3tw6VR4hjIAGScqKys5Ne//jUzZ85Eq9Xi6enJ2WefzVNPPUV3d/dEJ09iR7q6unjwwQcn1QfceHLVVVfh5OTE//3f/52yY/v27Tz44IO0t7fbL2FTECcnJ+WlUqkICQnhggsucLi6Vl9fz4MPPkhRUdGEpeH666/HycmJlJQUhnsCiZOTEytWrFB+rq6uHlT+Li4u+Pn5cdZZZ3HfffdRU1Mz6PqUlBQiIiKGdVs5++yzCQwMpL+/X/E/9thjJ037wHQ4Ozvj6+tLRkYGd9xxB/v27Rty/gsvvICTkxOvvPLKkPd27NiBSqXirrvuUo4tWLBgUD3z9PQkPj6eX/7yl/z73/8+afpOFRmAjAOffPIJs2fP5m9/+xuXXHIJTz/9NOvXryciIoJVq1Zxxx13THQSx53u7m7uv//+iU7GaaGrq4u1a9c63IfCqdDR0cE//vEPIiMjeeutt07Y2J6I7du3s3btWhmA2MCPfvQjXnvtNV555RV+85vfUFxczHnnncdnn302IenZv38/f/3rX0d1TX19PWvXrp3QAMTKnj17+OCDD2w+/5prruG1117jxRdf5IEHHmDmzJk8+eSTJCQk8PbbbyvnXXfdddTW1vLf//53WE91dTU7duxg8eLFODs7jzrd1nrw0ksv8dBDD5Gens4rr7xCamoqGzZsGHTur371K374wx9y1113cfToUeV4X18fN910E+Hh4axdu3bQNWFhYbz22mu8+uqr/OlPf+KnP/0p27dv54ILLmDx4sX09fWNOs0nY/SlIDkhVVVVXH311cyYMYMvv/yS4OBg5b1bb72ViooKPvnkkwlM4fhhNpvp7e1Fq9Wi1WonOjmSceD999/HZDKxefNmzjvvPL7++mvmz58/0cma0sTFxfGLX/xC+fnyyy8nJSWFJ598kp/85CfDXmM0GtFoNKhU9v+O6erqanfn6cLNzY3w8HAeeughfvazn9k0dJOenj6o/AEOHTrEBRdcwNKlS0lISCA1NZVrr72We++9lzfffJNzzjlniMcasF933XWnlPbj6wHAH/7wBy655BL+3//7f8yaNYsLL7wQsPSYPP/886SlpXHXXXfx0ksvAfD444+zd+9ePv74Yzw8PAa5vLy8hvXffvvtPPvss0RGRvLoo4+eUtpHQvaA2Jk//vGPGAwGXnzxxUHBh5WYmJhBPSD9/f2sW7eO6OhoXF1diYyM5L777qOnp2fQddZ5C9u2bSMzMxM3Nzdmz56tfOv+4IMPmD17NlqtloyMDHbt2jXo+uuvvx6dTsfBgwdZtGgRHh4ehISE8NBDDw35FvvYY49x1llnMX36dNzc3MjIyOC9994bkhdrl+Ubb7xBUlISrq6ubNmyRXlv4ByQY8eOceeddxIZGYmrqysBAQH86Ec/YufOnYOc7777LhkZGbi5ueHn58cvfvEL6urqhs1LXV0dl112GTqdDn9/f+666y5MJtMIv5mh/Otf/yItLQ2tVktiYuKw34ra29u58847CQ8Px9XVlZiYGB599FHMZjNg+Vbj7+8PwNq1a5VuzAcffJCPP/4YJycniouLFd/777+Pk5MTP/vZzwbdJyEhgcWLFw869vrrrytl4evry9VXX01tbe2QNObm5vLjH/8YLy8v3N3dmT9/Pv/73/8GnWMdJ6+oqOD666/H29sbLy8vli1bRldXl81l9sYbb/CjH/2Ic889l4SEBN54441hzysrK+Oqq67C398fNzc34uPj+d3vfqekZdWqVQBERUUpZVZdXa10S7/88stDnMfXqUOHDnHLLbcQHx+Pm5sb06dP58orr6S6utrm/AzEVt/LL7+Mk5MT//vf/1i5ciX+/v54eHhw+eWX09zcPOhcIQQPP/wwYWFhuLu7c+6551JSUnJK6bMye/Zs/Pz8qKqqAr6f4/L2229z//33Exoairu7Ox0dHYBt9QPgm2++ISsrC61WS3R0NM8///yw9x9uDkh7ezu//e1vlb/vsLAwlixZQktLC9u2bSMrKwuAZcuWKb/vgb9je6dxJFQqFffffz/FxcV8+OGHo7p2IDNmzODll1+mt7eXP/7xjwCEh4dzzjnn8N577w3bW/Dmm28SHR1NTk7OKd/3eKZPn87bb7+Ns7Mzv//97we9l5iYyKpVq3j55Zf5z3/+Q1VVlRJ4XXLJJTb51Wo1f/7zn0lMTOSZZ55Br9fbLe0ACIldCQ0NFTNnzrT5/KVLlwpA/PznPxcbN24US5YsEYC47LLLBp03Y8YMER8fL4KDg8WDDz4onnjiCREaGip0Op14/fXXRUREhPjDH/4g/vCHPwgvLy8RExMjTCbToPtotVoRGxsrfvnLX4pnnnlGXHzxxQIQDzzwwKB7hYWFiVtuuUU888wzYsOGDSI7O1sA4p///Oeg8wCRkJAg/P39xdq1a8XGjRvFrl27lPfWrFmjnHvttdcKjUYjVq5cKV544QXx6KOPiksuuUS8/vrryjkvvfSSAERWVpZ44oknxD333CPc3NxEZGSkaGtrG5KXpKQkccMNN4jnnntOXHHFFQIQzz777EnLfMaMGSIuLk54e3uLe+65R2zYsEHMnj1bqFQq8a9//Us5r7OzU6SkpIjp06eL++67T2zatEksWbJEODk5iTvuuEMIIYTBYBDPPfecAMTll18uXnvtNfHaa6+J3bt3i6NHjwonJyfx9NNPK8477rhDqFQq4e/vrxxramoSgHjmmWeUYw8//LBwcnISixcvFs8++6xYu3at8PPzG1IWW7duFRqNRsydO1c8/vjj4oknnhApKSlCo9GI3Nxc5bw1a9YIQMyZM0f87Gc/E88++6y48cYbBSDuvvvuk5aZEELU1dUJlUolXnvtNSGEEA899JDw8fERPT09g87bvXu38PT0FNOnTxf33nuveP7558Xdd98tZs+erbx/zTXXCEA88cQTSpkZDAZRVVUlAPHSSy8Nuf/xderdd98VqampYvXq1eIvf/mLuO+++4SPj4+YMWOG6OzsVM776quvBCC++uqrE+bPVp+1ns6ZM0ecd9554umnnxb/7//9P6FWq8VVV101yHn//fcLQFx44YXimWeeETfccIMICQkRfn5+YunSpSctc0Dceuutg461trYKtVotfvCDHwzKX2JiokhLSxMbNmwQ69evF52dnTbXj+LiYuHm5iYiIiLE+vXrxbp160RgYKBISUkRx39MzJgxY1Dajx07JpKTk4VarRbLly8Xzz33nFi3bp3IysoSu3btEg0NDeKhhx4SgLjpppuU33dlZaUQwvY6PJo0DsfSpUuFh4eH6O/vF7GxsSI1NVWYzeYRy9paF//0pz+N6IyOjh70t/yXv/xFAOIf//jHoPOKi4sFIFavXj0q/0hpO57zzz9fqFQqodfrBx3v6uoSM2fOFPHx8eKCCy4Q06ZNE4cPHx5y/fz580VSUtKI/nXr1g37GTBWZABiR/R6vQDEpZdeatP5RUVFAhA33njjoON33XWXAMSXX36pHJsxY4YAxPb
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAiAAAAI3CAYAAACiWuA/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydeVzUdf74n8xwDIdccl+CHIqgICBstR6VZVlttm3atZq72XbY5S/7VluaXW6bmW1rudtmdud2t1vrbllutRoIiAqCCIIgyCUwOMBwzHx+f0zzkQEGZmA4Bt/Px2MewGc+n+e83+/58J7XvE8HSZIkBAKBQCAQCEYRxVgnQCAQCAQCwbmHCEAEAoFAIBCMOiIAEQgEAoFAMOqIAEQgEAgEAsGoIwIQgUAgEAgEo44IQAQCgUAgEIw6IgARCAQCgUAw6ogARCAQCAQCwagjAhCBQCAQCASjjghABMPCwcGBxx9/fKyT0S+RkZFceeWVY50MwSixZ88eHBwc2LNnz1gnRSYyMpJbbrllrJMxKI8//jgODg4mx8Zb2vtLo8C+EQHIMCktLeV3v/sdU6dORaVS4enpyQUXXMCLL75Ie3v7WCdPYEPa2tp4/PHHx9UH3EiydOlSHBwc+L//+78hO/bu3cvjjz9Oc3Oz7RI2AXFwcJAfCoWCkJAQLr30Uru716qrq3n88cfJy8sbszTccsstODg4MGvWLPrbacTBwYHVq1fLf5eXl5uUv5OTE35+fpx//vk88sgjVFRUmFw/a9YsIiIi+nUbueCCCwgMDKS7u1v2b9q0adC090yHg4MDnp6ezJ8/ny+++KLPucaArKGhoV9XYmIiCxYs6DefH330kVW+77//nqVLlxIaGoqzszNeXl5kZGTwxBNPUFtbO2i+zCECkGHwxRdfMHPmTP7+979z1VVX8dJLL7Fx40YiIiJYu3Yt995771gnccRpb2/n0UcfHetkjAptbW1s2LDB7j4UhkJLSwv/+Mc/iIyM5L333huwsh2IvXv3smHDBhGAWMAll1zCW2+9xRtvvMHtt9/OoUOHuOiii/jXv/41Juk5evQor776qlXXVFdXs2HDhjENQIwcPnyYjz/+2OLzb7jhBt566y1ee+01HnvsMaZOncqWLVuIj4/n/fffl8+76aabqKys5Pvvv+/XU15ezr59+1i2bBmOjo5Wp9t4H7z55ps8+OCDlJSUcNVVV/Hvf//bapc5nnjiCYv/p9etW8e8efPIycnhlltu4ZVXXuGZZ54hISGB559/nvPPP3/I6bC+dAQAlJWVcf311zNlyhS++eYbgoOD5efuuusuSkpK+o1aJwJ6vZ7Ozk5UKhUqlWqskyMYAT766CN0Oh3bt2/noosu4rvvvmP+/PljnawJTVxcHDfffLP89zXXXMOsWbPYsmULl19+eb/XaLVanJ2dUShs/13SxcXF5s7RwtXVlfDwcJ544gl++ctfWtR1k5KSYlL+ACdOnODSSy9lxYoVxMfHk5SUxI033sjDDz/Mu+++y7x58/p4jAH7TTfdNKS0974Prr32WmbMmMGLL77IokWLhuTsSXJyMnl5eXzyySf88pe/HPDcnTt38uSTT7J06VLeeustnJ2dTZ5/4YUXeOGFF4acFtECMkT++Mc/otFoeO2110yCDyMxMTEmLSDd3d08+eSTREdH4+LiQmRkJI888ggdHR0m1xnHLezZs4e0tDRcXV2ZOXOm/K37448/ZubMmahUKlJTUzlw4IDJ9bfccgseHh4cP36cRYsW4e7uTkhISL8R76ZNmzj//POZPHkyrq6upKam8uGHH/bJi7HJ8p133iEhIQEXFxd27dolP9dzDMiZM2e47777iIyMxMXFhYCAAC655BJyc3NNnB988AGpqam4urri5+fHzTffTFVVVb95qaqqYsmSJXh4eODv788DDzyATqcz88705T//+Q/JycmoVCpmzJjR77ei5uZm7rvvPsLDw3FxcSEmJoZnn30WvV4PGL7V+Pv7A7Bhwwa5KfPxxx/n888/x8HBgUOHDsm+jz76CAcHhz7/4PHx8Sxbtszk2Ntvvy2Xha+vL9dffz2VlZV90piZmclll12Gl5cXbm5uzJ8/n//9738m5xibUUtKSrjlllvw9vbGy8uLlStX0tbWZnGZvfPOO1xyySVceOGFxMfH88477/R7XlFREUuXLsXf3x9XV1emTZvG73//ezkta9euBSAqKkous/Lycrk5eMeOHX2cve+pEydOcOeddzJt2jRcXV2ZPHky1113HeXl5RbnpyeW+nbs2IGDgwP/+9//WLNmDf7+/ri7u3PNNddQX19vcq4kSTz11FOEhYXh5ubGhRdeSEFBwZDSZ2TmzJn4+flRVlYGnB3j8v777/Poo48SGhqKm5sbLS0tgGX3B8APP/zAnDlzUKlUREdH85e//KXf1+9vDEhzczP333+//P8dFhbG8uXLaWhoYM+ePcyZMweAlStXyu93z/fY1mk0h0Kh4NFHH+XQoUN88sknVl3bkylTprBjxw46Ozv54x//CEB4eDjz5s3jww8/pKurq8817777LtHR0WRkZAz5dXsSHx+Pn58fpaWlNvFdf/31xMXFWdQKsm7dOvz8/Hjttdf6BB8AXl5ewxoDKAKQIfKPf/yDqVOnWtz8dOutt7Ju3TpSUlJ44YUXmD9/Phs3buT666/vc25JSQk33ngjV111FRs3bqSpqYmrrrqKd955h/vvv5+bb76ZDRs2UFpaytKlS+UPSSM6nY7LLruMwMBA/vjHP5Kamsr69etZv369yXkvvvgis2fP5oknnuCZZ57B0dGR6667rt+Wm2+++Yb777+fZcuW8eKLLxIZGdlvPm+//XZeeeUVrr32Wl5++WUeeOABXF1dKSwslM/ZsWMHS5cuRalUsnHjRlatWsXHH3/Mz3/+8z5N9TqdjkWLFjF58mQ2bdrE/Pnzef755/nrX/9qUbkfO3aMZcuWcfnll7Nx40Y5j1999ZV8TltbG/Pnz+ftt99m+fLl/OlPf+KCCy7g4YcfZs2aNQD4+/vzyiuvAIZvpm+99RZvvfUWv/zlL/n5z3+Og4MD3333nez8/vvvUSgU/PDDD/Kx+vp6ioqKTL41Pf300yxfvpzY2Fg2b97Mfffdx+7du5k3b55JWXzzzTfMmzePlpYW1q9fzzPPPENzczMXXXQRWVlZffK9dOlSzpw5w8aNG1m6dCk7duxgw4YNFpVZdXU13377LTfccANgaJr+8MMP6ezsNDnv0KFDZGRk8M0337Bq1SpefPFFlixZwj/+8Q8AfvnLX8qOF154QS4zYyBnKfv372fv3r1cf/31/OlPf+L2229n9+7dLFiwwKqgaqi+u+++m4MHD7J+/XruuOMO/vGPf5iMIQBDRf3YY4+RlJTEc889x9SpU7n00ktpbW21On1GmpqaaGpqYvLkySbHn3zySb744gseeOABnnnmGZydnS2+Pw4fPsyll15KXV0djz/+OCtXrmT9+vUWfUhrNBrmzp3LSy+9xKWXXsqLL77I7bffTlFRESdPniQ+Pp4nnngCgNtuu01+v433+2iksSc33ngjsbGxVnU39Md5551HdHS0SZ1x0003cfr06T7dIocPHyY/P3/IrR/9oVaraWpqwsfHxyY+pVLJo48+ysGDBwcs0+LiYoqLi+UvfyOCJLAatVotAdLVV19t0fl5eXkSIN16660mxx944AEJkL755hv52JQpUyRA2rt3r3zs3//+twRIrq6u0okTJ+Tjf/nLXyRA+vbbb+VjK1askADp7rvvlo/p9XrpiiuukJydnaX6+nr5eFtbm0l6Ojs7pcTEROmiiy4yOQ5ICoVCKigo6JM3QFq/fr38t5eXl3TXXXeZLYvOzk4pICBASkxMlNrb2+Xj//znPyVAWrduXZ+8PPHEEyaO2bNnS6mpqWZfw4ixLD/66CP5mFqtloKDg6XZs2fLx5588knJ3d1dKi4uNrn+oYcekpRKpVRRUSFJkiTV19f3ya+RhIQEaenSpfLfKSkp0nXXXScBUmFhoSRJkvTxxx9LgHTw4EF
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"get_data(data, labels)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "685a99cc-10f9-4ca9-8423-074ed1de817c",
"metadata": {},
"outputs": [],
"source": [
"for index in range(0, 7):\n",
" ndvi = np.concatenate(data[index]['ndvi'])\n",
" vh = np.concatenate(data[index]['vh'])\n",
" vv = np.concatenate(data[index]['vv'])\n",
"\n",
" mask = ~np.isnan(ndvi)\n",
" nonan_ndvi = ndvi[mask]\n",
" pred_data = X_pred[mask]\n",
" pred_data = pred_data[:75]\n",
" nonan_ndvi = nonan_ndvi[:75]\n",
" preds = fill_nan_model.predict(pred_data)\n",
" draw_dots(nonan_ndvi, preds)\n",
" "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "978d596b-bc48-4491-8616-880f6661ea53",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "0a15077a-b1da-4037-b28b-1871d0446d85",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "f13c8c73-8c73-4561-82f4-6c0b0f7d7afc",
"metadata": {},
"outputs": [],
"source": [
"###################################################################################################################"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "abf0ec42-817b-4806-aae5-fd34b2e10727",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
"# Function to filter out NaN values for each 'ndvi' array in each HT_code\n",
"def filter_non_nan_ndvi(data):\n",
" filtered_data = {}\n",
" \n",
" for ht_code, attributes in data.items():\n",
" # Initialize lists to store filtered arrays for 'ndvi', 'vh', and 'vv'\n",
" filtered_ndvi = []\n",
" filtered_vh = []\n",
" filtered_vv = []\n",
" \n",
" # Iterate through each set of ndvi, vh, vv arrays\n",
" for ndvi, vh, vv in zip(attributes['ndvi'], attributes['vh'], attributes['vv']):\n",
" # Create masks to filter out NaN values based on 'ndvi' array\n",
" non_nan_mask = ~np.isnan(ndvi)\n",
" \n",
" # Filter the arrays based on the mask\n",
" filtered_ndvi.append(ndvi[non_nan_mask])\n",
" filtered_vh.append(vh[non_nan_mask])\n",
" filtered_vv.append(vv[non_nan_mask])\n",
" \n",
" # Only add if there are non-empty filtered values\n",
" filtered_data[ht_code] = {\n",
" 'ndvi': filtered_ndvi,\n",
" 'vh': filtered_vh,\n",
" 'vv': filtered_vv\n",
" }\n",
" \n",
" return filtered_data\n",
"\n",
"# Example usage\n",
"filtered_datasets = filter_non_nan_ndvi(data)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e9bb9522-3aec-42b0-930a-cbc647d50d8f",
"metadata": {},
"outputs": [],
"source": [
"filtered_datasets"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7b96cbbd-0b5f-4dc7-87c4-f960554409a8",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import numpy as np\n",
"\n",
"# Set the range of indices you want to include\n",
"indices = range(0, 11) # Selects indices from 0 to 10\n",
"ht_code = 1\n",
"# Initialize empty lists to hold data for the selected range\n",
"X_list = []\n",
"y_list = []\n",
"\n",
"# Loop over the indices and collect data\n",
"for index in indices:\n",
" vh_data = filtered_datasets[ht_code]['vh'][index]\n",
" vv_data = filtered_datasets[ht_code]['vv'][index]\n",
" ndvi_data = filtered_datasets[ht_code]['ndvi'][index]\n",
" \n",
" # Stack VH and VV data for the current index\n",
" X = np.column_stack((vh_data, vv_data))\n",
" X_list.append(X)\n",
" y_list.append(ndvi_data)\n",
"\n",
"# Concatenate the lists to form the complete dataset\n",
"X_combined = np.concatenate(X_list, axis=0)\n",
"y_combined = np.concatenate(y_list, axis=0)\n",
"print(\"X shape:\", X_combined.shape)\n",
"print(\"y shape:\", y_combined.shape)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7508e5b2-d93c-466a-8a2b-6a01765348a2",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"preds = fill_nan_model.predict(X_combined)\n",
"mse = mean_squared_error(y_combined, preds)\n",
"mae = mean_absolute_error(y_combined, preds)\n",
"r2 = r2_score(preds, y_combined)\n",
"print(f\"MSE: {mse}\")\n",
"print(f\"MAE: {mae}\")\n",
"print(f\"R^2: {r2}\")\n",
"# print(y)\n",
"# print(preds)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "94a2344f-9a3e-41f2-980b-661d247d9719",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"# Tạo biểu đồ với độ chia đồng nhất cho cả hai trục\n",
"# plt.figure(figsize=(10, 6))\n",
"plt.scatter(y_combined, preds, color='blue', alpha=0.7)\n",
"plt.plot([y_combined.min(), y_combined.max()],\n",
" [y_combined.min(), y_combined.max()], color='red', linestyle='--', label='y = x')\n",
"\n",
"# Thiết lập tỷ lệ các trục đồng nhất\n",
"plt.gca().set_aspect('equal', adjustable='box')\n",
"plt.xlim(y_combined.min() - 0.1, y_combined.max() + 0.1) # Điều chỉnh giới hạn trục x\n",
"plt.ylim(y_combined.min() - 0.1, y_combined.max() + 0.1) # Điều chỉnh giới hạn trục y\n",
"\n",
"plt.xlabel('Actual NDVI')\n",
"plt.ylabel(' predicted NDVI')\n",
"plt.title('Comparing between actual and predict NDVI')\n",
"plt.legend()\n",
"plt.grid(True)\n",
"plt.show()\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "d3996556-fb13-46c3-b1a2-01af71c1ca1b",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "907302e4-724b-4555-812d-5badc4129cea",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "600e86b5-fcda-4d75-a488-af51f91a7215",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "2b163c49-0b1e-481e-9f83-2fe9f4ba2c35",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "e0a7e22b-c7bb-4b0d-b31a-f63cb2df015d",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "d6985c3b-1687-48d4-8322-d7b7bfa9deb2",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "7a416c4f-8c97-4069-8dd6-f17bded7783b",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "76feffb6-b842-41ab-8289-561df2be66f1",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "9baa110e-4fd2-4f37-afae-b786b07a8030",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# Assuming 'data' is the output of the function\n",
"ht_code = 1 # Replace with the specific HT code you want to extract\n",
"index = 3 # Replace with the index of the point you want to access (if multiple points are available)\n",
"\n",
"# Extract the NDVI, VH, and VV values for that HT_code\n",
"ndvi_values = data[ht_code]['ndvi'][index]\n",
"vh_values = data[ht_code]['vh'][index]\n",
"vv_values = data[ht_code]['vv'][index]\n",
"\n",
"# print(\"NDVI Values:\", ndvi_values)\n",
"# print(\"VH Values:\", vh_values)\n",
"# print(\"VV Values:\", vv_values)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "109e94bf-30a8-445d-b57a-6e71bb57dfa6",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"print(data[ht_code]['vv'][index].shape)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eb83b856-4772-4bc1-91d0-08fe7e229d7f",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"input_data = np.column_stack((vh_values, vv_values))\n",
"\n",
"# Make predictions for each month\n",
"predicted_ndvi = fill_nan_model.predict(input_data)\n",
"\n",
"# Print the predictions\n",
"print(\"Predicted NDVI for each month:\", predicted_ndvi)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3a17c632-1f57-4d09-98ab-3b444da78749",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"plt.plot(ndvi_values, marker='o', linestyle='-', color='b', label='Actual Values')\n",
"\n",
"# Plotting the adjusted values\n",
"plt.plot(predicted_ndvi, marker='x', linestyle='--', color='r', label='Predicted Values')\n",
"\n",
"# Adding labels and title\n",
"plt.xlabel('Index')\n",
"plt.ylabel('Values')\n",
"plt.title('Comparison: Actual vs predicted Values in CLN code over 24 months')\n",
"# Adding grid\n",
"plt.grid(True)\n",
"# Adding legend to differentiate the lines\n",
"plt.legend()\n",
"# # # Adjusting the limits of the axes\n",
"# plt.xlim(0, 75) # Example: Setting x-axis limits from 0 to 12\n",
"# plt.ylim(-1, 1) # Example: Setting y-axis limits from 0 to 1\n",
"# Display the plot\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "547eb119-d70f-4d60-bdd3-07f0b77ec577",
"metadata": {},
"outputs": [],
"source": [
"# cấu hình nhãn dữ liệu\n",
"label_mapping = {\n",
" \"Lua tom\": \"0\",\n",
" \"Lua\": \"1\",\n",
" \"CHN\": \"2\",\n",
" \"CLN\": \"3\",\n",
" \"TS\": \"4\",\n",
" \"Song\": \"5\",\n",
" \"Dat xay dung\": \"6\",\n",
" \"Rung\": \"7\"\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a8e8ca9f-cf1e-4c4e-a692-a5eff9dfb380",
"metadata": {},
"outputs": [],
"source": [
"def draw(ndvi_values, predicted_ndvi, name):\n",
" plt.plot(ndvi_values, marker='o', linestyle='-', color='b', label='Actual Values')\n",
" plt.plot(predicted_ndvi, marker='x', linestyle='--', color='r', label='Predicted Values')\n",
" # Adding labels and title\n",
" plt.xlabel('Index')\n",
" plt.ylabel('Values')\n",
" plt.title(f'Comparison: Actual vs predicted Values in {name} code over 24 months')\n",
" # Adding grid\n",
" plt.grid(True)\n",
" # Adding legend to differentiate the lines\n",
" plt.legend()\n",
" # # # Adjusting the limits of the axes\n",
" plt.xlim(0, 25) # Example: Setting x-axis limits from 0 to 12\n",
" plt.ylim(-1, 1) # Example: Setting y-axis limits from 0 to 1\n",
" # Display the plot\n",
" plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0a0d2657-ebeb-4b29-bfe2-84a5b2599087",
"metadata": {},
"outputs": [],
"source": [
"def show_images (ht_code, index, name):\n",
" ndvi_values = data[ht_code]['ndvi'][index]\n",
" vh_values = data[ht_code]['vh'][index]\n",
" vv_values = data[ht_code]['vv'][index]\n",
" input_data = np.column_stack((vh_values, vv_values))\n",
" predicted_ndvi = fill_nan_model.predict(input_data)\n",
" draw(ndvi_values, predicted_ndvi, name)\n",
" "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f91bbc3c-a089-4cea-ad36-a99b4c5da22b",
"metadata": {},
"outputs": [],
"source": [
"for i in range(50):\n",
" show_images(1, i, 'TS')"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c5d58692-d816-4940-8df7-c449e900c5fe",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "11626d33-c5b1-4e36-a9be-ee23fc8bd5d5",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "5681dda8-3573-48fb-8f0c-3c69a1706bc6",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "6a01e665-23e7-4c74-a99b-cea2c2e243bb",
"metadata": {},
"outputs": [],
"source": [
"plt.plot(data[6]['ndvi'], marker='x', linestyle='--', color='b')\n",
" # Adding labels and title\n",
"plt.xlabel('Index')\n",
"plt.ylabel('Values')\n",
"plt.title(f'NDVI values')\n",
"# Adding grid\n",
"plt.grid(True)\n",
"# Adding legend to differentiate the lines\n",
"plt.legend()\n",
"# # # Adjusting the limits of the axes\n",
"# plt.xlim(0, 25) # Example: Setting x-axis limits from 0 to 12\n",
"plt.ylim(-1, 1) # Example: Setting y-axis limits from 0 to 1\n",
"# Display the plot\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "51629670-5cd3-49d0-8b8f-5dc60c7bc0ea",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "885dbd0b-0595-4c98-b037-e3b2cf7f18dc",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.12.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}