{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Calculating the dNBR\n", "\n", "The dNBR or ΔNBR is the difference between two NBRs, calculated using data before and after the fire repectively.\n", "\n", "- **TODO** Find this fire in the Waldbrandstatistik\n", "- maybe helpful: German Wildire in Lübtheen 30 June 2019\n", " - https://web.archive.org/save/https://earth.esa.int/eogateway/news/german-wildfire" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from pathlib import Path\n", "import geopandas as gpd\n", "\n", "# we can save some time by reading only parts of the product we are interested in\n", "from rasterio.features import geometry_window\n", "\n", "from sentinel_helpers import geodataframe_on_map, scihub_band_paths" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "nbr_path = Path('output/spectral_indices/')\n", "product_path = Path('input/forest_fires/')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- we calculcated the nbr in another notebook" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[PosixPath('output/spectral_indices/T33UUT_20180807T101021_NBR_10m.tif'),\n", " PosixPath('output/spectral_indices/T33UUT_20180822T101019_NBR_10m.tif'),\n", " PosixPath('output/spectral_indices/T33UUT_20180919T102021_NBR_10m.tif')]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "potsdam_mittelmark_nbr_2018 = list(sorted(nbr_path.glob('*2018*NBR*.tif')))\n", "potsdam_mittelmark_nbr_2018" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "