Skip to content

Commit

Permalink
Quarto output
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Aug 18, 2024
1 parent d43d59f commit 0d408a3
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 20 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ post-render:
for i in $(QMD); do quarto convert $$i; done
- mv chapters/*.ipynb notebooks/ >/dev/null 2>&1
- for f in chapters/*.quarto_ipynb ; do mv -- "$f" "${f%.quarto_ipynb}.ipynb" >/dev/null 2>&1; done
python src/clean-nb.py
cp Makefile notebooks/

data:
Expand Down
6 changes: 3 additions & 3 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ parts:
- caption: Preamble
chapters:
- file: notebooks/how-to-cite
- caption: References
chapters:
- file: notebooks/references
- caption: Classification
chapters:
- file: notebooks/01_classification
- caption: Floodmapping
chapters:
- file: notebooks/02_floodmapping
- caption: References
chapters:
- file: notebooks/references
root: README
11 changes: 7 additions & 4 deletions notebooks/01_classification.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Classification\n",
"Finding forests with satelite imagery\n"
"# Classification of Sentinel-2 imagery\n",
"**Finding forests with satelite imagery**\n",
"\n",
"## Data Acquisition\n",
"In this chapter, we will employ machine learning techniques to classify a scene using satellite imagery. Specifically, we will utilize ``scikit-learn`` to implement two distinct classifiers and subsequently compare their results. To begin, we need to import the following modules.\n"
]
},
{
Expand Down Expand Up @@ -185,7 +188,7 @@
"metadata": {},
"source": [
"### False Color Image\n",
"In addition to the regular RGB Image, we can swap any of the bands from the visible spectrum with any other bands. In this specific case the red band has been changed to the near infrared band. This allows us to see vegetated areas more clearly, since they now appear in a bright red color. This is due to the fact that plants absorb regular red light while reflecting near infrared light [@nasa2020]."
"In addition to the regular RGB Image, we can swap any of the bands from the visible spectrum with any other bands. In this specific case the red band has been changed to the near infrared band. This allows us to see vegetated areas more clearly, since they now appear in a bright red color. This is due to the fact that plants absorb regular red light while reflecting near infrared light {cite:p}`nasa2020`."
]
},
{
Expand Down Expand Up @@ -214,7 +217,7 @@
"metadata": {},
"source": [
"### NDVI Image\n",
"To get an first impression of the data, we can calculate the NDVI (Normalized Difference Vegetation Index) and plot it. The NDVI is calculated by useing the following formula. [@rouse1974monitoring]\n",
"To get an first impression of the data, we can calculate the NDVI (Normalized Difference Vegetation Index) and plot it. The NDVI is calculated by useing the following formula. {cite:p}`rouse1974monitoring`\n",
"\n",
"$$\n",
"NDVI = \\frac{NIR - Red}{NIR + Red}\n",
Expand Down
15 changes: 11 additions & 4 deletions notebooks/02_floodmapping.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
"metadata": {},
"source": [
"# Reverend Bayes updates our Belief in Flood Detection\n",
"How an 275 year old idea helps map the extent of floods\n"
"**How an 275 year old idea helps map the extent of floods**\n",
"\n",
"![Image from [wikipedia](https://upload.wikimedia.org/wikipedia/commons/d/d4/Thomas_Bayes.gif)](https://upload.wikimedia.org/wikipedia/commons/d/d4/Thomas_Bayes.gif)\n",
"\n",
":::{note}\n",
"This notebooks contains interactive element. These interactive element can only be viewed on Binder by clicking on the Binder badge or 🚀 button.\n",
":::\n",
"\n"
]
},
{
Expand Down Expand Up @@ -41,9 +48,9 @@
"source": [
"## From Backscattering to Flood Mapping\n",
"\n",
"This notebook explains how microwave ($\\sigma^0$) backscattering (@fig-area) can be used to map the extent of a flood. We replicate in this exercise the work of @bauer-marschallinger_satellite-based_2022 on the TU Wien Bayesian-based flood mapping algorithm.\n",
"This notebook explains how microwave ($\\sigma^0$) backscattering can be used to map the extent of a flood. We replicate in this exercise the work of {cite:t}`bauer-marschallinger_satellite-based_2022` on the TU Wien Bayesian-based flood mapping algorithm.\n",
"\n",
"In the following lines we create a map with EOmaps [@quast_getting_2024] of the $\\sigma^0$ backscattering values."
"In the following lines we create a map with EOmaps {cite:p}`quast_getting_2024` of the $\\sigma^0$ backscattering values."
]
},
{
Expand Down Expand Up @@ -99,7 +106,7 @@
"$$P(NF|\\sigma^0)P(\\sigma^0) = P(\\sigma^0|NF)P(NF).$$\n",
"\n",
"\n",
"The forward probability of $\\sigma^0$ given the occurrence of flooding ($P(\\sigma^0|F)$) and $\\sigma^0$ given no flooding ($P(\\sigma^0|NF)$) can be extracted from past information on backscattering over land and water surfaces. As seen in the sketch below (@fig-sat), the characteristics of backscattering over land and water differ considerably.\n",
"The forward probability of $\\sigma^0$ given the occurrence of flooding ($P(\\sigma^0|F)$) and $\\sigma^0$ given no flooding ($P(\\sigma^0|NF)$) can be extracted from past information on backscattering over land and water surfaces. As seen in the sketch below , the characteristics of backscattering over land and water differ considerably.\n",
"\n",
"![Schematic backscattering over land and water. Image from [Geological Survey Ireland](https://www.gsi.ie/images/images/SAR_mapping_land_water.jpg)](https://www.gsi.ie/images/images/SAR_mapping_land_water.jpg){#fig-sat}\n",
"\n",
Expand Down
1 change: 0 additions & 1 deletion notebooks/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ post-render:
for i in $(QMD); do quarto convert $$i; done
- mv chapters/*.ipynb notebooks/ >/dev/null 2>&1
- for f in chapters/*.quarto_ipynb ; do mv -- "$f" "${f%.quarto_ipynb}.ipynb" >/dev/null 2>&1; done
python src/clean-nb.py
cp Makefile notebooks/

data:
Expand Down
Loading

0 comments on commit 0d408a3

Please sign in to comment.