Fix inter-notebook references and copyright notice

Also rename "potsdam_mittelmark" to "treuenbrietzen"
This commit is contained in:
heyarne 2021-03-10 12:47:45 +01:00
commit 066843f1f0
3 changed files with 18 additions and 18 deletions

View file

@ -7,7 +7,7 @@
# Book settings # Book settings
title: Using Earth Observation for Journalism # The title of the book. Will be placed in the left navbar. 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 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 logo: great-forty-foot-telescope-wikipedia.png # A path to the book logo
execute: execute:
execute_notebooks: "off" execute_notebooks: "off"

View file

@ -320,7 +320,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "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", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "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)."
] ]
}, },
{ {

View file

@ -18,7 +18,7 @@
"\n", "\n",
"## Methodology\n", "## Methodology\n",
"\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", "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", "The ${\\Delta}$NBR is calculated and, if showing signs of burned areas, compared to data given by the responsible German ministries.\n",
"\n", "\n",
@ -44,7 +44,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
"source": [ "source": [
"### Treuenbrietzen (Postdam-Mittelmark) 2018\n", "### Treuenbrietzen 2018\n",
"\n", "\n",
"The first case is the wild fire in August 2018 that led to the evacuation of three villages (source).\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:" "We load the pre-calculated NBR values and geometries we fetched from OpenStreetMap:"
@ -69,8 +69,8 @@
} }
], ],
"source": [ "source": [
"potsdam_mittelmark_nbr_2018 = sorted(nbr_path.glob('*2018*NBR*.tif'))\n", "treuenbrietzen_nbr_2018 = sorted(nbr_path.glob('*2018*NBR*.tif'))\n",
"potsdam_mittelmark_nbr_2018" "treuenbrietzen_nbr_2018"
] ]
}, },
{ {
@ -195,9 +195,9 @@
} }
], ],
"source": [ "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", "# geodataframe_on_map(postdam_mittelmark_geom)\n",
"potsdam_mittelmark_geom" "treuenbrietzen_geom"
] ]
}, },
{ {
@ -287,7 +287,7 @@
} }
], ],
"source": [ "source": [
"plot_nbrs(potsdam_mittelmark_nbr_2018, potsdam_mittelmark_geom)" "plot_nbrs(treuenbrietzen_nbr_2018, treuenbrietzen_geom)"
] ]
}, },
{ {
@ -415,12 +415,12 @@
} }
], ],
"source": [ "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", " # we only need the metadata which is now available in `src`\n",
" pass\n", " pass\n",
"\n", "\n",
"dnbr, window, window_transform = calculate_dnbr(potsdam_mittelmark_nbr_2018[0], potsdam_mittelmark_nbr_2018[2], potsdam_mittelmark_geom)\n", "dnbr, window, window_transform = calculate_dnbr(treuenbrietzen_nbr_2018[0], treuenbrietzen_nbr_2018[2], treuenbrietzen_geom)\n",
"plot_dnbr(dnbr, src.crs, window_transform, potsdam_mittelmark_geom)" "plot_dnbr(dnbr, src.crs, window_transform, treuenbrietzen_geom)"
] ]
}, },
{ {
@ -479,9 +479,9 @@
"from shapely.geometry import box\n", "from shapely.geometry import box\n",
"from math import floor\n", "from math import floor\n",
"\n", "\n",
"potsdam_mittelmark_extract = dnbr[0,500:800,420:810]\n", "treuenbrietzen_extract = dnbr[0,500:800,420:810]\n",
"\n", "\n",
"img = plt.imshow(potsdam_mittelmark_extract, cmap='Greys')\n", "img = plt.imshow(treuenbrietzen_extract, cmap='Greys')\n",
"plt.colorbar(img)" "plt.colorbar(img)"
] ]
}, },
@ -516,8 +516,8 @@
} }
], ],
"source": [ "source": [
"potsdam_mittelmark_burned_area = (potsdam_mittelmark_extract >= 0.1).sum() / 100\n", "treuenbrietzen_burned_area = (treuenbrietzen_extract >= 0.1).sum() / 100\n",
"potsdam_mittelmark_burned_area" "treuenbrietzen_burned_area"
] ]
}, },
{ {
@ -545,7 +545,7 @@
} }
], ],
"source": [ "source": [
"abs((potsdam_mittelmark_burned_area / 300) - 1)" "abs((treuenbrietzen_burned_area / 300) - 1)"
] ]
}, },
{ {