mirror of
https://github.com/heyarne/earth-observation-for-journalism.git
synced 2026-05-06 19:13:40 +02:00
Fix inter-notebook references and copyright notice
Also rename "potsdam_mittelmark" to "treuenbrietzen"
This commit is contained in:
parent
c4c2713f25
commit
066843f1f0
3 changed files with 18 additions and 18 deletions
|
|
@ -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)."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue