From cad52d4f751bffeda4c33d112291461f45668a03 Mon Sep 17 00:00:00 2001 From: Juliana <143224732+JulesMRuef@users.noreply.github.com> Date: Fri, 1 Dec 2023 21:33:35 -0700 Subject: [PATCH] Delete notebooks/01-modis-ndvi-woolsey-fire (1).ipynb --- .../01-modis-ndvi-woolsey-fire (1).ipynb | 2040 ----------------- 1 file changed, 2040 deletions(-) delete mode 100644 notebooks/01-modis-ndvi-woolsey-fire (1).ipynb diff --git a/notebooks/01-modis-ndvi-woolsey-fire (1).ipynb b/notebooks/01-modis-ndvi-woolsey-fire (1).ipynb deleted file mode 100644 index b02f9cd..0000000 --- a/notebooks/01-modis-ndvi-woolsey-fire (1).ipynb +++ /dev/null @@ -1,2040 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Wildfires on the Beach: The Woolsey Fire \n", - "\n", - "* Over two weeks in November 2018, the Woolsey Fire burned nearly 100,000 acres in the Santa Monica Mountains north of Malibu, California (Fig. 1). Three people were killed in the fire and over 1,600 structures were destroyed. Two other fires that ignited the same day as the Woolsey Fire caused widespread damage throughout California.\n", - "\n", - "* The Santa Ana season (Fall in Califonia), is prime time large and destructive fires. The Woolsey Fire happened in a location conducive for maximum growth; an area with little recent fire history (but history of fire going back to the 1930s) and only the beach to stop it.\n", - "\n", - "\n", - "\n", - "![The Woolsey Fire - flames above scenic Highway 1](https://www.redzone.co/wp-content/uploads/2019/02/woolsey-fire-near-the-shore.jpg)\n", - "> Image source: https://www.redzone.co/2019/02/07/woolsey-fire-in-retrospect/\n" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "data": { - "application/javascript": "(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n var py_version = '3.2.2'.replace('rc', '-rc.').replace('.dev', '-dev.');\n var is_dev = py_version.indexOf(\"+\") !== -1 || py_version.indexOf(\"-\") !== -1;\n var reloading = false;\n var Bokeh = root.Bokeh;\n var bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n\n if (typeof (root._bokeh_timeout) === \"undefined\" || force) {\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 console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls.length === 0 && js_modules.length === 0 && Object.keys(js_exports).length === 0) {\n run_callbacks();\n return null;\n }\n if (!reloading) {\n console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\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() {\n console.error(\"failed to load \" + url);\n }\n\n var skip = [];\n if (window.requirejs) {\n window.requirejs.config({'packages': {}, 'paths': {'jspanel': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/jspanel', 'jspanel-modal': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal', 'jspanel-tooltip': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip', 'jspanel-hint': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint', 'jspanel-layout': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout', 'jspanel-contextmenu': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu', 'jspanel-dock': 'https://cdn.jsdelivr.net/npm/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock', 'gridstack': 'https://cdn.jsdelivr.net/npm/gridstack@7.2.3/dist/gridstack-all', 'notyf': 'https://cdn.jsdelivr.net/npm/notyf@3/notyf.min'}, 'shim': {'jspanel': {'exports': 'jsPanel'}, 'gridstack': {'exports': 'GridStack'}}});\n require([\"jspanel\"], function(jsPanel) {\n\twindow.jsPanel = jsPanel\n\ton_load()\n })\n require([\"jspanel-modal\"], function() {\n\ton_load()\n })\n require([\"jspanel-tooltip\"], function() {\n\ton_load()\n })\n require([\"jspanel-hint\"], function() {\n\ton_load()\n })\n require([\"jspanel-layout\"], function() {\n\ton_load()\n })\n require([\"jspanel-contextmenu\"], function() {\n\ton_load()\n })\n require([\"jspanel-dock\"], function() {\n\ton_load()\n })\n require([\"gridstack\"], function(GridStack) {\n\twindow.GridStack = GridStack\n\ton_load()\n })\n require([\"notyf\"], function() {\n\ton_load()\n })\n root._bokeh_is_loading = css_urls.length + 9;\n } else {\n root._bokeh_is_loading = css_urls.length + js_urls.length + js_modules.length + Object.keys(js_exports).length;\n }\n\n var existing_stylesheets = []\n var links = document.getElementsByTagName('link')\n for (var i = 0; i < links.length; i++) {\n var link = links[i]\n if (link.href != null) {\n\texisting_stylesheets.push(link.href)\n }\n }\n for (var i = 0; i < css_urls.length; i++) {\n var url = css_urls[i];\n if (existing_stylesheets.indexOf(url) !== -1) {\n\ton_load()\n\tcontinue;\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 } if (((window['jsPanel'] !== undefined) && (!(window['jsPanel'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/jspanel.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/modal/jspanel.modal.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/tooltip/jspanel.tooltip.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/hint/jspanel.hint.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/layout/jspanel.layout.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/contextmenu/jspanel.contextmenu.js', 'https://cdn.holoviz.org/panel/1.2.3/dist/bundled/floatpanel/jspanel4@4.12.0/dist/extensions/dock/jspanel.dock.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['GridStack'] !== undefined) && (!(window['GridStack'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/gridstack/gridstack@7.2.3/dist/gridstack-all.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } if (((window['Notyf'] !== undefined) && (!(window['Notyf'] instanceof HTMLElement))) || window.requirejs) {\n var urls = ['https://cdn.holoviz.org/panel/1.2.3/dist/bundled/notificationarea/notyf@3/notyf.min.js'];\n for (var i = 0; i < urls.length; i++) {\n skip.push(urls[i])\n }\n } var existing_scripts = []\n var scripts = document.getElementsByTagName('script')\n for (var i = 0; i < scripts.length; i++) {\n var script = scripts[i]\n if (script.src != null) {\n\texisting_scripts.push(script.src)\n }\n }\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\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 console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n for (var i = 0; i < js_modules.length; i++) {\n var url = js_modules[i];\n if (skip.indexOf(url) !== -1 || existing_scripts.indexOf(url) !== -1) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\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 var url = js_exports[name];\n if (skip.indexOf(url) >= 0 || root[name] != null) {\n\tif (!window.requirejs) {\n\t on_load();\n\t}\n\tcontinue;\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 var js_urls = [\"https://cdn.bokeh.org/bokeh/release/bokeh-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-3.2.2.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-3.2.2.min.js\", \"https://cdn.holoviz.org/panel/1.2.3/dist/panel.min.js\"];\n var js_modules = [];\n var js_exports = {};\n var css_urls = [];\n var inline_js = [ function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\nfunction(Bokeh) {} // ensure no trailing comma for IE\n ];\n\n function run_inline_js() {\n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }\n // Cache old bokeh versions\n if (Bokeh != undefined && !reloading) {\n\tvar NewBokeh = root.Bokeh;\n\tif (Bokeh.versions === undefined) {\n\t Bokeh.versions = new Map();\n\t}\n\tif (NewBokeh.version !== Bokeh.version) {\n\t Bokeh.versions.set(NewBokeh.version, NewBokeh)\n\t}\n\troot.Bokeh = Bokeh;\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 root._bokeh_is_initializing = false;\n root._bokeh_onload_callbacks = undefined;\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 Bokeh = root.Bokeh;\n bokeh_loaded = Bokeh != null && (Bokeh.version === py_version || (Bokeh.versions !== undefined && Bokeh.versions.has(py_version)));\n root._bokeh_is_initializing = true\n root._bokeh_onload_callbacks = []\n if (!reloading && (!bokeh_loaded || is_dev)) {\n\troot.Bokeh = undefined;\n }\n load_libs(css_urls, js_urls, js_modules, js_exports, function() {\n\tconsole.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n\trun_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": "" - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/javascript": "\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.createElement(\"script\");\n node.appendChild(div);\n node.appendChild(script);\n}\n\n/**\n * Handle when a new output is added\n */\nfunction 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 */\nfunction 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 */\nfunction 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 */\nfunction handle_update_output(event, handle) {\n handle_clear_output(event, {cell: {output_area: handle.output_area}})\n handle_add_output(event, handle)\n}\n\nfunction 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\nif (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": "" - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - "" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "import logging\n", - "import os\n", - "import pathlib\n", - "import subprocess\n", - "import warnings\n", - "from glob import glob\n", - "\n", - "import earthpy.appeears as etapp\n", - "import folium\n", - "import geopandas as gpd\n", - "import hvplot.pandas\n", - "import hvplot.xarray as rx\n", - "import pandas as pd\n", - "import rioxarray as rxr\n", - "import xarray as xr\n", - "\n", - "# Set up logging so AppeearsDownloader will log in notebook\n", - "logging.basicConfig(level=logging.INFO)\n", - "\n", - "# Ignore FutureWarnings coming from hvplot\n", - "warnings.simplefilter(action='ignore', category=FutureWarning)" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'/home/jovyan/earth-analytics/data/woolsey-fire'" - ] - }, - "execution_count": 3, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Generating the path to the project directory\n", - "project_direc = os.path.join(\n", - " pathlib.Path.home(), 'earth-analytics', 'data', 'woolsey-fire')\n", - "\n", - "# Create the project directory\n", - "os.makedirs(project_direc, exist_ok=True)\n", - "project_direc" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
OBJECTIDagencycommentsactivemapmethoddatecurrentuniquefireidentifierfireyearincidentnamepooownerunit...incomplexcomplexfirecodemergeidlatestmodifiedoncreatedontempshape__Areashape__Lengthgeometry
01198Local AgencyNMixed Methods15424992000002018-CAVNC-0910232018WOOLSEYCAVNC...NYNaNNaNNaN5.738505e+08250299.909321POLYGON ((-118.98273 34.11239, -118.98432 34.1...
\n", - "

1 rows × 30 columns

\n", - "
" - ], - "text/plain": [ - " OBJECTID agency comments active mapmethod datecurrent \\\n", - "0 1198 Local Agency N Mixed Methods 1542499200000 \n", - "\n", - " uniquefireidentifier fireyear incidentname pooownerunit ... incomplex \\\n", - "0 2018-CAVNC-091023 2018 WOOLSEY CAVNC ... N \n", - "\n", - " complexfirecode mergeid latest modifiedon createdon temp shape__Area \\\n", - "0 Y NaN NaN NaN 5.738505e+08 \n", - "\n", - " shape__Length geometry \n", - "0 250299.909321 POLYGON ((-118.98273 34.11239, -118.98432 34.1... \n", - "\n", - "[1 rows x 30 columns]" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "woolsey_gdf = gpd.read_file(\n", - " \"https://services3.arcgis.com/T4QMspbfLg3qTGWY/arcgis/rest/services/\"\n", - " \"Historic_Geomac_Perimeters_2018/FeatureServer/0/query\"\n", - " \"?where=incidentname%20%3D%20'WOOLSEY'%20AND%20latest%20%3D%20'Y'\"\n", - " \"&outFields=*&outSR=4326&f=json\"\n", - ")\n", - "woolsey_gdf" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
Make this Notebook Trusted to load map: File -> Trust Notebook
" - ], - "text/plain": [ - "" - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Malibu, CA locations\n", - "# From https://www.latlong.net/place/malibu-ca-usa-32013.html. \n", - "malibu_lat = 34.031246\n", - "malibu_lon = -118.788193\n", - "\n", - "# Create a Folium map object\n", - "m = folium.Map(\n", - " location=[malibu_lat, malibu_lon], \n", - " zoom_start=10.49, \n", - " scrollWheelZoom=False,\n", - " tiles='Stamen Watercolor')\n", - "\n", - "# Convert the GeoDataFrame to GeoJSON format\n", - "malibu_geojson = woolsey_gdf.to_json()\n", - "\n", - "# Add the GeoJSON data to the map as a GeoJson layer\n", - "malibu_style = {\"fillColor\" : \"red\",\n", - " \"color\": \"black\",\n", - " \"weight\" : 2,\n", - " \"dashArray\": \"5,5\",\n", - " }\n", - "folium.GeoJson(\n", - " malibu_geojson, \n", - " style_function=lambda feature: malibu_style\n", - " ).add_to(m)\n", - "\n", - "# Add a marker for Paradise, CA\n", - "folium.Marker(location=[malibu_lat, malibu_lon]).add_to(m)\n", - "\n", - "# Display the map\n", - "m" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - " # Initialize AppeearsDownloader for MODIS NDVI data\n", - " ndvi_downloader = etapp.AppeearsDownloader(\n", - " download_key='modis-ndvi',\n", - " ea_dir=project_direc,\n", - " product='MYD13Q1.061',\n", - " layer='_250m_16_days_NDVI',\n", - " start_date='06-01',\n", - " end_date='08-31', \n", - " recurring=True,\n", - " year_range=[2017, 2022],\n", - " polygon=woolsey_gdf\n", - " )\n", - "\n", - " # Download files if the download directory does not exist\n", - " if not os.path.exists(ndvi_downloader.data_dir):\n", - " ndvi_downloader.download_files()\n", - "\n", - " ndvi_downloader" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2020201_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2021185_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2020233_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2019137_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2019185_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2021217_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2019169_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2018217_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2017201_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2020169_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2018153_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2019201_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2019233_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2022185_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2021201_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2022137_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2022153_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2020185_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2017153_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2022201_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2017169_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2018233_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2022217_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2021153_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2017137_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2020217_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2020153_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2021233_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2018185_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2019217_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2022169_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2017217_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2021137_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2018201_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2019153_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2017233_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2022233_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2018137_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2017185_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2018169_aid0001.tif',\n", - " '/home/jovyan/earth-analytics/data/woolsey-fire/modis-ndvi/MYD13Q1.061_2017137_to_2022243/MYD13Q1.061__250m_16_days_NDVI_doy2021169_aid0001.tif']" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ndvi_path_list = glob(os.path.join(\n", - " ndvi_downloader.data_dir, '*', '*NDVI*.tif'))\n", - "\n", - "ndvi_path_list" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[\n", - " array([[[0.4254, 0.4276, 0.4276, ..., 0.392 , 0.338 , 0.3363],\n", - " [0.4042, 0.4198, 0.4198, ..., 0.4085, 0.3423, 0.3449],\n", - " [0.3729, 0.3729, 0.3818, ..., 0.331 , 0.3182, 0.3182],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2020-07-19,\n", - " \n", - " array([[[0.3778, 0.4075, 0.4075, ..., 0.318 , 0.3126, 0.2865],\n", - " [0.3879, 0.3932, 0.3932, ..., 0.3489, 0.312 , 0.3156],\n", - " [0.3569, 0.3569, 0.3631, ..., 0.3043, 0.2986, 0.2986],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2021-07-04,\n", - " \n", - " array([[[0.3606, 0.4095, 0.4095, ..., 0.3758, 0.3535, 0.3535],\n", - " [0.4002, 0.4147, 0.4147, ..., 0.4025, 0.3605, 0.3605],\n", - " [0.3716, 0.3716, 0.3668, ..., 0.3428, 0.3535, 0.3535],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2020-08-20,\n", - " \n", - " array([[[0.3695, 0.435 , 0.435 , ..., 0.4411, 0.4059, 0.4237],\n", - " [0.4241, 0.4165, 0.4165, ..., 0.4316, 0.3678, 0.3678],\n", - " [0.4131, 0.4131, 0.4165, ..., 0.3897, 0.3533, 0.3533],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2019-05-17,\n", - " \n", - " array([[[0.4242, 0.4392, 0.4392, ..., 0.3995, 0.3996, 0.3535],\n", - " [0.4137, 0.4154, 0.4154, ..., 0.4133, 0.3652, 0.3511],\n", - " [0.3751, 0.3751, 0.3961, ..., 0.3422, 0.3376, 0.3376],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2019-07-04,\n", - " \n", - " array([[[0.3762, 0.4003, 0.4003, ..., 0.3093, 0.307 , 0.291 ],\n", - " [0.3903, 0.4003, 0.4003, ..., 0.3473, 0.326 , 0.3343],\n", - " [0.384 , 0.384 , 0.3863, ..., 0.2984, 0.2853, 0.2853],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2021-08-05,\n", - " \n", - " array([[[0.3521, 0.4254, 0.4254, ..., 0.4134, 0.3648, 0.4067],\n", - " [0.4221, 0.4221, 0.4221, ..., 0.4104, 0.3481, 0.3873],\n", - " [0.4049, 0.4049, 0.412 , ..., 0.4094, 0.3752, 0.3752],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2019-06-18,\n", - " \n", - " array([[[0.4076, 0.4385, 0.4385, ..., 0.3183, 0.3018, 0.2864],\n", - " [0.413 , 0.4083, 0.4083, ..., 0.3218, 0.3218, 0.3153],\n", - " [0.395 , 0.395 , 0.4035, ..., 0.2834, 0.2969, 0.2969],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2018-08-05,\n", - " \n", - " array([[[0.4431, 0.456 , 0.456 , ..., 0.3806, 0.3629, 0.3328],\n", - " [0.4216, 0.4039, 0.4039, ..., 0.3809, 0.3356, 0.3482],\n", - " [0.392 , 0.392 , 0.392 , ..., 0.3187, 0.3055, 0.3055],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-07-20,\n", - " \n", - " array([[[0.3843, 0.4293, 0.4293, ..., 0.4011, 0.4011, 0.3724],\n", - " [0.4235, 0.4293, 0.4293, ..., 0.3981, 0.3476, 0.3476],\n", - " [0.394 , 0.394 , 0.4045, ..., 0.3639, 0.3501, 0.3501],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2020-06-17,\n", - " \n", - " array([[[0.3849, 0.4154, 0.4154, ..., 0.3837, 0.3307, 0.3342],\n", - " [0.399 , 0.4181, 0.4181, ..., 0.3785, 0.3212, 0.3303],\n", - " [0.3966, 0.3966, 0.4005, ..., 0.328 , 0.3405, 0.3405],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2018-06-02,\n", - " \n", - " array([[[0.4215, 0.4254, 0.4254, ..., 0.393 , 0.3395, 0.3448],\n", - " [0.4033, 0.4021, 0.4021, ..., 0.3949, 0.3291, 0.3546],\n", - " [0.382 , 0.382 , 0.3584, ..., 0.3436, 0.3354, 0.3354],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2019-07-20,\n", - " \n", - " array([[[0.367 , 0.4301, 0.4301, ..., 0.3916, 0.3294, 0.339 ],\n", - " [0.418 , 0.4145, 0.4145, ..., 0.3878, 0.3331, 0.3543],\n", - " [0.408 , 0.408 , 0.3823, ..., 0.331 , 0.3473, 0.3473],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2019-08-21,\n", - " \n", - " array([[[0.381 , 0.381 , 0.381 , ..., 0.3484, 0.3137, 0.3227],\n", - " [0.3583, 0.3798, 0.3798, ..., 0.3583, 0.3477, 0.3385],\n", - " [0.3341, 0.3341, 0.3356, ..., 0.3132, 0.3038, 0.3038],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2022-07-04,\n", - " \n", - " array([[[0.3738, 0.4275, 0.4275, ..., 0.3348, 0.3141, 0.2848],\n", - " [0.3917, 0.3998, 0.3998, ..., 0.3134, 0.3134, 0.3288],\n", - " [0.3807, 0.3807, 0.3788, ..., 0.3068, 0.3121, 0.3121],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2021-07-20,\n", - " \n", - " array([[[0.3878, 0.4289, 0.4289, ..., 0.391 , 0.3577, 0.3577],\n", - " [0.4004, 0.4124, 0.4124, ..., 0.3689, 0.317 , 0.339 ],\n", - " [0.3775, 0.3775, 0.3901, ..., 0.4003, 0.3819, 0.3819],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2022-05-17,\n", - " \n", - " array([[[0.3862, 0.4159, 0.4159, ..., 0.3553, 0.3376, 0.3297],\n", - " [0.3903, 0.3984, 0.3984, ..., 0.3616, 0.3153, 0.3214],\n", - " [0.354 , 0.354 , 0.3661, ..., 0.3159, 0.3116, 0.3116],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2022-06-02,\n", - " \n", - " array([[[0.3946, 0.4206, 0.4206, ..., 0.4118, 0.3357, 0.3609],\n", - " [0.4038, 0.407 , 0.407 , ..., 0.4036, 0.3357, 0.3724],\n", - " [0.39 , 0.39 , 0.3962, ..., 0.3533, 0.3397, 0.3397],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2020-07-03,\n", - " \n", - " array([[[0.4468, 0.4334, 0.4334, ..., 0.3854, 0.3331, 0.3778],\n", - " [0.4123, 0.4047, 0.4047, ..., 0.3858, 0.3328, 0.3637],\n", - " [0.3528, 0.3528, 0.3616, ..., 0.365 , 0.3519, 0.3519],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-06-02,\n", - " \n", - " array([[[0.3697, 0.3921, 0.3921, ..., 0.3521, 0.3193, 0.323 ],\n", - " [0.3521, 0.3697, 0.3697, ..., 0.3517, 0.3199, 0.3355],\n", - " [0.3369, 0.3369, 0.3514, ..., 0.3039, 0.3013, 0.3013],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2022-07-20,\n", - " \n", - " array([[[0.4272, 0.4603, 0.4603, ..., 0.3954, 0.3247, 0.3523],\n", - " [0.413 , 0.4138, 0.4138, ..., 0.384 , 0.3238, 0.3532],\n", - " [0.3631, 0.3631, 0.3597, ..., 0.334 , 0.3401, 0.3401],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-06-18,\n", - " \n", - " array([[[0.4227, 0.4402, 0.4402, ..., 0.3394, 0.3218, 0.2923],\n", - " [0.4207, 0.4242, 0.4242, ..., 0.3655, 0.3218, 0.3275],\n", - " [0.4207, 0.4207, 0.3819, ..., 0.2927, 0.2945, 0.2945],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2018-08-21,\n", - " \n", - " array([[[0.3756, 0.3658, 0.3658, ..., 0.3349, 0.3052, 0.31 ],\n", - " [0.341 , 0.3523, 0.3523, ..., 0.3508, 0.3314, 0.339 ],\n", - " [0.3142, 0.3142, 0.3247, ..., 0.3073, 0.3025, 0.3025],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2022-08-05,\n", - " \n", - " array([[[0.4085, 0.4174, 0.4174, ..., 0.3317, 0.3139, 0.3002],\n", - " [0.4126, 0.4132, 0.4132, ..., 0.3725, 0.3116, 0.32 ],\n", - " [0.3895, 0.3895, 0.3895, ..., 0.312 , 0.2829, 0.2829],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2021-06-02,\n", - " \n", - " array([[[0.449 , 0.4495, 0.4495, ..., 0.4203, 0.4332, 0.3959],\n", - " [0.4254, 0.4254, 0.4254, ..., 0.4081, 0.4081, 0.3959],\n", - " [0.4068, 0.4068, 0.3917, ..., 0.3761, 0.3761, 0.3761],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-05-17,\n", - " \n", - " array([[[0.4182, 0.4272, 0.4272, ..., 0.3647, 0.3561, 0.3451],\n", - " [0.4011, 0.4182, 0.4182, ..., 0.3827, 0.3714, 0.3547],\n", - " [0.3787, 0.3787, 0.3933, ..., 0.3239, 0.3437, 0.3437],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2020-08-04,\n", - " \n", - " array([[[0.4352, 0.4352, 0.4352, ..., 0.4265, 0.3899, 0.3899],\n", - " [0.4074, 0.4074, 0.4074, ..., 0.4244, 0.3653, 0.3653],\n", - " [0.4011, 0.4011, 0.4159, ..., 0.4174, 0.4011, 0.4011],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2020-06-01,\n", - " \n", - " array([[[0.3015, 0.3911, 0.3911, ..., 0.3311, 0.3116, 0.3113],\n", - " [0.3551, 0.4032, 0.4032, ..., 0.3728, 0.3259, 0.3441],\n", - " [0.3829, 0.3829, 0.393 , ..., 0.318 , 0.2961, 0.2961],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2021-08-21,\n", - " \n", - " array([[[0.4045, 0.4237, 0.4237, ..., 0.3375, 0.301 , 0.2947],\n", - " [0.4016, 0.4046, 0.4046, ..., 0.3387, 0.3108, 0.3032],\n", - " [0.3882, 0.3882, 0.3915, ..., 0.2779, 0.2899, 0.2899],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2018-07-04,\n", - " \n", - " array([[[0.4239, 0.4279, 0.4279, ..., 0.3807, 0.3291, 0.3421],\n", - " [0.3887, 0.4146, 0.4146, ..., 0.3885, 0.3346, 0.3451],\n", - " [0.3907, 0.3907, 0.3821, ..., 0.3336, 0.321 , 0.321 ],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2019-08-05,\n", - " \n", - " array([[[0.3707, 0.4044, 0.4044, ..., 0.3583, 0.3123, 0.3256],\n", - " [0.3609, 0.3829, 0.3829, ..., 0.3508, 0.2972, 0.3267],\n", - " [0.3609, 0.3609, 0.3363, ..., 0.3212, 0.3028, 0.3028],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2022-06-18,\n", - " \n", - " array([[[0.4199, 0.4326, 0.4326, ..., 0.3593, 0.3593, 0.3386],\n", - " [0.4057, 0.4078, 0.4078, ..., 0.3629, 0.3629, 0.3364],\n", - " [0.3946, 0.3946, 0.3922, ..., 0.324 , 0.3163, 0.3163],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-08-05,\n", - " \n", - " array([[[0.4111, 0.4141, 0.4141, ..., 0.342 , 0.3248, 0.3081],\n", - " [0.3929, 0.3924, 0.3924, ..., 0.3727, 0.3148, 0.3348],\n", - " [0.3859, 0.3859, 0.331 , ..., 0.3227, 0.3105, 0.3105],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2021-05-17,\n", - " \n", - " array([[[0.4169, 0.4159, 0.4159, ..., 0.3413, 0.2948, 0.2906],\n", - " [0.4169, 0.4066, 0.4066, ..., 0.3148, 0.2929, 0.3168],\n", - " [0.4084, 0.4084, 0.3916, ..., 0.3148, 0.2966, 0.2966],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2018-07-20,\n", - " \n", - " array([[[0.4112, 0.4386, 0.4386, ..., 0.4267, 0.3908, 0.3967],\n", - " [0.4294, 0.4294, 0.4294, ..., 0.431 , 0.3815, 0.3699],\n", - " [0.4005, 0.4005, 0.4005, ..., 0.4364, 0.4118, 0.4118],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2019-06-02,\n", - " \n", - " array([[[0.423 , 0.423 , 0.423 , ..., 0.3452, 0.3452, 0.32 ],\n", - " [0.3926, 0.4149, 0.4149, ..., 0.3575, 0.3575, 0.3305],\n", - " [0.3996, 0.3996, 0.4038, ..., 0.3337, 0.3376, 0.3376],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-08-21,\n", - " \n", - " array([[[0.3387, 0.3667, 0.3667, ..., 0.3616, 0.3179, 0.3182],\n", - " [0.359 , 0.359 , 0.359 , ..., 0.3588, 0.293 , 0.3395],\n", - " [0.3263, 0.3263, 0.3187, ..., 0.3226, 0.3053, 0.3053],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2022-08-21,\n", - " \n", - " array([[[0.4268, 0.4306, 0.4306, ..., 0.3616, 0.337 , 0.337 ],\n", - " [0.4064, 0.4095, 0.4095, ..., 0.3379, 0.3267, 0.3267],\n", - " [0.3928, 0.3928, 0.4005, ..., 0.3488, 0.3471, 0.3471],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2018-05-17,\n", - " \n", - " array([[[0.4027, 0.4248, 0.4248, ..., 0.3771, 0.3607, 0.3278],\n", - " [0.3943, 0.3945, 0.3945, ..., 0.371 , 0.3445, 0.3316],\n", - " [0.3806, 0.3806, 0.38 , ..., 0.3198, 0.3262, 0.3262],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-07-04,\n", - " \n", - " array([[[0.4258, 0.4377, 0.4377, ..., 0.4003, 0.3292, 0.33 ],\n", - " [0.4106, 0.4269, 0.4269, ..., 0.3792, 0.3346, 0.3356],\n", - " [0.3881, 0.3881, 0.3694, ..., 0.3374, 0.3296, 0.3296],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2018-06-18,\n", - " \n", - " array([[[0.4153, 0.4153, 0.4153, ..., 0.335 , 0.2945, 0.2953],\n", - " [0.4091, 0.4139, 0.4139, ..., 0.3413, 0.294 , 0.3399],\n", - " [0.3872, 0.3872, 0.3872, ..., 0.2951, 0.3118, 0.3118],\n", - " ...,\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan],\n", - " [ nan, nan, nan, ..., nan, nan, nan]]],\n", - " dtype=float32)\n", - " Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2021-06-18]" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "doy_start = -19\n", - "doy_end = -12\n", - "scale_factor = 10000\n", - "ndvi_da_list = []\n", - "for ndvi_path in ndvi_path_list:\n", - " # Get date from file name\n", - " doy = ndvi_path[doy_start:doy_end]\n", - " date = pd.to_datetime(doy, format='%Y%j')\n", - "\n", - " # Open dataset\n", - " da = rxr.open_rasterio(ndvi_path, masked=True).squeeze()\n", - "\n", - " # Prepare to concatenate: Add date dimension and clean up metadata\n", - " da = da.assign_coords({'date': date})\n", - " da = da.expand_dims({'date': 1})\n", - " da.name = 'NDVI'\n", - "\n", - " # Divide by scale factor\n", - " da = da / scale_factor\n", - " # Add the DataArray to the end of the accumulator list\n", - " ndvi_da_list.append(da)\n", - "ndvi_da_list" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "
<xarray.Dataset>\n",
-       "Dimensions:      (x: 169, y: 115, date: 41)\n",
-       "Coordinates:\n",
-       "    band         int64 1\n",
-       "  * x            (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n",
-       "  * y            (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n",
-       "    spatial_ref  int64 0\n",
-       "  * date         (date) datetime64[ns] 2017-05-17 2017-06-02 ... 2022-08-21\n",
-       "Data variables:\n",
-       "    NDVI         (date, y, x) float32 0.449 0.4495 0.4495 0.4495 ... nan nan nan
" - ], - "text/plain": [ - "\n", - "Dimensions: (x: 169, y: 115, date: 41)\n", - "Coordinates:\n", - " band int64 1\n", - " * x (x) float64 -119.0 -119.0 -119.0 ... -118.7 -118.6 -118.6\n", - " * y (y) float64 34.24 34.24 34.24 34.24 ... 34.01 34.01 34.01 34.01\n", - " spatial_ref int64 0\n", - " * date (date) datetime64[ns] 2017-05-17 2017-06-02 ... 2022-08-21\n", - "Data variables:\n", - " NDVI (date, y, x) float32 0.449 0.4495 0.4495 0.4495 ... nan nan nan" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ndvi_ds = xr.combine_by_coords(ndvi_da_list, coords=['date'])\n", - "ndvi_ds" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "data": {}, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.holoviews_exec.v0+json": "", - "text/html": [ - "
\n", - "
\n", - "
\n", - "" - ], - "text/plain": [ - ":Image [y,x] (NDVI)" - ] - }, - "execution_count": 15, - "metadata": { - "application/vnd.holoviews_exec.v0+json": { - "id": "p1127" - } - }, - "output_type": "execute_result" - } - ], - "source": [ - "dndvi_da = (ndvi_ds\n", - " .sel(date='2020')\n", - " .mean('date')\n", - " .NDVI\n", - " - ndvi_ds\n", - " .sel(date='2017')\n", - " .mean('date')\n", - " .NDVI\n", - ")\n", - "\n", - "(dndvi_da.hvplot(cmap='PiYG'))" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
geometry
0MULTIPOLYGON (((-118.99636 34.00540, -118.9963...
\n", - "
" - ], - "text/plain": [ - " geometry\n", - "0 MULTIPOLYGON (((-118.99636 34.00540, -118.9963..." - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Get the area outside the fire boundary\n", - "out_gdf = (\n", - " gpd.GeoDataFrame(geometry=woolsey_gdf.envelope)\n", - " .overlay(woolsey_gdf, how=\"difference\")\n", - ")\n", - "out_gdf" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [], - "source": [ - "# Clip the data array to the boundaries both inside and outside the fire\n", - "# boundary\n", - "ndvi_fire_ds = ndvi_ds.rio.clip(woolsey_gdf.geometry)\n", - "ndvi_out_ds = ndvi_ds.rio.clip(out_gdf.geometry)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "( NDVI\n", - " year \n", - " 2017 0.458010\n", - " 2018 0.429461\n", - " 2019 0.400919\n", - " 2020 0.406328\n", - " 2021 0.325053\n", - " 2022 0.390789,\n", - " NDVI\n", - " year \n", - " 2017 0.398876\n", - " 2018 0.380254\n", - " 2019 0.416327\n", - " 2020 0.405906\n", - " 2021 0.354659\n", - " 2022 0.381206)" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "ndvi_fire_df = (\n", - " ndvi_fire_ds\n", - " .groupby(ndvi_fire_ds.date.dt.year)\n", - " .mean(...)\n", - " .NDVI\n", - " .to_dataframe()[['NDVI']])\n", - "ndvi_out_df = (\n", - " ndvi_out_ds\n", - " .groupby(ndvi_out_ds.date.dt.year)\n", - " .mean(...)\n", - " .NDVI\n", - " .to_dataframe()[['NDVI']])\n", - "\n", - "ndvi_fire_df, ndvi_out_df" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [ - { - "data": {}, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "application/vnd.holoviews_exec.v0+json": "", - "text/html": [ - "
\n", - "
\n", - "
\n", - "" - ], - "text/plain": [ - ":Curve [year] (NDVI)" - ] - }, - "execution_count": 35, - "metadata": { - "application/vnd.holoviews_exec.v0+json": { - "id": "p1252" - } - }, - "output_type": "execute_result" - } - ], - "source": [ - "\n", - "#take the difference of the NDVI outside and inside the fire boundaries \n", - "(ndvi_fire_df-ndvi_out_df).hvplot(\n", - " xlabel ='Year', ylabel='dNDVI',\n", - " title='Difference in NDVI between inside and outside Woolsey fire boundary'\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Vegetation slow to recover after the Woolsey Fire\n", - "\n", - "* The southern coast of California has a relatively low NDVI and the natural landscape of the Santa Monica Mountains is dominated by diverse species of woody shrubs, also known as chaparral. Wildfire is a necessary phase in the life cycle of chaparral plants. Despite the fact that wildfire is necessity for charral, the slow regrowth of vegetation could be in part due to the severe drought with in the state during that time period." - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "base", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.10.11" - }, - "orig_nbformat": 4 - }, - "nbformat": 4, - "nbformat_minor": 2 -}