2025-11-12 20:52:57 +07:00
{
"cells": [
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 15,
2025-11-12 20:52:57 +07:00
"id": "912ed572-1658-406b-976c-cd6de2d4e89e",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
2025-11-12 22:31:34 +07:00
"<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
2025-11-12 20:52:57 +07:00
"*[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"
},
2025-11-12 22:31:34 +07:00
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" const force = true;\n",
" const py_version = '3.6.0'.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.3/dist/bundled/reactiveesm/es-module-shims@^1.10.0/dist/es-module-shims.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.6.0.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.6.0.min.js\", \"https://cdn.holoviz.org/panel/1.5.3/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.6.0'.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"
},
2025-11-12 20:52:57 +07:00
{
"data": {
"application/vnd.holoviews_exec.v0+json": "",
"text/html": [
2025-11-12 22:31:34 +07:00
"<div id='p1004'>\n",
" <div id=\"e8a03aa3-1288-4646-8686-613315d061da\" data-root-id=\"p1004\" style=\"display: contents;\"></div>\n",
2025-11-12 20:52:57 +07:00
"</div>\n",
"<script type=\"application/javascript\">(function(root) {\n",
2025-11-12 22:31:34 +07:00
" var docs_json = {\"be14f733-add5-4e6d-bbfa-501412309a6f\":{\"version\":\"3.6.0\",\"title\":\"Bokeh Application\",\"roots\":[{\"type\":\"object\",\"name\":\"panel.models.browser.BrowserInfo\",\"id\":\"p1004\"},{\"type\":\"object\",\"name\":\"panel.models.comm_manager.CommManager\",\"id\":\"p1005\",\"attributes\":{\"plot_id\":\"p1004\",\"comm_id\":\"3495bf32ab1e49a0b180dac63206ed39\",\"client_comm_id\":\"60989a309e724d1b8e65653949cdc24c\"}}],\"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\",\"default\":false}]},{\"type\":\"model\",\"name\":\"TemplateActions1\",\"properties\":[{\"name\
" var render_items = [{\"docid\":\"be14f733-add5-4e6d-bbfa-501412309a6f\",\"roots\":{\"p1004\":\"e8a03aa3-1288-4646-8686-613315d061da\"},\"root_ids\":[\"p1004\"]}];\n",
2025-11-12 20:52:57 +07:00
" 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": {
2025-11-12 22:31:34 +07:00
"id": "p1004"
2025-11-12 20:52:57 +07:00
}
},
"output_type": "display_data"
},
{
"data": {
"text/html": [
2025-11-12 22:31:34 +07:00
"<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
2025-11-12 20:52:57 +07:00
"*[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": {
2025-11-12 22:31:34 +07:00
"application/javascript": [
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" const force = false;\n",
" const py_version = '3.6.0'.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.3/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.6.0'.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
2025-11-12 20:52:57 +07:00
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
2025-11-12 22:31:34 +07:00
"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
2025-11-12 20:52:57 +07:00
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
2025-11-12 22:31:34 +07:00
"<script type=\"esms-options\">{\"shimMode\": true}</script><style>*[data-root-id],\n",
2025-11-12 20:52:57 +07:00
"*[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"
},
2025-11-12 22:31:34 +07:00
{
"data": {
"application/javascript": [
"(function(root) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" const force = false;\n",
" const py_version = '3.6.0'.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.3/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.6.0'.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"
},
2025-11-12 20:52:57 +07:00
{
"name": "stdout",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"CPU times: user 288 ms, sys: 0 ns, total: 288 ms\n",
"Wall time: 294 ms\n"
2025-11-12 20:52:57 +07:00
]
}
],
"source": [
"%%time\n",
"%matplotlib inline\n",
"\n",
"import importlib\n",
"import new_import_ODC \n",
"\n",
"importlib.reload(new_import_ODC)\n",
"\n",
"from new_import_ODC import *"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 16,
2025-11-12 20:52:57 +07:00
"id": "d824dc4f-994b-4d1c-8d24-ce6674da141c",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"An existing cluster was found. Connecting to: easihub.73eb9888ef134f9d955754eada474c75\n",
"CPU times: user 41.7 ms, sys: 106 μs, total: 41.9 ms\n",
"Wall time: 245 ms\n"
2025-11-12 20:52:57 +07:00
]
},
{
"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",
2025-11-12 22:31:34 +07:00
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-5cf25247-bfda-11f0-9acd-62c23ef34656</p>\n",
2025-11-12 20:52:57 +07:00
" <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",
2025-11-12 22:31:34 +07:00
" <strong>Dashboard: </strong> <a href=\"https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.73eb9888ef134f9d955754eada474c75/status\" target=\"_blank\">https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.73eb9888ef134f9d955754eada474c75/status</a>\n",
2025-11-12 20:52:57 +07:00
" </td>\n",
" <td style=\"text-align: left;\"></td>\n",
" </tr>\n",
" \n",
"\n",
" </table>\n",
"\n",
" \n",
2025-11-12 22:31:34 +07:00
" <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.73eb9888ef134f9d955754eada474c75/status\" }'>\n",
2025-11-12 20:52:57 +07:00
" 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",
2025-11-12 22:31:34 +07:00
" <li><b>Name: </b>easihub.73eb9888ef134f9d955754eada474c75\n",
" <li><b>Dashboard: </b><a href='https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.73eb9888ef134f9d955754eada474c75/status' target='_blank'>https://hub.asia.easi-eo.solutions/services/dask-gateway/clusters/easihub.73eb9888ef134f9d955754eada474c75/status</a>\n",
2025-11-12 20:52:57 +07:00
" </ul>\n",
"</div>\n",
"\n",
" </details>\n",
" \n",
"\n",
" </div>\n",
"</div>"
],
"text/plain": [
2025-11-12 22:31:34 +07:00
"<Client: 'tls://10.0.57.227:8786' processes=8 threads=64, memory=224.00 GiB>"
2025-11-12 20:52:57 +07:00
]
},
2025-11-12 22:31:34 +07:00
"execution_count": 16,
2025-11-12 20:52:57 +07:00
"metadata": {},
"output_type": "execute_result"
}
],
"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",
"# Cấu hình truy cập dịch vụ S3\n",
"configure_s3_access(aws_unsigned=False, requester_pays=True, client=client)\n",
"\n",
"client"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 17,
2025-11-12 20:52:57 +07:00
"id": "fbed4c80-bbf8-4ea8-aa45-2460b2ba04c7",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"## cấu hình thời gian lấy ảnh và tọa độ\n",
"date_range = (\"2022-09-01\", \"2023-10-01\")\n",
"longtitude_range = (105.5, 106.4)\n",
"latitude_range = (9.2, 10.0)\n",
"\n",
"coordinates = (longtitude_range, latitude_range)"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 18,
2025-11-12 20:52:57 +07:00
"id": "6b90c49b-0665-4478-a23b-d111ef88eb79",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Most common native CRS: EPSG:32648\n",
"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: 111.21 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",
2025-11-12 22:31:34 +07:00
"html[data-theme=dark],\n",
2025-11-12 20:52:57 +07:00
"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",
2025-11-12 22:31:34 +07:00
" grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
2025-11-12 20:52:57 +07:00
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
2025-11-12 22:31:34 +07:00
" display: inline-block;\n",
" opacity: 0;\n",
2025-11-12 20:52:57 +07:00
"}\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",
2025-11-12 22:31:34 +07:00
".xr-section-item input:focus + label {\n",
" border: 2px solid var(--xr-font-color0);\n",
"}\n",
"\n",
2025-11-12 20:52:57 +07:00
".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'><xarray.Dataset> Size: 119GB\n",
"Dimensions: (time: 151, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1kB 2022-09-02T03:35:23.960000 ... 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 53GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" nir (time, y, x) float32 53GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" scl (time, y, x) uint8 13GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
"Attributes:\n",
" crs: EPSG:32648\n",
2025-11-12 22:31:34 +07:00
" 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-f7e765e7-2f57-4d14-ae71-9f799e20d5fa' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f7e765e7-2f57-4d14-ae71-9f799e20d5fa' 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>: 151</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-339c63a5-8324-478c-a812-a09b14b09930' class='xr-section-summary-in' type='checkbox' checked><label for='section-339c63a5-8324-478c-a812-a09b14b09930' 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'>2022-09-02T03:35:23.960000 ... 2...</div><input id='attrs-b5fd5e84-afee-4373-ab41-8d099d17d20b' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-b5fd5e84-afee-4373-ab41-8d099d17d20b' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3b2cf32b-d14e-44aa-9291-38aaca3e9d7b' class='xr-var-data-in' type='checkbox'><label for='data-3b2cf32b-d14e-44aa-9291-38aaca3e9d7b' 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(['2022-09-02T03:35:23.960000000', '2022-09-04T03:25:18.037000000',\n",
2025-11-12 20:52:57 +07:00
" '2022-09-07T03:35:13.646000000', '2022-09-09T03:25:27.617000000',\n",
" '2022-09-12T03:35:22.247000000', '2022-09-14T03:25:18.529000000',\n",
" '2022-09-17T03:35:13.648000000', '2022-09-19T03:25:24.773000000',\n",
" '2022-09-22T03:35:18.931000000', '2022-09-24T03:25:17.431000000',\n",
" '2022-09-27T03:35:12.140000000', '2022-09-29T03:25:23.829000000',\n",
" '2022-10-02T03:35:19.048000000', '2022-10-07T03:35:09.133000000',\n",
" '2022-10-09T03:25:22.746000000', '2022-10-12T03:35:17.151000000',\n",
" '2022-10-14T03:25:15.533000000', '2022-10-17T03:35:11.148000000',\n",
" '2022-10-19T03:25:18.808000000', '2022-10-22T03:35:13.746000000',\n",
" '2022-10-24T03:25:15.878000000', '2022-10-27T03:35:10.923000000',\n",
" '2022-10-29T03:25:20.127000000', '2022-11-01T03:35:15.818000000',\n",
" '2022-11-03T03:25:14.204000000', '2022-11-06T03:35:10.096000000',\n",
" '2022-11-11T03:35:15.334000000', '2022-11-13T03:25:16.056000000',\n",
" '2022-11-16T03:35:11.542000000', '2022-11-18T03:25:18.155000000',\n",
" '2022-11-21T03:35:12.396000000', '2022-11-23T03:25:16.067000000',\n",
" '2022-11-26T03:35:11.063000000', '2022-11-28T03:25:16.297000000',\n",
" '2022-12-01T03:35:12.009000000', '2022-12-03T03:25:14.366000000',\n",
" '2022-12-06T03:35:10.293000000', '2022-12-08T03:25:17.072000000',\n",
" '2022-12-11T03:35:12.184000000', '2022-12-16T03:35:10.130000000',\n",
" '2022-12-18T03:25:15.584000000', '2022-12-21T03:35:09.988000000',\n",
" '2022-12-23T03:25:15.763000000', '2022-12-26T03:35:11.128000000',\n",
" '2022-12-28T03:25:15.151000000', '2022-12-31T03:35:10.753000000',\n",
" '2023-01-02T03:25:15.152000000', '2023-01-05T03:35:09.844000000',\n",
" '2023-01-07T03:25:15.343000000', '2023-01-10T03:35:10.149000000',\n",
" '2023-01-12T03:25:12.066000000', '2023-01-15T03:35:08.140000000',\n",
" '2023-01-17T03:25:12.454000000', '2023-01-20T03:35:06.593000000',\n",
" '2023-01-22T03:25:14.446000000', '2023-01-25T03:35:09.824000000',\n",
" '2023-01-27T03:25:13.987000000', '2023-01-30T03:35:09.963000000',\n",
" '2023-02-01T03:25:13.595000000', '2023-02-04T03:35:09.008000000',\n",
" '2023-02-06T03:25:15.471000000', '2023-02-09T03:35:10.646000000',\n",
" '2023-02-11T03:25:15.100000000', '2023-02-14T03:35:10.240000000',\n",
" '2023-02-16T03:25:28.099000000', '2023-02-24T03:35:12.118000000',\n",
" '2023-02-26T03:25:14.146000000', '2023-03-01T03:35:09.182000000',\n",
" '2023-03-03T03:25:17.841000000', '2023-03-06T03:35:14.717000000',\n",
" '2023-03-08T03:25:12.032000000', '2023-03-11T03:35:07.230000000',\n",
" '2023-03-13T03:25:20.837000000', '2023-03-16T03:35:15.940000000',\n",
" '2023-03-18T03:25:14.467000000', '2023-03-21T03:35:10.279000000',\n",
" '2023-03-23T03:25:18.795000000', '2023-03-26T03:35:14.570000000',\n",
" '2023-03-28T03:25:14.536000000', '2023-03-31T03:35:10.140000000',\n",
" '2023-04-02T03:25:19.945000000', '2023-04-05T03:35:14.925000000',\n",
" '2023-04-07T03:25:16.518000000', '2023-04-10T03:35:12.000000000',\n",
" '2023-04-15T03:35:12.743000000', '2023-04-20T03:35:10.328000000',\n",
" '2023-04-22T03:25:18.572000000', '2023-04-25T03:35:13.748000000',\n",
" '2023-04-27T03:25:16.567000000', '2023-04-30T03:35:12.151000000',\n",
" '2023-05-02T03:25:18.866000000', '2023-05-05T03:35:14.433000000',\n",
" '2023-05-07T03:25:16.583000000', '2023-05-10T03:35:11.284000000',\n",
" '2023-05-12T03:25:19.200000000', '2023-05-15T03:35:15.683000000',\n",
" '2023-05-17T03:25:17.911000000', '2023-05-20T03:35:14.193000000',\n",
" '2023-05-22T03:25:36.378000000', '2023-05-25T03:35:16.657000000',\n",
" '2023-05-27T03:25:20.078000000', '2023-05-30T03:35:15.642000000',\n",
" '2023-06-01T03:25:20.268000000', '2023-06-04T03:35:16.047000000',\n",
" '2023-06-06T03:25:20.180000000', '2023-06-09T03:35:15.534000000',\n",
" '2023-06-11T03:25:21.573000000', '2023-06-14T03:35:16.859000000',\n",
" '2023-06-16T03:25:20.769000000', '2023-06-19T03:35:15.908000000',\n",
" '2023-06-21T03:25:20.640000000', '2023-06-24T03:35:15.972000000',\n",
" '2023-06-26T03:25:19.927000000', '2023-06-29T03:35:15.752000000',\n",
" '2023-07-01T03:25:21.763000000', '2023-07-04T03:35:17.227000000',\n",
" '2023-07-06T03:25:21.702000000', '2023-07-09T03:35:17.102000000',\n",
" '2023-07-11T03:25:21.515000000', '2023-07-14T03:35:16.582000000',\n",
" '2023-07-16T03:25:21.326000000', '2023-07-19T03:35:16.050000000',\n",
" '2023-07-21T03:25:22.444000000', '2023-07-24T03:35:17.845000000',\n",
" '2023-07-26T03:25:21.503000000', '2023-07-29T03:35:17.083000000',\n",
" '2023-07-31T03:25:36.753000000', '2023-08-03T03:35:16.494000000',\n",
" '2023-08-05T03:25:21.570000000', '2023-08-08T03:35:16.313000000',\n",
" '2023-08-10T03:25:22.024000000', '2023-08-13T03:35:17.448000000',\n",
" '2023-08-15T03:25:22.075000000', '2023-08-18T03:35:17.812000000',\n",
" '2023-08-20T03:25:21.568000000', '2023-08-23T03:35:16.224000000',\n",
" '2023-08-25T03:25:22.592000000', '2023-08-28T03:35:17.571000000',\n",
" '2023-08-30T03:25:21.212000000', '2023-09-02T03:35:16.627000000',\n",
" '2023-09-04T03:25:21.856000000', '2023-09-07T03:35:17.134000000',\n",
" '2023-09-09T03:25:20.648000000', '2023-09-12T03:35:15.326000000',\n",
" '2023-09-14T03:25:35.755000000', '2023-09-17T03:35:15.269000000',\n",
" '2023-09-19T03:25:24.089000000', '2023-09-22T03:35:15.439000000',\n",
" '2023-09-24T03:25:18.524000000', '2023-09-27T03:35:14.112000000',\n",
2025-11-12 22:31:34 +07:00
" '2023-09-29T03:25:19.046000000'], dtype='datetime64[ns]')</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-02e47dcf-39ec-4e1b-a4fb-0abca32f4966' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-02e47dcf-39ec-4e1b-a4fb-0abca32f4966' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-73cf9ec4-873f-454d-9f2c-d45e25d2d671' class='xr-var-data-in' type='checkbox'><label for='data-73cf9ec4-873f-454d-9f2c-d45e25d2d671' 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-375f0cc8-a12f-4cc3-8fe8-1d86bbdfba3c' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-375f0cc8-a12f-4cc3-8fe8-1d86bbdfba3c' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-937c6e3e-212a-47ff-b8ab-139f3ddfdc62' class='xr-var-data-in' type='checkbox'><label for='data-937c6e3e-212a-47ff-b8ab-139f3ddfdc62' 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-8026b99e-f3e9-4d83-8082-03e1135313f2' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-8026b99e-f3e9-4d83-8082-03e1135313f2' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-3c8f8603-acda-440c-99b5-7e26ab7894d6' class='xr-var-data-in' type='checkbox'><label for='data-3c8f8603-acda-440c-99b5-7e26ab7894d6' 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["WGS 84 / UTM zone 48N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32648"]]</dd><dt><span>grid_mapping_name :</span></dt><dd>transverse_mercator</dd></dl></div><div class='xr
2025-11-12 20:52:57 +07:00
" <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> 49.43 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (151, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 3775 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=\"196\" height=\"173\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"26\" y2=\"41\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"26\" y2=\"65\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"26\" y2=\"90\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"26\" y2=\"115\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"26\" y2=\"123\" 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=\"10\" y1=\"0\" x2=\"10\" y2=\"108\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"109\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"110\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"111\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"112\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"113\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"114\" />\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=\"116\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"119\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"120\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"25\" y2=\"122\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 26.20332950438934,16.20332950438934 26.20332950438934,123.74524022949538 10.0,107.54191072510604\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" />\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=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\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=\"20\" y1=\"10\" x2=\"140\" y2=\"10\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\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\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"145\" y2=\"15\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"51\" y2=\"16\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"75\" y2=\"16\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"100\" y2=\"16\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"125\" y2=\"16\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 146.20332950438933,16.20332950438934 26.20332950438934,16.20332950438934\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"26\" y1=\"41\" x2=\"146\" y2=\"41\" />\n",
" <line x1=\"26\" y1=\"65\" x2=\"146\" y2=\"65\" />\n",
" <line x1=\"26\" y1=\"90\" x2=\"146\" y2=\"90\" />\n",
" <line x1=\"26\" y1=\"115\" x2=\"146\" y2=\"115\" />\n",
" <line x1=\"26\" y1=\"123\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
" <line x1=\"51\" y1=\"16\" x2=\"51\" y2=\"123\" />\n",
" <line x1=\"75\" y1=\"16\" x2=\"75\" y2=\"123\" />\n",
" <line x1=\"100\" y1=\"16\" x2=\"100\" y2=\"123\" />\n",
" <line x1=\"125\" y1=\"16\" x2=\"125\" y2=\"123\" />\n",
" <line x1=\"146\" y1=\"16\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"26.20332950438934,16.20332950438934 146.20332950438933,16.20332950438934 146.20332950438933,123.74524022949538 26.20332950438934,123.74524022949538\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"86.203330\" y=\"143.745240\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"166.203330\" y=\"69.974285\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,166.203330,69.974285)\">8874</text>\n",
" <text x=\"8.101665\" y=\"135.643575\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,8.101665,135.643575)\">151</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
2025-11-12 22:31:34 +07:00
"</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<chunksize=(1, 2048, 2048), meta=np.ndarray></div><input id='attrs-99454d9c-d84a-47db-a6ae-f5ff040f8edd' class='xr-var-attrs-in' type='checkbox' disabled><label for='attrs-99454d9c-d84a-47db-a6ae-f5ff040f8edd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-8afcec0f-08e5-479b-a81f-50d811d49783' class='xr-var-data-in' type='checkbox'><label for='data-8afcec0f-08e5-479b-a81f-50d811d49783' 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",
2025-11-12 20:52:57 +07:00
" <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> 49.43 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (151, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 3775 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=\"196\" height=\"173\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"26\" y2=\"41\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"26\" y2=\"65\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"26\" y2=\"90\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"26\" y2=\"115\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"26\" y2=\"123\" 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=\"10\" y1=\"0\" x2=\"10\" y2=\"108\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"109\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"110\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"111\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"112\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"113\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"114\" />\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=\"116\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"119\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"120\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"25\" y2=\"122\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 26.20332950438934,16.20332950438934 26.20332950438934,123.74524022949538 10.0,107.54191072510604\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" />\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=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\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=\"20\" y1=\"10\" x2=\"140\" y2=\"10\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\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\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"145\" y2=\"15\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"51\" y2=\"16\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"75\" y2=\"16\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"100\" y2=\"16\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"125\" y2=\"16\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 146.20332950438933,16.20332950438934 26.20332950438934,16.20332950438934\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"26\" y1=\"41\" x2=\"146\" y2=\"41\" />\n",
" <line x1=\"26\" y1=\"65\" x2=\"146\" y2=\"65\" />\n",
" <line x1=\"26\" y1=\"90\" x2=\"146\" y2=\"90\" />\n",
" <line x1=\"26\" y1=\"115\" x2=\"146\" y2=\"115\" />\n",
" <line x1=\"26\" y1=\"123\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
" <line x1=\"51\" y1=\"16\" x2=\"51\" y2=\"123\" />\n",
" <line x1=\"75\" y1=\"16\" x2=\"75\" y2=\"123\" />\n",
" <line x1=\"100\" y1=\"16\" x2=\"100\" y2=\"123\" />\n",
" <line x1=\"125\" y1=\"16\" x2=\"125\" y2=\"123\" />\n",
" <line x1=\"146\" y1=\"16\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"26.20332950438934,16.20332950438934 146.20332950438933,16.20332950438934 146.20332950438933,123.74524022949538 26.20332950438934,123.74524022949538\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"86.203330\" y=\"143.745240\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"166.203330\" y=\"69.974285\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,166.203330,69.974285)\">8874</text>\n",
" <text x=\"8.101665\" y=\"135.643575\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,8.101665,135.643575)\">151</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
2025-11-12 22:31:34 +07:00
"</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<chunksize=(1, 2048, 2048), meta=np.ndarray></div><input id='attrs-6dd08999-2b94-4231-b8fa-15b5cd193abf' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-6dd08999-2b94-4231-b8fa-15b5cd193abf' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-7894a306-b2b7-4af4-b618-4c3434ec02b8' class='xr-var-data-in' type='checkbox'><label for='data-7894a306-b2b7-4af4-b618-4c3434ec02b8' 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>{'qa': {'bits': [0, 1, 2, 3, 4, 5, 6, 7], 'values': {'0': 'no data', '1': 'saturated or defective', '2': 'dark area pixels', '3': 'cloud shadows', '4': 'vegetation', '5': 'bare soils', '6': 'water', '7': 'unclassified', '8': 'cloud medium probability', '9': 'cloud high probability', '10': 'thin cirrus', '11': 'snow or ice'}, 'description': 'Sen2Cor Scene Classification'}}</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",
2025-11-12 20:52:57 +07:00
" <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> 12.36 GiB </td>\n",
" <td> 4.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (151, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 3775 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=\"196\" height=\"173\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"26\" y2=\"41\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"26\" y2=\"65\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"26\" y2=\"90\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"26\" y2=\"115\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"26\" y2=\"123\" 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=\"10\" y1=\"0\" x2=\"10\" y2=\"108\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"109\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"110\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"111\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"112\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"113\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"114\" />\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=\"116\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"119\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"120\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"25\" y2=\"122\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 26.20332950438934,16.20332950438934 26.20332950438934,123.74524022949538 10.0,107.54191072510604\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" />\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=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\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=\"20\" y1=\"10\" x2=\"140\" y2=\"10\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\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\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"145\" y2=\"15\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"51\" y2=\"16\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"75\" y2=\"16\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"100\" y2=\"16\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"125\" y2=\"16\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 146.20332950438933,16.20332950438934 26.20332950438934,16.20332950438934\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"26\" y1=\"41\" x2=\"146\" y2=\"41\" />\n",
" <line x1=\"26\" y1=\"65\" x2=\"146\" y2=\"65\" />\n",
" <line x1=\"26\" y1=\"90\" x2=\"146\" y2=\"90\" />\n",
" <line x1=\"26\" y1=\"115\" x2=\"146\" y2=\"115\" />\n",
" <line x1=\"26\" y1=\"123\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
" <line x1=\"51\" y1=\"16\" x2=\"51\" y2=\"123\" />\n",
" <line x1=\"75\" y1=\"16\" x2=\"75\" y2=\"123\" />\n",
" <line x1=\"100\" y1=\"16\" x2=\"100\" y2=\"123\" />\n",
" <line x1=\"125\" y1=\"16\" x2=\"125\" y2=\"123\" />\n",
" <line x1=\"146\" y1=\"16\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"26.20332950438934,16.20332950438934 146.20332950438933,16.20332950438934 146.20332950438933,123.74524022949538 26.20332950438934,123.74524022949538\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"86.203330\" y=\"143.745240\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"166.203330\" y=\"69.974285\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,166.203330,69.974285)\">8874</text>\n",
" <text x=\"8.101665\" y=\"135.643575\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,8.101665,135.643575)\">151</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
2025-11-12 22:31:34 +07:00
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-109db908-78d1-4d49-a92d-887c15a86bfe' class='xr-section-summary-in' type='checkbox' ><label for='section-109db908-78d1-4d49-a92d-887c15a86bfe' 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><div></div><input id='index-cf68bb4f-f864-4cf4-be4d-0dfe48ad7c56' class='xr-index-data-in' type='checkbox'/><label for='index-cf68bb4f-f864-4cf4-be4d-0dfe48ad7c56' 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(['2022-09-02 03:35:23.960000', '2022-09-04 03:25:18.037000',\n",
2025-11-12 20:52:57 +07:00
" '2022-09-07 03:35:13.646000', '2022-09-09 03:25:27.617000',\n",
" '2022-09-12 03:35:22.247000', '2022-09-14 03:25:18.529000',\n",
" '2022-09-17 03:35:13.648000', '2022-09-19 03:25:24.773000',\n",
" '2022-09-22 03:35:18.931000', '2022-09-24 03:25:17.431000',\n",
" ...\n",
" '2023-09-07 03:35:17.134000', '2023-09-09 03:25:20.648000',\n",
" '2023-09-12 03:35:15.326000', '2023-09-14 03:25:35.755000',\n",
" '2023-09-17 03:35:15.269000', '2023-09-19 03:25:24.089000',\n",
" '2023-09-22 03:35:15.439000', '2023-09-24 03:25:18.524000',\n",
" '2023-09-27 03:35:14.112000', '2023-09-29 03:25:19.046000'],\n",
2025-11-12 22:31:34 +07:00
" dtype='datetime64[ns]', name='time', length=151, 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><div></div><input id='index-e75e6206-3b79-436c-9930-d264f87d1ab2' class='xr-index-data-in' type='checkbox'/><label for='index-e75e6206-3b79-436c-9930-d264f87d1ab2' 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='float64', name='y', 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><div></div><input id='index-b83f96ae-e714-4c55-bf14-2cec60ff5d44' class='xr-index-data-in' type='checkbox'/><label for='index-b83f96ae-e714-4c55-bf14-2cec60ff5d44' 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='float64', name='x', length=9902))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-9157e1a3-fd8f-494d-93bd-e5c38d3c694b' class='xr-section-summary-in' type='checkbox' checked><label for='section-9157e1a3-fd8f-494d-93bd-e5c38d3c694b' 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>"
2025-11-12 20:52:57 +07:00
],
"text/plain": [
"<xarray.Dataset> Size: 119GB\n",
"Dimensions: (time: 151, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1kB 2022-09-02T03:35:23.960000 ... 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 53GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" nir (time, y, x) float32 53GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" scl (time, y, x) uint8 13GB 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": [
"## truy vấn ảnh vệ tinh sen2\n",
"data = load_data(dc, date_range, longtitude_range, latitude_range)\n",
"notebook_utils.heading(notebook_utils.xarray_object_size(data))\n",
"display(data)"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 19,
2025-11-12 20:52:57 +07:00
"id": "2f6938b6-82e2-4916-bc1d-719c169e25e4",
"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>bits</th>\n",
" <th>values</th>\n",
" <th>description</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>qa</th>\n",
" <td>[0, 1, 2, 3, 4, 5, 6, 7]</td>\n",
" <td>{'0': 'no data', '1': 'saturated or defective'...</td>\n",
" <td>Sen2Cor Scene Classification</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" bits \\\n",
"qa [0, 1, 2, 3, 4, 5, 6, 7] \n",
"\n",
" values \\\n",
"qa {'0': 'no data', '1': 'saturated or defective'... \n",
"\n",
" description \n",
"qa Sen2Cor Scene Classification "
]
},
"metadata": {},
"output_type": "display_data"
},
{
"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": [
2025-11-12 22:31:34 +07:00
"CPU times: user 1.43 s, sys: 38.4 ms, total: 1.47 s\n",
"Wall time: 1.47 s\n"
2025-11-12 20:52:57 +07:00
]
},
{
"data": {
"application/vnd.jupyter.widget-view+json": {
2025-11-12 22:31:34 +07:00
"model_id": "34133dc9d4274937b5c7f95dd9baa3ff",
2025-11-12 20:52:57 +07:00
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VBox()"
]
},
"metadata": {},
"output_type": "display_data"
2025-11-12 22:31:34 +07:00
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"2025-11-12 15:21:35,606 - tornado.application - ERROR - Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7fc23eeddeb0>>, <Task finished name='Task-39453' coro=<MultiProgressBar.listen() done, defined at /env/lib/python3.12/site-packages/distributed/diagnostics/progressbar.py:281> exception=OSError('Timed out trying to connect to gateway://traefik-dask-gateway.easihub:80/easihub.73eb9888ef134f9d955754eada474c75 after 30 s')>)\n",
"Traceback (most recent call last):\n",
" File \"/env/lib/python3.12/site-packages/distributed/utils.py\", line 1952, in wait_for\n",
" return await fut\n",
" ^^^^^^^^^\n",
" File \"/env/lib/python3.12/site-packages/dask_gateway/comm.py\", line 45, in connect\n",
" plain_stream = await self.client.connect(\n",
" ^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
" File \"/env/lib/python3.12/site-packages/tornado/tcpclient.py\", line 269, in connect\n",
" addrinfo = await self.resolver.resolve(host, port, af)\n",
" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n",
"asyncio.exceptions.CancelledError\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/distributed/comm/core.py\", line 342, in connect\n",
" comm = await wait_for(\n",
" ^^^^^^^^^^^^^^^\n",
" File \"/env/lib/python3.12/site-packages/distributed/utils.py\", line 1951, in wait_for\n",
" async with asyncio.timeout(timeout):\n",
" File \"/usr/lib/python3.12/asyncio/timeouts.py\", line 115, in __aexit__\n",
" raise TimeoutError from exc_val\n",
"TimeoutError\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 306, in listen\n",
" self.comm = await connect(\n",
" ^^^^^^^^^^^^^^\n",
" File \"/env/lib/python3.12/site-packages/distributed/comm/core.py\", line 368, in connect\n",
" raise OSError(\n",
"OSError: Timed out trying to connect to gateway://traefik-dask-gateway.easihub:80/easihub.73eb9888ef134f9d955754eada474c75 after 30 s\n"
]
2025-11-12 20:52:57 +07:00
}
],
"source": [
"%%time\n",
"# Tiến hành loại bỏ các vị trí bị mây ảnh hưởng\n",
"result = mask_clean(data)\n",
"progress(result)"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 20,
2025-11-12 20:52:57 +07:00
"id": "435f9f78-a9a4-4226-86ca-d4bec42d454e",
"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",
2025-11-12 22:31:34 +07:00
"html[data-theme=dark],\n",
2025-11-12 20:52:57 +07:00
"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",
2025-11-12 22:31:34 +07:00
" grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
2025-11-12 20:52:57 +07:00
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
2025-11-12 22:31:34 +07:00
" display: inline-block;\n",
" opacity: 0;\n",
2025-11-12 20:52:57 +07:00
"}\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",
2025-11-12 22:31:34 +07:00
".xr-section-item input:focus + label {\n",
" border: 2px solid var(--xr-font-color0);\n",
"}\n",
"\n",
2025-11-12 20:52:57 +07:00
".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'><xarray.DataArray 'NDVI' (time: 151, y: 8874, x: 9902)> Size: 53GB\n",
"dask.array<truediv, shape=(151, 8874, 9902), dtype=float32, chunksize=(1, 2048, 2048), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1kB 2022-09-02T03:35:23.960000 ... 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",
2025-11-12 22:31:34 +07:00
" 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>: 151</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-f443dbf2-c768-4776-9c2f-ec72bafa9f86' class='xr-array-in' type='checkbox' checked><label for='section-f443dbf2-c768-4776-9c2f-ec72bafa9f86' 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<chunksize=(1, 2048, 2048), meta=np.ndarray></span></div><div class='xr-array-data'><table>\n",
2025-11-12 20:52:57 +07:00
" <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> 49.43 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (151, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 3775 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=\"196\" height=\"173\" style=\"stroke:rgb(0,0,0);stroke-width:1\" >\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"24\" x2=\"26\" y2=\"41\" />\n",
" <line x1=\"10\" y1=\"49\" x2=\"26\" y2=\"65\" />\n",
" <line x1=\"10\" y1=\"74\" x2=\"26\" y2=\"90\" />\n",
" <line x1=\"10\" y1=\"99\" x2=\"26\" y2=\"115\" />\n",
" <line x1=\"10\" y1=\"107\" x2=\"26\" y2=\"123\" 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=\"10\" y1=\"0\" x2=\"10\" y2=\"108\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"109\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"110\" />\n",
" <line x1=\"13\" y1=\"3\" x2=\"13\" y2=\"110\" />\n",
" <line x1=\"14\" y1=\"4\" x2=\"14\" y2=\"111\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"112\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"113\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"114\" />\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=\"116\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"117\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"118\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"119\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"120\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"121\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" y2=\"122\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"25\" y2=\"122\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 26.20332950438934,16.20332950438934 26.20332950438934,123.74524022949538 10.0,107.54191072510604\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" />\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=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\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=\"20\" y1=\"10\" x2=\"140\" y2=\"10\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"141\" y2=\"11\" />\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\" />\n",
" <line x1=\"25\" y1=\"15\" x2=\"145\" y2=\"15\" />\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"26\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"34\" y1=\"0\" x2=\"51\" y2=\"16\" />\n",
" <line x1=\"59\" y1=\"0\" x2=\"75\" y2=\"16\" />\n",
" <line x1=\"84\" y1=\"0\" x2=\"100\" y2=\"16\" />\n",
" <line x1=\"109\" y1=\"0\" x2=\"125\" y2=\"16\" />\n",
" <line x1=\"130\" y1=\"0\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"10.0,0.0 130.0,0.0 146.20332950438933,16.20332950438934 26.20332950438934,16.20332950438934\" style=\"fill:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"146\" y2=\"16\" style=\"stroke-width:2\" />\n",
" <line x1=\"26\" y1=\"41\" x2=\"146\" y2=\"41\" />\n",
" <line x1=\"26\" y1=\"65\" x2=\"146\" y2=\"65\" />\n",
" <line x1=\"26\" y1=\"90\" x2=\"146\" y2=\"90\" />\n",
" <line x1=\"26\" y1=\"115\" x2=\"146\" y2=\"115\" />\n",
" <line x1=\"26\" y1=\"123\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Vertical lines -->\n",
" <line x1=\"26\" y1=\"16\" x2=\"26\" y2=\"123\" style=\"stroke-width:2\" />\n",
" <line x1=\"51\" y1=\"16\" x2=\"51\" y2=\"123\" />\n",
" <line x1=\"75\" y1=\"16\" x2=\"75\" y2=\"123\" />\n",
" <line x1=\"100\" y1=\"16\" x2=\"100\" y2=\"123\" />\n",
" <line x1=\"125\" y1=\"16\" x2=\"125\" y2=\"123\" />\n",
" <line x1=\"146\" y1=\"16\" x2=\"146\" y2=\"123\" style=\"stroke-width:2\" />\n",
"\n",
" <!-- Colored Rectangle -->\n",
" <polygon points=\"26.20332950438934,16.20332950438934 146.20332950438933,16.20332950438934 146.20332950438933,123.74524022949538 26.20332950438934,123.74524022949538\" style=\"fill:#ECB172A0;stroke-width:0\"/>\n",
"\n",
" <!-- Text -->\n",
" <text x=\"86.203330\" y=\"143.745240\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" >9902</text>\n",
" <text x=\"166.203330\" y=\"69.974285\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(-90,166.203330,69.974285)\">8874</text>\n",
" <text x=\"8.101665\" y=\"135.643575\" font-size=\"1.0rem\" font-weight=\"100\" text-anchor=\"middle\" transform=\"rotate(45,8.101665,135.643575)\">151</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
2025-11-12 22:31:34 +07:00
"</table></div></div></li><li class='xr-section-item'><input id='section-5efddbe0-ead6-4c5b-89c1-818ba1dd62e7' class='xr-section-summary-in' type='checkbox' checked><label for='section-5efddbe0-ead6-4c5b-89c1-818ba1dd62e7' 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'>2022-09-02T03:35:23.960000 ... 2...</div><input id='attrs-2c6f78d0-5bcd-4ea4-8ad7-576ce4a2ebdd' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-2c6f78d0-5bcd-4ea4-8ad7-576ce4a2ebdd' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-98791c6a-a12d-48eb-a16b-fa61fc07f3e5' class='xr-var-data-in' type='checkbox'><label for='data-98791c6a-a12d-48eb-a16b-fa61fc07f3e5' 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(['2022-09-02T03:35:23.960000000', '2022-09-04T03:25:18.037000000',\n",
2025-11-12 20:52:57 +07:00
" '2022-09-07T03:35:13.646000000', '2022-09-09T03:25:27.617000000',\n",
" '2022-09-12T03:35:22.247000000', '2022-09-14T03:25:18.529000000',\n",
" '2022-09-17T03:35:13.648000000', '2022-09-19T03:25:24.773000000',\n",
" '2022-09-22T03:35:18.931000000', '2022-09-24T03:25:17.431000000',\n",
" '2022-09-27T03:35:12.140000000', '2022-09-29T03:25:23.829000000',\n",
" '2022-10-02T03:35:19.048000000', '2022-10-07T03:35:09.133000000',\n",
" '2022-10-09T03:25:22.746000000', '2022-10-12T03:35:17.151000000',\n",
" '2022-10-14T03:25:15.533000000', '2022-10-17T03:35:11.148000000',\n",
" '2022-10-19T03:25:18.808000000', '2022-10-22T03:35:13.746000000',\n",
" '2022-10-24T03:25:15.878000000', '2022-10-27T03:35:10.923000000',\n",
" '2022-10-29T03:25:20.127000000', '2022-11-01T03:35:15.818000000',\n",
" '2022-11-03T03:25:14.204000000', '2022-11-06T03:35:10.096000000',\n",
" '2022-11-11T03:35:15.334000000', '2022-11-13T03:25:16.056000000',\n",
" '2022-11-16T03:35:11.542000000', '2022-11-18T03:25:18.155000000',\n",
" '2022-11-21T03:35:12.396000000', '2022-11-23T03:25:16.067000000',\n",
" '2022-11-26T03:35:11.063000000', '2022-11-28T03:25:16.297000000',\n",
" '2022-12-01T03:35:12.009000000', '2022-12-03T03:25:14.366000000',\n",
" '2022-12-06T03:35:10.293000000', '2022-12-08T03:25:17.072000000',\n",
" '2022-12-11T03:35:12.184000000', '2022-12-16T03:35:10.130000000',\n",
" '2022-12-18T03:25:15.584000000', '2022-12-21T03:35:09.988000000',\n",
" '2022-12-23T03:25:15.763000000', '2022-12-26T03:35:11.128000000',\n",
" '2022-12-28T03:25:15.151000000', '2022-12-31T03:35:10.753000000',\n",
" '2023-01-02T03:25:15.152000000', '2023-01-05T03:35:09.844000000',\n",
" '2023-01-07T03:25:15.343000000', '2023-01-10T03:35:10.149000000',\n",
" '2023-01-12T03:25:12.066000000', '2023-01-15T03:35:08.140000000',\n",
" '2023-01-17T03:25:12.454000000', '2023-01-20T03:35:06.593000000',\n",
" '2023-01-22T03:25:14.446000000', '2023-01-25T03:35:09.824000000',\n",
" '2023-01-27T03:25:13.987000000', '2023-01-30T03:35:09.963000000',\n",
" '2023-02-01T03:25:13.595000000', '2023-02-04T03:35:09.008000000',\n",
" '2023-02-06T03:25:15.471000000', '2023-02-09T03:35:10.646000000',\n",
" '2023-02-11T03:25:15.100000000', '2023-02-14T03:35:10.240000000',\n",
" '2023-02-16T03:25:28.099000000', '2023-02-24T03:35:12.118000000',\n",
" '2023-02-26T03:25:14.146000000', '2023-03-01T03:35:09.182000000',\n",
" '2023-03-03T03:25:17.841000000', '2023-03-06T03:35:14.717000000',\n",
" '2023-03-08T03:25:12.032000000', '2023-03-11T03:35:07.230000000',\n",
" '2023-03-13T03:25:20.837000000', '2023-03-16T03:35:15.940000000',\n",
" '2023-03-18T03:25:14.467000000', '2023-03-21T03:35:10.279000000',\n",
" '2023-03-23T03:25:18.795000000', '2023-03-26T03:35:14.570000000',\n",
" '2023-03-28T03:25:14.536000000', '2023-03-31T03:35:10.140000000',\n",
" '2023-04-02T03:25:19.945000000', '2023-04-05T03:35:14.925000000',\n",
" '2023-04-07T03:25:16.518000000', '2023-04-10T03:35:12.000000000',\n",
" '2023-04-15T03:35:12.743000000', '2023-04-20T03:35:10.328000000',\n",
" '2023-04-22T03:25:18.572000000', '2023-04-25T03:35:13.748000000',\n",
" '2023-04-27T03:25:16.567000000', '2023-04-30T03:35:12.151000000',\n",
" '2023-05-02T03:25:18.866000000', '2023-05-05T03:35:14.433000000',\n",
" '2023-05-07T03:25:16.583000000', '2023-05-10T03:35:11.284000000',\n",
" '2023-05-12T03:25:19.200000000', '2023-05-15T03:35:15.683000000',\n",
" '2023-05-17T03:25:17.911000000', '2023-05-20T03:35:14.193000000',\n",
" '2023-05-22T03:25:36.378000000', '2023-05-25T03:35:16.657000000',\n",
" '2023-05-27T03:25:20.078000000', '2023-05-30T03:35:15.642000000',\n",
" '2023-06-01T03:25:20.268000000', '2023-06-04T03:35:16.047000000',\n",
" '2023-06-06T03:25:20.180000000', '2023-06-09T03:35:15.534000000',\n",
" '2023-06-11T03:25:21.573000000', '2023-06-14T03:35:16.859000000',\n",
" '2023-06-16T03:25:20.769000000', '2023-06-19T03:35:15.908000000',\n",
" '2023-06-21T03:25:20.640000000', '2023-06-24T03:35:15.972000000',\n",
" '2023-06-26T03:25:19.927000000', '2023-06-29T03:35:15.752000000',\n",
" '2023-07-01T03:25:21.763000000', '2023-07-04T03:35:17.227000000',\n",
" '2023-07-06T03:25:21.702000000', '2023-07-09T03:35:17.102000000',\n",
" '2023-07-11T03:25:21.515000000', '2023-07-14T03:35:16.582000000',\n",
" '2023-07-16T03:25:21.326000000', '2023-07-19T03:35:16.050000000',\n",
" '2023-07-21T03:25:22.444000000', '2023-07-24T03:35:17.845000000',\n",
" '2023-07-26T03:25:21.503000000', '2023-07-29T03:35:17.083000000',\n",
" '2023-07-31T03:25:36.753000000', '2023-08-03T03:35:16.494000000',\n",
" '2023-08-05T03:25:21.570000000', '2023-08-08T03:35:16.313000000',\n",
" '2023-08-10T03:25:22.024000000', '2023-08-13T03:35:17.448000000',\n",
" '2023-08-15T03:25:22.075000000', '2023-08-18T03:35:17.812000000',\n",
" '2023-08-20T03:25:21.568000000', '2023-08-23T03:35:16.224000000',\n",
" '2023-08-25T03:25:22.592000000', '2023-08-28T03:35:17.571000000',\n",
" '2023-08-30T03:25:21.212000000', '2023-09-02T03:35:16.627000000',\n",
" '2023-09-04T03:25:21.856000000', '2023-09-07T03:35:17.134000000',\n",
" '2023-09-09T03:25:20.648000000', '2023-09-12T03:35:15.326000000',\n",
" '2023-09-14T03:25:35.755000000', '2023-09-17T03:35:15.269000000',\n",
" '2023-09-19T03:25:24.089000000', '2023-09-22T03:35:15.439000000',\n",
" '2023-09-24T03:25:18.524000000', '2023-09-27T03:35:14.112000000',\n",
2025-11-12 22:31:34 +07:00
" '2023-09-29T03:25:19.046000000'], dtype='datetime64[ns]')</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-89a8550e-eedc-42b6-9021-ebe836a36f83' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-89a8550e-eedc-42b6-9021-ebe836a36f83' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-dfb10ade-8165-4116-8dd0-6df4407f38bb' class='xr-var-data-in' type='checkbox'><label for='data-dfb10ade-8165-4116-8dd0-6df4407f38bb' 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-22d2b8ad-93d8-415e-9f4f-543a11fd2db6' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-22d2b8ad-93d8-415e-9f4f-543a11fd2db6' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6721d02c-b61f-4234-a3cf-c74ff2623743' class='xr-var-data-in' type='checkbox'><label for='data-6721d02c-b61f-4234-a3cf-c74ff2623743' 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-362bf14f-b15a-4bd5-a8a3-b1ad808d4ece' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-362bf14f-b15a-4bd5-a8a3-b1ad808d4ece' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9cf0105e-9f8b-4175-9e01-876876fb5f8d' class='xr-var-data-in' type='checkbox'><label for='data-9cf0105e-9f8b-4175-9e01-876876fb5f8d' 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["WGS 84 / UTM zone 48N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32648"]]</dd><dt><span>grid_mapping_name :</span></dt><dd>transverse_mercator</dd></dl></div><div class='xr
2025-11-12 20:52:57 +07:00
" '2022-09-07 03:35:13.646000', '2022-09-09 03:25:27.617000',\n",
" '2022-09-12 03:35:22.247000', '2022-09-14 03:25:18.529000',\n",
" '2022-09-17 03:35:13.648000', '2022-09-19 03:25:24.773000',\n",
" '2022-09-22 03:35:18.931000', '2022-09-24 03:25:17.431000',\n",
" ...\n",
" '2023-09-07 03:35:17.134000', '2023-09-09 03:25:20.648000',\n",
" '2023-09-12 03:35:15.326000', '2023-09-14 03:25:35.755000',\n",
" '2023-09-17 03:35:15.269000', '2023-09-19 03:25:24.089000',\n",
" '2023-09-22 03:35:15.439000', '2023-09-24 03:25:18.524000',\n",
" '2023-09-27 03:35:14.112000', '2023-09-29 03:25:19.046000'],\n",
2025-11-12 22:31:34 +07:00
" dtype='datetime64[ns]', name='time', length=151, 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><div></div><input id='index-9810fee9-115f-40cb-b752-64cc65b9be78' class='xr-index-data-in' type='checkbox'/><label for='index-9810fee9-115f-40cb-b752-64cc65b9be78' 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='float64', name='y', 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><div></div><input id='index-97124d68-a26f-4ec3-b481-d69d74bcaef9' class='xr-index-data-in' type='checkbox'/><label for='index-97124d68-a26f-4ec3-b481-d69d74bcaef9' 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='float64', name='x', length=9902))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-bce3e35d-13a2-47e3-b284-5189bf009d2f' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-bce3e35d-13a2-47e3-b284-5189bf009d2f' 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>"
2025-11-12 20:52:57 +07:00
],
"text/plain": [
"<xarray.DataArray 'NDVI' (time: 151, y: 8874, x: 9902)> Size: 53GB\n",
"dask.array<truediv, shape=(151, 8874, 9902), dtype=float32, chunksize=(1, 2048, 2048), chunktype=numpy.ndarray>\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 1kB 2022-09-02T03:35:23.960000 ... 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": [
"# Tiến hành tính toán NDVI\n",
"ds1 = calculate_indices(result, index=\"NDVI\", satellite_mission=\"s2\")\n",
"ndvi = ds1[\"NDVI\"]\n",
"display(ndvi)"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 21,
2025-11-12 20:52:57 +07:00
"id": "84992d28-8e3f-468e-be08-ded511f2c662",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
2025-11-12 22:31:34 +07:00
"<matplotlib.image.AxesImage at 0x7fc0eeec61b0>"
2025-11-12 20:52:57 +07:00
]
},
2025-11-12 22:31:34 +07:00
"execution_count": 21,
2025-11-12 20:52:57 +07:00
"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": [
"## Hiển thị ảnh NDVI chưa điền các giá trị mây (chưa fill nan)\n",
"plt.imshow(ndvi.isel(time=6))"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 22,
2025-11-12 20:52:57 +07:00
"id": "72318b60-532a-4f08-a5f7-94762d08a42c",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
2025-11-12 22:31:34 +07:00
"<matplotlib.image.AxesImage at 0x7fc0fa072780>"
2025-11-12 20:52:57 +07:00
]
},
2025-11-12 22:31:34 +07:00
"execution_count": 22,
2025-11-12 20:52:57 +07:00
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAd0AAAGiCAYAAACiSRx6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8fJSN1AAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOz9Z5Rk93ndC/9OPpVzdXVO0zM9OQAzg5xJEABJUaRIyhRJkboKVJZo+yrYkixbwbL8WrIlXUuWTEskTZEUxQCCAAEiEHmAASaHnukwnUNVV04nn/fDafT1fe1lU37vlbl4e681H6ZXT0119Tnn+T/72Xs/gu/7PjvYwQ52sIMd7OD/cYj/q9/ADnawgx3sYAf/b8FO0d3BDnawgx3s4O8JO0V3BzvYwQ52sIO/J+wU3R3sYAc72MEO/p6wU3R3sIMd7GAHO/h7wk7R3cEOdrCDHezg7wk7RXcHO9jBDnawg78n7BTdHexgBzvYwQ7+nrBTdHewgx3sYAc7+HvCTtHdwQ52sIMd7ODvCd/VRfdP/uRPGBkZQdd1Tp48yeuvv/6/+i3tYAc72MEOdvA/je/aovuFL3yBT37yk/zGb/wGZ86c4fDhwzz44IMUi8X/1W9tBzvYwQ52sIP/KQjfrQsPTp48yfHjx/njP/5jADzPY3BwkJ/92Z/ll3/5l/8Xv7sd7GAHO9jBDv7ukP9Xv4H/FizL4s033+RXfuVXtr8miiIPPPAAr7766n/z35imiWma23/3PI9KpUImk0EQhP/H3/MOdrCDHezg/53wfZ9ms0lfXx+i+N8nkL8ri+7m5iau69LT0/N/+XpPTw9TU1P/zX/zu7/7u/zmb/7m38fb28EOdrCDHezgv8LS0hIDAwP/3e/5riy6/zP4lV/5FT75yU9u/71erzM0NMQtn/8x9hbqPDu7m75MncFYleFQhcuNXqY28oR1m0YjxOTABpYjocsOl2b7g2m3JRLJt/F9AdsS2VMoMV9L0dqIkuxtcCy/xHwrQ1i2sT2Rg4lVFNHlyzOHuX1wjoRiEJe6fHH2GN1qCKEjERlq0B+vsztWZDxU5KXaBHsiGzyzvpt8uMVGO8Z7Bi7gIrBipJhu5OgL19kfW2VEKdHxNVJiCwcJAE2wqbhRLnYGOR6Z483OKHtDqzQ9nb3qKletPtasJIansDe0woBcxfQV8lITgKav8f9ZfDtz6zk8T0DVbaxiGD/sks03eP/QGUKixZqV5KbwDd7sjHIktEDH1xiQK2y6MRbtDJ4vMqZusOykiYgmI8omL7b28Oz6bhqGzkSmxLVSnu5mmFRfHUn0iaom7+07S0Ls8ETlEOudGGHF5spsH5F0l4hq0bEVFMml1dYYzNZYLKbxPIHbxuZ4W+oyp5q7aDsqDiLFToyuo1DrhjheWORcqR/HEzENmR/Zd4o3G0N8OPcKvzf3EMeyy8w0s9zYTDOUrqHLDmHZ4oH0ZW6YeT5/6WZ+/ugzNNwQ5xqDZNQ2l//NQQTPR267eKqImZC2rzdfFHDCULvF5OjIEmutOOs3svghl4mhdd5VuECPVCcsmtTdCD1ynahoYfsiH3v8E/yrB/8zF7uDFK04MdlgTC+SlZrUvTD9cpV5O8ualcTyZe6MXKPiRomIJnmpyUWrn6oT5bHVA/yj0ad4qn6AhU6a4XAFWXCJyiZJucNcJ8+d8Wu0fG37fc90exjSy4wqRV5sTfLFN49zbHKek8kbmJ5MWLS51unhSHSRshNFETwaro7tSWiiQ1Qyeb48gSj43Je5BsCIWqTtaeiCTd0L0XAjuAjk5QYiHteNXnJKg93qOnmpTdGN8HJ7N5po0/VUbE/iSHiRIaXMrJ1n3U4Slzrs11Z4tTPBa7URPtbzEvN2jv3aCinRoOPLFN0YAFHR5LpVICc16fgqti8xrhQxfJkVJ824UqTtqVwyB8nKTVxfxEVk2UwTl7sc1hfoeBq2L7PpRhlQKvz+7IOokkvD0Llv4Drnq/0cTK5SUBsU7RgDWoVlM81sK8vRxBKOL3F/9AoNT+PN7ihFM4HtC3i+SL9e45sr+/i58WeIiCarToqSHSMqmVvv36BHrvNcYx+WJ3F3/BoJqU3djZCWWli+hC46GJ6Mg4Tri8REg46vsuqkqDlhAJJyhz+7fiftjQh7dq/wz4a/zqYbJiaa1NwQpq8gCR4Xu4Ok5DYJqcs3yodwPJFevUGvVqNfrVK0E8SlDgBlJ8qgWuFce4hjkXm6vkpC7CLi8WZnFEVw6VHrJMQOM2YPh0OLGJ6KIjgsO2n+6NUH2Dexwn2Za8iCgyj4xESDsGDiIVL3QhSkGg4S81aeL/ybt/Orv/wZLF/ij37lg3z0tx9FExzWnSQ1J8yAWqHradi+xPPlCa6fHyRzQUB0fPBB7npIpofggy8I+Fukp+CDmZaILJsIjocTCUphp6DS89F5fqrvWfJSm1k7w6Yb44+n7uFfHPgaL7d2s0vf4EJrCNOTuC0xTa9cY72u85N3XSIWi/0Pa9V3ZdHNZrNIksTGxsb/5esbGxsUCoX/5r/RNA1N0/6rr682CtTUPuSoxNr8MH3HLRYJMdfpA1XBlh36hzrc2bdC0Y6x2k0gRjXoShDz8FWf+0euc7bcTz7pUPIlUukW9W6YWFxkb6xBy1HxfB9TieOKLmODHZpKirovUFCaeEoYtRtBGmvRaaaZbmUQd+mYfpyRTAdR0vn1w88wbRZ4urSXupamR2nwjswM+3NVZo0cyZBPW0iRkxuogoKLgO3LRESPdStOXnW44Ozh/sI1Gp5O2Ld5oXuU62aeD/W8xtO1/cyIo5xMbGDhUHJTDMo1hsQOH9fPcrpvlK9fOYgnqWQmOwzG61w8O8riSJF7ElfRnDauFMXw4hAJ0yd1iIgiOl2y3gZP1g9yILaJaIYwBY2rfpK7ehapqRleWBrnUmkcADGk0FqMIBlgdAX+JD6G3WOh6A52R0FfUFEmO+SzLvlwh+lyjvH0JlXTJ6V5iOEOEcXienOYH0ueZjB5kZob4aC2xlcaR3h05SBxXcDUY3S8JK4jokQcnm8fIhdtEYop/ODkZXTBpqvFma1F8UIWluiR0Ft8ZvM+VtZSCL7Ey+ZBHE/iPcNnudrto/ZRj9xnQ4SbbYy8jidJeHJQcD0JZAkePDrFrnCRqZbPJ/af5mJ7gC+fvpl/e2Oc8ECLkXSF29JzaLqMLZqMyFXe+7YLXBEnyCXa7JMXuGr0MeOMkInM4rkRBMXANON8c+MmworNqfY+fnXsG1wxB0joS5TJkwh12bSyzCrDDKW7PNx/CknwWLIyND2dhW4/+/IbWGIMwZcQBZ+Wq7NmFrgtscJni/dz+vIYP3HvC3Q8lYgicYu+yCvtCaKySFdLkBYcmm4IzZfJS11sX6LjxRjJdei6Cptqjl61xjp99ClVXHRKRoG9+iqK4ACgCzZGqIMoSJy3JzkWmkcCEhIsGAXekbzAy63dzInDpMMuoqOzT6qQllqUnBxjWhMlukJdzjLtjJLXHQyxy5udUUZDJUQ8ukCFHIaYoOJEuDU6Q1wSkHyJvdRw0VB9hWOxDWxfZsVOYXkqtyeXEfEYUQwea+xBEjxWzCT7YxU+tPcSVSfCdCuPp4W5K75CSm4DIrcpy9i+TMhtcK47wZrksDeyxkvuYY5G59ElhQ5xOo5CQjV4tbmPt00sEIuI1NwMJ7UVTndDNN0IJyMz2L7MupOiR7R5rdLPv5zfyz8/+HX6pDaur6ILHhHBp+jqCIhoeLT9JHmpScKvYtPA9UWW7Aw3j5V4yU1wsLfKJXkXI6ESJhp5sYuLR0bsMpacYsrqpeSkEUI6xVaC3fEmw+EOTTfJvniZdTvBmFpk3lbxCXMyusaC2c9tkWkMXyEmdnnJTTARXcL2Nd5oj1KI1lmR+ulTqhheiF7BIjrgseHk6Eue53Knn7BksTc8i+ErdDyN3XIdXXCIiR18K4wQ0emGE/zTZ97HI791noae4aC+TMVQuUVbRRdsyq5PRDTpSVzmW0mf1/tGSb2qInjgGqBuOiCAaHn4khD8EQVCXXB7VPSShV7q0hmKE6v6NP/
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Thiết lập giá trị trung bình mùa vụ để xử lý các điểm ảnh bị mây dựa vào sự thay đổi theo mùa\n",
"time_split = [\n",
" slice(\"2022-09-01\", \"2023-01-01\"),\n",
" slice(\"2023-01-01\", \"2023-05-01\"),\n",
" slice(\"2023-05-01\", \"2023-07-01\"),\n",
" slice(\"2023-07-01\", \"2023-10-01\"),\n",
"]\n",
"\n",
"# Điền mây ở các vị trí mang giá trị nan (fill nan)\n",
"fill_nan_ndvi = fill_nan(ndvi, time_split)\n",
"\n",
"# In kết quả ảnh NDVI đã điền mây (đã fill nan)\n",
"plt.imshow(fill_nan_ndvi.isel(time=6))"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 23,
2025-11-12 20:52:57 +07:00
"id": "375b1cfb-37f5-49fe-8061-ea32eb47f9f6",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"/env/lib/python3.12/site-packages/xarray/groupers.py:392: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.\n",
" self.index_grouper = pd.Grouper(\n"
2025-11-12 20:52:57 +07:00
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"CPU times: user 7.55 s, sys: 4.45 s, total: 12 s\n",
"Wall time: 2min 7s\n"
2025-11-12 20:52:57 +07:00
]
}
],
"source": [
"%%time\n",
"## tính ndvi theo tháng\n",
"average_ndvi = fill_nan_ndvi.resample(time=\"1M\").mean().persist()\n",
"progress(average_ndvi)\n",
"\n",
"# compute average_ndvi\n",
"average_ndvi = average_ndvi.compute()"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 24,
2025-11-12 20:52:57 +07:00
"id": "187cc640-aef9-476b-91fc-b63f4d3ff2e3",
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/html": [
"<h4>Dataset size: 21.60 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",
2025-11-12 22:31:34 +07:00
"html[data-theme=dark],\n",
2025-11-12 20:52:57 +07:00
"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",
2025-11-12 22:31:34 +07:00
" grid-template-columns: 150px auto auto 1fr 0 20px 0 20px;\n",
2025-11-12 20:52:57 +07:00
"}\n",
"\n",
".xr-section-item {\n",
" display: contents;\n",
"}\n",
"\n",
".xr-section-item input {\n",
2025-11-12 22:31:34 +07:00
" display: inline-block;\n",
" opacity: 0;\n",
2025-11-12 20:52:57 +07:00
"}\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",
2025-11-12 22:31:34 +07:00
".xr-section-item input:focus + label {\n",
" border: 2px solid var(--xr-font-color0);\n",
"}\n",
"\n",
2025-11-12 20:52:57 +07:00
".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'><xarray.Dataset> Size: 23GB\n",
"Dimensions: (time: 33, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 264B 2022-09-06T22:46:14.500000 ... 20...\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 12GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" vh (time, y, x) float32 12GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
"Attributes:\n",
" crs: EPSG:32648\n",
2025-11-12 22:31:34 +07:00
" 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-0f873290-f040-4572-8ca1-9832cd026be1' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-0f873290-f040-4572-8ca1-9832cd026be1' 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>: 33</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-89133697-89ea-4b0d-9d9b-13496a6545c8' class='xr-section-summary-in' type='checkbox' checked><label for='section-89133697-89ea-4b0d-9d9b-13496a6545c8' 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'>2022-09-06T22:46:14.500000 ... 2...</div><input id='attrs-5fa31040-cf6d-4666-b521-9ea2bf45e246' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5fa31040-cf6d-4666-b521-9ea2bf45e246' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-077cd119-fa1a-40a1-8dc4-f5d188604020' class='xr-var-data-in' type='checkbox'><label for='data-077cd119-fa1a-40a1-8dc4-f5d188604020' 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(['2022-09-06T22:46:14.500000000', '2022-09-18T22:46:13.500000000',\n",
2025-11-12 20:52:57 +07:00
" '2022-09-30T22:46:14.500000000', '2022-10-12T22:46:14.500000000',\n",
" '2022-10-24T22:46:14.500000000', '2022-11-05T22:46:14.500000000',\n",
" '2022-11-17T22:46:13.500000000', '2022-11-29T22:46:13.500000000',\n",
" '2022-12-11T22:46:13.500000000', '2022-12-23T22:46:12.500000000',\n",
" '2023-01-04T22:46:11.500000000', '2023-01-16T22:46:10.500000000',\n",
" '2023-01-28T22:46:11.500000000', '2023-02-09T22:46:10.500000000',\n",
" '2023-02-21T22:46:09.500000000', '2023-03-05T22:46:10.500000000',\n",
" '2023-03-17T22:46:10.500000000', '2023-03-29T22:46:10.500000000',\n",
" '2023-04-10T22:46:11.500000000', '2023-04-22T22:46:11.500000000',\n",
" '2023-05-04T22:46:11.500000000', '2023-05-17T11:11:32.500000000',\n",
" '2023-05-29T11:11:32.500000000', '2023-06-10T11:11:28.500000000',\n",
" '2023-06-21T22:46:13.500000000', '2023-07-04T11:11:34.500000000',\n",
" '2023-07-16T11:11:35.500000000', '2023-07-28T11:11:36.500000000',\n",
" '2023-08-08T22:46:16.500000000', '2023-08-20T22:46:17.500000000',\n",
" '2023-09-01T22:46:18.500000000', '2023-09-13T22:46:18.500000000',\n",
2025-11-12 22:31:34 +07:00
" '2023-09-25T22:46:19.500000000'], dtype='datetime64[ns]')</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-81fb4113-e640-4976-875c-741704184f0a' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-81fb4113-e640-4976-875c-741704184f0a' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f9109ec4-dd57-4662-b9f7-adc84b5390a0' class='xr-var-data-in' type='checkbox'><label for='data-f9109ec4-dd57-4662-b9f7-adc84b5390a0' 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-0e9553d5-619c-40cf-89e0-92c6142142a0' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-0e9553d5-619c-40cf-89e0-92c6142142a0' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b74efbb4-18b9-411c-895e-44fe092e776f' class='xr-var-data-in' type='checkbox'><label for='data-b74efbb4-18b9-411c-895e-44fe092e776f' 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-50de0ea6-daa5-4ac2-b213-52e17330fa82' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-50de0ea6-daa5-4ac2-b213-52e17330fa82' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-9b60f7b3-7fa4-40de-af12-dcc57bfb2d29' class='xr-var-data-in' type='checkbox'><label for='data-9b60f7b3-7fa4-40de-af12-dcc57bfb2d29' 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["WGS 84 / UTM zone 48N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",105],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32648"]]</dd><dt><span>grid_mapping_name :</span></dt><dd>transverse_mercator</dd></dl></div><div class='xr
2025-11-12 20:52:57 +07:00
" <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> 10.80 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (33, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 825 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=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"108\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"109\" />\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=\"15\" y1=\"5\" x2=\"15\" y2=\"112\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"113\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"114\" />\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=\"116\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"118\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"119\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"119\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"120\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" 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:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"131\" y2=\"1\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"132\" y2=\"2\" />\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=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\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=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"140\" y2=\"10\" />\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\" />\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:#8B4903A0;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)\">33</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
2025-11-12 22:31:34 +07:00
"</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<chunksize=(1, 2048, 2048), meta=np.ndarray></div><input id='attrs-cd0c70f4-dcb5-4163-98e1-731291f485e8' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-cd0c70f4-dcb5-4163-98e1-731291f485e8' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-6e250a92-7957-4a39-9c7f-ec4db85ac0e9' class='xr-var-data-in' type='checkbox'><label for='data-6e250a92-7957-4a39-9c7f-ec4db85ac0e9' 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",
2025-11-12 20:52:57 +07:00
" <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> 10.80 GiB </td>\n",
" <td> 16.00 MiB </td>\n",
" </tr>\n",
" \n",
" <tr>\n",
" <th> Shape </th>\n",
" <td> (33, 8874, 9902) </td>\n",
" <td> (1, 2048, 2048) </td>\n",
" </tr>\n",
" <tr>\n",
" <th> Dask graph </th>\n",
" <td colspan=\"2\"> 825 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=\"10\" y1=\"0\" x2=\"10\" y2=\"107\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"11\" y2=\"108\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"12\" y2=\"109\" />\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=\"15\" y1=\"5\" x2=\"15\" y2=\"112\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"15\" y2=\"113\" />\n",
" <line x1=\"16\" y1=\"6\" x2=\"16\" y2=\"114\" />\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=\"116\" />\n",
" <line x1=\"19\" y1=\"9\" x2=\"19\" y2=\"117\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"20\" y2=\"118\" />\n",
" <line x1=\"21\" y1=\"11\" x2=\"21\" y2=\"119\" />\n",
" <line x1=\"22\" y1=\"12\" x2=\"22\" y2=\"119\" />\n",
" <line x1=\"23\" y1=\"13\" x2=\"23\" y2=\"120\" />\n",
" <line x1=\"24\" y1=\"14\" x2=\"24\" 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:#8B4903A0;stroke-width:0\"/>\n",
"\n",
" <!-- Horizontal lines -->\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" style=\"stroke-width:2\" />\n",
" <line x1=\"10\" y1=\"0\" x2=\"130\" y2=\"0\" />\n",
" <line x1=\"11\" y1=\"1\" x2=\"131\" y2=\"1\" />\n",
" <line x1=\"12\" y1=\"2\" x2=\"132\" y2=\"2\" />\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=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\n",
" <line x1=\"15\" y1=\"5\" x2=\"135\" y2=\"5\" />\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=\"19\" y1=\"9\" x2=\"139\" y2=\"9\" />\n",
" <line x1=\"20\" y1=\"10\" x2=\"140\" y2=\"10\" />\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\" />\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:#8B4903A0;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)\">33</text>\n",
"</svg>\n",
" </td>\n",
" </tr>\n",
2025-11-12 22:31:34 +07:00
"</table></div></li></ul></div></li><li class='xr-section-item'><input id='section-9e681af5-05f7-44c7-9d80-b7d69034f2df' class='xr-section-summary-in' type='checkbox' ><label for='section-9e681af5-05f7-44c7-9d80-b7d69034f2df' 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><div></div><input id='index-33226b1d-5a95-4562-89d4-52c05d170cfb' class='xr-index-data-in' type='checkbox'/><label for='index-33226b1d-5a95-4562-89d4-52c05d170cfb' 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(['2022-09-06 22:46:14.500000', '2022-09-18 22:46:13.500000',\n",
2025-11-12 20:52:57 +07:00
" '2022-09-30 22:46:14.500000', '2022-10-12 22:46:14.500000',\n",
" '2022-10-24 22:46:14.500000', '2022-11-05 22:46:14.500000',\n",
" '2022-11-17 22:46:13.500000', '2022-11-29 22:46:13.500000',\n",
" '2022-12-11 22:46:13.500000', '2022-12-23 22:46:12.500000',\n",
" '2023-01-04 22:46:11.500000', '2023-01-16 22:46:10.500000',\n",
" '2023-01-28 22:46:11.500000', '2023-02-09 22:46:10.500000',\n",
" '2023-02-21 22:46:09.500000', '2023-03-05 22:46:10.500000',\n",
" '2023-03-17 22:46:10.500000', '2023-03-29 22:46:10.500000',\n",
" '2023-04-10 22:46:11.500000', '2023-04-22 22:46:11.500000',\n",
" '2023-05-04 22:46:11.500000', '2023-05-17 11:11:32.500000',\n",
" '2023-05-29 11:11:32.500000', '2023-06-10 11:11:28.500000',\n",
" '2023-06-21 22:46:13.500000', '2023-07-04 11:11:34.500000',\n",
" '2023-07-16 11:11:35.500000', '2023-07-28 11:11:36.500000',\n",
" '2023-08-08 22:46:16.500000', '2023-08-20 22:46:17.500000',\n",
" '2023-09-01 22:46:18.500000', '2023-09-13 22:46:18.500000',\n",
" '2023-09-25 22:46:19.500000'],\n",
2025-11-12 22:31:34 +07:00
" dtype='datetime64[ns]', name='time', 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><div></div><input id='index-ebc92490-f708-45ea-acbc-3ecaabd69b7d' class='xr-index-data-in' type='checkbox'/><label for='index-ebc92490-f708-45ea-acbc-3ecaabd69b7d' 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='float64', name='y', 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><div></div><input id='index-98888867-69d5-40b4-a93f-849cda9a467b' class='xr-index-data-in' type='checkbox'/><label for='index-98888867-69d5-40b4-a93f-849cda9a467b' 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='float64', name='x', length=9902))</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-0cedbb79-24e5-432c-b2aa-1f3ddcc6a569' class='xr-section-summary-in' type='checkbox' checked><label for='section-0cedbb79-24e5-432c-b2aa-1f3ddcc6a569' 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>"
2025-11-12 20:52:57 +07:00
],
"text/plain": [
"<xarray.Dataset> Size: 23GB\n",
"Dimensions: (time: 33, y: 8874, x: 9902)\n",
"Coordinates:\n",
" * time (time) datetime64[ns] 264B 2022-09-06T22:46:14.500000 ... 20...\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 12GB dask.array<chunksize=(1, 2048, 2048), meta=np.ndarray>\n",
" vh (time, y, x) float32 12GB 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"
},
{
"name": "stderr",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"/env/lib/python3.12/site-packages/xarray/groupers.py:392: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.\n",
" self.index_grouper = pd.Grouper(\n",
"/env/lib/python3.12/site-packages/xarray/groupers.py:392: FutureWarning: 'M' is deprecated and will be removed in a future version, please use 'ME' instead.\n",
" self.index_grouper = pd.Grouper(\n"
2025-11-12 20:52:57 +07:00
]
}
],
"source": [
"#Load dữ liệu ảnh Sentinel 1\n",
"dsvh, dsvv = load_data_sen1(dc, date_range, coordinates)\n",
"average_vv = calculate_average(dsvv, time_pattern='1M')\n",
"average_vh = calculate_average(dsvh, time_pattern='1M')"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 25,
2025-11-12 20:52:57 +07:00
"id": "d2585562-88aa-4c7d-bf70-1f6affcf65d4",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"## cấu hình bộ dữ liệu điểm huấn luyện mô hình (train file)\n",
"train_path = \"train/ST_training data_updated_1130points_new.shp\" # đường dẫn shp file train\n",
"\n",
"## load dữ liệu điểm huấn luyện mô hình (train file)\n",
"train = load_train_data(train_path)\n",
"train.head()\n",
"\n",
"# 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",
"}\n",
"\n",
"# xây dựng tập dữ liệu (dataset) chứa dữ liệu VH, VV, NDVI\n",
"datasets = get_data_sen1_and_sen2(train, average_ndvi, average_vh, average_vv)\n",
"\n",
"# chia tập dữ liệu thành các phần theo tỉ lệ 80(80-20)-20 tương ứng với tập train, validate, test\n",
"X_train, X_val, X_test, y_train, y_val, y_test = split_train_data(\n",
" train, label_mapping, datasets\n",
")"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 30,
2025-11-12 20:52:57 +07:00
"id": "2e955884-d4af-422d-a8e6-d436199540e0",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"🔄 Chuyển đổi dữ liệu sang NumPy...\n",
"✅ Chuyển đổi hoàn tất.\n",
"\n",
"🔄 Reshaping data for CNN...\n",
" Train shape: (678, 3, 13)\n",
" Val shape: (226, 3, 13)\n",
" Test shape: (226, 3, 13)\n",
"\n",
"✅ Data normalized\n",
"\n",
"🚀 Using device: cpu\n",
"\n",
"🚀 Model initialized on device: cpu\n",
" Total parameters: 40,456\n",
"\n",
"📊 Training start:\n",
" Train samples: 678\n",
" Val samples: 226\n",
" Batch size: 32\n",
" Epochs: 50\n",
"\n",
"Epoch [10/50] Train Loss: 0.4373, Acc: 0.8245 | Val Loss: 0.6154, Acc: 0.8142\n",
"Epoch [20/50] Train Loss: 0.3467, Acc: 0.8673 | Val Loss: 0.6182, Acc: 0.8230\n",
"Epoch [30/50] Train Loss: 0.2167, Acc: 0.9292 | Val Loss: 0.8410, Acc: 0.7566\n",
"Epoch [40/50] Train Loss: 0.3310, Acc: 0.9233 | Val Loss: 0.7716, Acc: 0.8142\n",
"Epoch [50/50] Train Loss: 0.1767, Acc: 0.9366 | Val Loss: 1.5835, Acc: 0.6903\n",
"\n",
"✅ Training completed!\n",
" Final Train Acc: 0.9366\n",
" Final Val Acc: 0.6903\n"
2025-11-12 20:52:57 +07:00
]
2025-11-12 22:31:34 +07:00
},
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 1200x400 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
2025-11-12 20:52:57 +07:00
}
],
"source": [
"# Import CNN model\n",
"from cnn_model import CNNTrainer, reshape_for_cnn\n",
"import torch\n",
2025-11-12 21:55:06 +07:00
"import numpy as np\n",
"\n",
2025-11-12 22:31:34 +07:00
"# --- SỬA LỖI LOGIC CHUYỂN ĐỔI ---\n",
"# Kiểm tra sự tồn tại của '.values' (dành cho Pandas) trước\n",
"# Nếu không, np.array() sẽ xử lý tốt cả list và numpy.ndarray\n",
"print(\"🔄 Chuyển đổi dữ liệu sang NumPy...\")\n",
"X_train_np = X_train.values if hasattr(X_train, 'values') else np.array(X_train)\n",
"X_val_np = X_val.values if hasattr(X_val, 'values') else np.array(X_val)\n",
"X_test_np = X_test.values if hasattr(X_test, 'values') else np.array(X_test)\n",
"y_train_np = y_train.values if hasattr(y_train, 'values') else np.array(y_train)\n",
"y_val_np = y_val.values if hasattr(y_val, 'values') else np.array(y_val)\n",
"y_test_np = y_test.values if hasattr(y_test, 'values') else np.array(y_test)\n",
"print(\"✅ Chuyển đổi hoàn tất.\\n\")\n",
"# -------------------------------\n",
2025-11-12 20:52:57 +07:00
"\n",
"# Reshape data for CNN (n_samples, 39) -> (n_samples, 3, 13)\n",
"print(\"🔄 Reshaping data for CNN...\")\n",
2025-11-12 21:55:06 +07:00
"X_train_cnn = reshape_for_cnn(X_train_np)\n",
"X_val_cnn = reshape_for_cnn(X_val_np)\n",
"X_test_cnn = reshape_for_cnn(X_test_np)\n",
2025-11-12 20:52:57 +07:00
"\n",
"print(f\" Train shape: {X_train_cnn.shape}\")\n",
"print(f\" Val shape: {X_val_cnn.shape}\")\n",
"print(f\" Test shape: {X_test_cnn.shape}\\n\")\n",
"\n",
"# Normalize data (important for neural networks)\n",
"from sklearn.preprocessing import StandardScaler\n",
"scaler = StandardScaler()\n",
"X_train_flat = X_train_cnn.reshape(X_train_cnn.shape[0], -1)\n",
"X_val_flat = X_val_cnn.reshape(X_val_cnn.shape[0], -1)\n",
"X_test_flat = X_test_cnn.reshape(X_test_cnn.shape[0], -1)\n",
"\n",
"scaler.fit(X_train_flat)\n",
"X_train_flat = scaler.transform(X_train_flat)\n",
"X_val_flat = scaler.transform(X_val_flat)\n",
"X_test_flat = scaler.transform(X_test_flat)\n",
"\n",
"X_train_cnn = X_train_flat.reshape(X_train_cnn.shape)\n",
"X_val_cnn = X_val_flat.reshape(X_val_cnn.shape)\n",
"X_test_cnn = X_test_flat.reshape(X_test_cnn.shape)\n",
"\n",
"print(\"✅ Data normalized\\n\")\n",
"\n",
"# Initialize trainer\n",
"device = torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n",
"print(f\"🚀 Using device: {device}\\n\")\n",
"\n",
"trainer = CNNTrainer(num_classes=8, learning_rate=0.001, device=device)\n",
"\n",
"# Train model\n",
"trainer.fit(\n",
2025-11-12 21:55:06 +07:00
" X_train_cnn, y_train_np,\n",
" X_val_cnn, y_val_np,\n",
2025-11-12 20:52:57 +07:00
" epochs=50,\n",
" batch_size=32,\n",
" verbose=True\n",
")\n",
"\n",
"# Plot training history\n",
"trainer.plot_history()"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 32,
2025-11-12 20:52:57 +07:00
"id": "b2a1e42c-cf1b-4d82-a6af-b06e3496918f",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"📊 Evaluating CNN model on test set...\n",
"\n",
"\n",
"📈 Test Results:\n",
" Accuracy: 0.6593\n",
" Precision: 0.6943\n",
" Recall: 0.6593\n",
" F1-Score: 0.5876\n"
]
},
{
"data": {
"image/png": "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
"text/plain": [
"<Figure size 1000x800 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 536 ms, sys: 160 ms, total: 696 ms\n",
"Wall time: 291 ms\n"
2025-11-12 20:52:57 +07:00
]
}
],
"source": [
"%%time\n",
"# Evaluate on test data\n",
"print(\"📊 Evaluating CNN model on test set...\\n\")\n",
2025-11-12 22:31:34 +07:00
"\n",
"# --- SỬA LỖI ---\n",
"# Sử dụng y_test_np (đã được tạo ở cell trước) thay vì y_test.values\n",
2025-11-12 21:55:06 +07:00
"results = trainer.evaluate(X_test_cnn, y_test_np)\n",
2025-11-12 22:31:34 +07:00
"# ---------------\n",
2025-11-12 20:52:57 +07:00
"\n",
"# Plot confusion matrix\n",
"from sklearn.metrics import ConfusionMatrixDisplay\n",
"import matplotlib.pyplot as plt\n",
"\n",
2025-11-12 22:31:34 +07:00
"# (Đảm bảo 'label_mapping' đã được định nghĩa ở các cell trên)\n",
"class_names = list(label_mapping.keys()) \n",
2025-11-12 20:52:57 +07:00
"disp = ConfusionMatrixDisplay(confusion_matrix=results['confusion_matrix'], \n",
2025-11-12 22:31:34 +07:00
" display_labels=class_names)\n",
"\n",
"fig, ax = plt.subplots(figsize=(10, 8)) # Tạo fig và ax\n",
"disp.plot(ax=ax, cmap='Blues') # Vẽ vào ax đã tạo\n",
"\n",
2025-11-12 20:52:57 +07:00
"plt.xticks(rotation=45, ha='right')\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 33,
2025-11-12 20:52:57 +07:00
"id": "f1a14379-ed6e-4897-9ca4-2669743fab40",
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
2025-11-12 22:31:34 +07:00
"✅ Model saved to model_cnn_pytorch.pth\n",
"✅ Model saved to model_cnn_pytorch.pth\n",
"✅ Model info saved to model_info.json\n"
2025-11-12 20:52:57 +07:00
]
}
],
"source": [
"# Lưu mô hình huấn luyện\n",
"import json\n",
"\n",
"# Save CNN model\n",
"model_path = \"model_cnn_pytorch.pth\"\n",
"trainer.save(model_path)\n",
"\n",
"# Save training info\n",
"info = {\n",
" \"model_type\": \"PyTorch 1D CNN\",\n",
" \"num_classes\": 8,\n",
" \"classes\": list(label_mapping.keys()),\n",
" \"input_shape\": [3, 13], # 3 channels, 13 timesteps\n",
" \"accuracy\": float(results['accuracy']),\n",
" \"precision\": float(results['precision']),\n",
" \"recall\": float(results['recall']),\n",
" \"f1_score\": float(results['f1']),\n",
"}\n",
"\n",
"with open(\"model_info.json\", \"w\") as f:\n",
" json.dump(info, f, indent=2)\n",
"\n",
"print(f\"✅ Model saved to {model_path}\")\n",
"print(f\"✅ Model info saved to model_info.json\")"
]
},
{
"cell_type": "code",
2025-11-12 22:31:34 +07:00
"execution_count": 34,
2025-11-12 20:52:57 +07:00
"id": "33dd516d-9824-499e-96b9-5cd9224c194c",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"# đóng client, cluster\n",
"client.close()\n",
"cluster.close()"
]
2025-11-12 22:31:34 +07:00
},
{
"cell_type": "code",
"execution_count": null,
"id": "14f02719-b60e-4e76-a827-b04d6a71de95",
"metadata": {},
"outputs": [],
"source": []
2025-11-12 20:52:57 +07:00
}
],
"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",
2025-11-12 22:31:34 +07:00
"version": "3.12.3"
2025-11-12 20:52:57 +07:00
}
},
"nbformat": 4,
"nbformat_minor": 5
}