From 066843f1f0fd38c7f8bd71ca31667064a13ef6f4 Mon Sep 17 00:00:00 2001 From: heyarne Date: Wed, 10 Mar 2021 12:47:45 +0100 Subject: [PATCH] Fix inter-notebook references and copyright notice Also rename "potsdam_mittelmark" to "treuenbrietzen" --- _config.yml | 2 +- ...rest-definition-and-product-download.ipynb | 4 +-- sources/03c-dnbr.ipynb | 30 +++++++++---------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/_config.yml b/_config.yml index 1141cc4..c9e2423 100644 --- a/_config.yml +++ b/_config.yml @@ -7,7 +7,7 @@ # Book settings title: Using Earth Observation for Journalism # The title of the book. Will be placed in the left navbar. author: Arne Schlüter # The author of the book -copyright: "CC-BY-SA 4.0 2021. Header image: \"Herschel's 40-foot telescope\" (public domain)" # Copyright year to be placed in the footer +copyright: "CC-BY-SA 4.0. Header image: \"Herschel's 40-foot telescope\" (public domain)" # Copyright year to be placed in the footer logo: great-forty-foot-telescope-wikipedia.png # A path to the book logo execute: execute_notebooks: "off" diff --git a/sources/03a-area-of-interest-definition-and-product-download.ipynb b/sources/03a-area-of-interest-definition-and-product-download.ipynb index f0dbf95..c705cae 100644 --- a/sources/03a-area-of-interest-definition-and-product-download.ipynb +++ b/sources/03a-area-of-interest-definition-and-product-download.ipynb @@ -320,7 +320,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The files were downloaded to the following paths, which can be copied into [](02e-spectral-indices.ipynb) to calculate their NBR." + "The files were downloaded to the following paths, which can be copied into the notebook [](02e-spectral-indices) to calculate their NBR." ] }, { @@ -686,7 +686,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The downloaded products can be found at the following paths, which, like previously, can be used to calculate the NBR in the product NBR using [](02-spectral-indices.ipynb)." + "The downloaded products can be found at the following paths, which, like previously, can be used to calculate the NBR in the product NBR using the code in [](02e-spectral-indices)." ] }, { diff --git a/sources/03c-dnbr.ipynb b/sources/03c-dnbr.ipynb index 8e085f7..d1b0f5c 100644 --- a/sources/03c-dnbr.ipynb +++ b/sources/03c-dnbr.ipynb @@ -18,7 +18,7 @@ "\n", "## Methodology\n", "\n", - "The NBR of the products downloaded in the previous notebook is calculated using the notebook [02 Spectral Indices](\"02 Spectral Indices.ipynb\").\n", + "The NBR of the products downloaded in the previous notebook is calculated using the notebook [](02e-spectral-indices).\n", "These NBR values are plotted side-by-side to get a visual impression of the changes that may have occurred between two given dates.\n", "The ${\\Delta}$NBR is calculated and, if showing signs of burned areas, compared to data given by the responsible German ministries.\n", "\n", @@ -44,7 +44,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Treuenbrietzen (Postdam-Mittelmark) 2018\n", + "### Treuenbrietzen 2018\n", "\n", "The first case is the wild fire in August 2018 that led to the evacuation of three villages (source).\n", "We load the pre-calculated NBR values and geometries we fetched from OpenStreetMap:" @@ -69,8 +69,8 @@ } ], "source": [ - "potsdam_mittelmark_nbr_2018 = sorted(nbr_path.glob('*2018*NBR*.tif'))\n", - "potsdam_mittelmark_nbr_2018" + "treuenbrietzen_nbr_2018 = sorted(nbr_path.glob('*2018*NBR*.tif'))\n", + "treuenbrietzen_nbr_2018" ] }, { @@ -195,9 +195,9 @@ } ], "source": [ - "potsdam_mittelmark_geom = gpd.read_file(product_path / 'evacuated_2018.json')\n", + "treuenbrietzen_geom = gpd.read_file(product_path / 'evacuated_2018.json')\n", "# geodataframe_on_map(postdam_mittelmark_geom)\n", - "potsdam_mittelmark_geom" + "treuenbrietzen_geom" ] }, { @@ -287,7 +287,7 @@ } ], "source": [ - "plot_nbrs(potsdam_mittelmark_nbr_2018, potsdam_mittelmark_geom)" + "plot_nbrs(treuenbrietzen_nbr_2018, treuenbrietzen_geom)" ] }, { @@ -415,12 +415,12 @@ } ], "source": [ - "with r.open(potsdam_mittelmark_nbr_2018[0]) as src:\n", + "with r.open(treuenbrietzen_nbr_2018[0]) as src:\n", " # we only need the metadata which is now available in `src`\n", " pass\n", "\n", - "dnbr, window, window_transform = calculate_dnbr(potsdam_mittelmark_nbr_2018[0], potsdam_mittelmark_nbr_2018[2], potsdam_mittelmark_geom)\n", - "plot_dnbr(dnbr, src.crs, window_transform, potsdam_mittelmark_geom)" + "dnbr, window, window_transform = calculate_dnbr(treuenbrietzen_nbr_2018[0], treuenbrietzen_nbr_2018[2], treuenbrietzen_geom)\n", + "plot_dnbr(dnbr, src.crs, window_transform, treuenbrietzen_geom)" ] }, { @@ -479,9 +479,9 @@ "from shapely.geometry import box\n", "from math import floor\n", "\n", - "potsdam_mittelmark_extract = dnbr[0,500:800,420:810]\n", + "treuenbrietzen_extract = dnbr[0,500:800,420:810]\n", "\n", - "img = plt.imshow(potsdam_mittelmark_extract, cmap='Greys')\n", + "img = plt.imshow(treuenbrietzen_extract, cmap='Greys')\n", "plt.colorbar(img)" ] }, @@ -516,8 +516,8 @@ } ], "source": [ - "potsdam_mittelmark_burned_area = (potsdam_mittelmark_extract >= 0.1).sum() / 100\n", - "potsdam_mittelmark_burned_area" + "treuenbrietzen_burned_area = (treuenbrietzen_extract >= 0.1).sum() / 100\n", + "treuenbrietzen_burned_area" ] }, { @@ -545,7 +545,7 @@ } ], "source": [ - "abs((potsdam_mittelmark_burned_area / 300) - 1)" + "abs((treuenbrietzen_burned_area / 300) - 1)" ] }, {