Skip to content

Commit

Permalink
deploy: 6c5b081
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Jul 24, 2024
1 parent 01880d9 commit 3526519
Show file tree
Hide file tree
Showing 15 changed files with 449 additions and 376 deletions.
31 changes: 21 additions & 10 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,27 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Preamble</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/how-to-cite.html">How to Cite This Cookbook</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">References</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/references.html">References {.unnumbered}</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Classification</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/01_classification.html">title: Classification
subtitle: Finding forests with satelite imagery
jupyter:
kernelspec:
name: “01_classification”
language: “python”
display_name: “01_classification”
format:
html:
code-fold: show
eval: true</a></li>



</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Floodmapping</span></p>
<ul class="nav bd-sidenav">
Expand All @@ -385,16 +406,6 @@



</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Classification</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/01_classification.html">Data Acquisition</a></li>


</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">References</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/references.html">References {.unnumbered}</a></li>
</ul>

</div>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 31 additions & 24 deletions _sources/notebooks/01_classification.ipynb
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"cells": [
{
"cell_type": "raw",
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"title: Classification\n",
"author: Pikall Nikolas\n",
"format:\n",
" html:\n",
" code-fold: show\n",
"subtitle: Finding forests with satelite imagery\n",
"jupyter: \n",
" kernelspec:\n",
" name: \"01_classification\"\n",
" language: \"python\"\n",
" display_name: \"01_classification\"\n",
"format: \n",
" html:\n",
" code-fold: show\n",
"eval: true\n",
"---"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this Notebook, we will use ``Scikit learn`` to classify an ``Sentinel-2`` Image. We will use two different classifiers and compare the results. \n",
"To get started we need to import the following modules."
"---\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."
]
},
{
Expand Down Expand Up @@ -62,11 +62,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Data Acquisition\n",
"Before we start, we need to load the data. We will use ``odc-stac`` to get data from Earth Search by Element 84. Here we define the area of interest and the time frame, aswell as the EPSG code and the resolution.\n",
"Before we start, we need to load the data. We will use ``odc-stac`` to obtain data from Earth Search by Element 84. Here we define the area of interest and the time frame, aswell as the EPSG code and the resolution.\n",
"\n",
"### Searching Catalog\n",
"The module ``odc-stac`` provides access to free, open source Sattelite data. To actually get to the data, we define some parameters, which specify where and when we want Satelite data from. Also we define what data collection we want to get the data from, since there are multiple to choose from. In this example we use _multispectral imagery_ from the Sentinel-2 Satelite."
"The module ``odc-stac`` provides access to free, open source satelite data. To retrieve the data, we must define several parameters that specify the location and time period for the satellite data. Additionally, we must specify the data collection we wish to access, as multiple collections are available. In this example, we will use multispectral imagery from the Sentinel-2 satellite."
]
},
{
Expand Down Expand Up @@ -120,12 +119,13 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Here we will have a look at the area south-east of Vienna, where the Nationalpark _Donauauen_ is located. The time we are interested in is the beginning of may of 2024.\n",
"After passing these parameters to the `stac-catalog`\n",
"We have now found **10 scenes** that we can use for our analysis. \n",
"We will now focus on the area south-east of Vienna, where the Nationalpark _Donauauen_ is situated. The time frame we are interested in is the beginning of May 2024.\n",
"After passing these parameters to the `stac-catalog` we have found **10 scenes** that we can use for our analysis. \n",
"\n",
"### Loading the Data\n",
"Now we will load the data directly into an ``xarray`` dataset, which we can use to perform computations on the data."
"Now we will load the data directly into an ``xarray`` dataset, which we can use to perform computations on the data. ``xarray`` is a powerful library for working with multi-dimensional arrays, making it well-suited for handling satellite data.\n",
"\n",
"Here's how we can load the data using odc-stac and xarray:"
]
},
{
Expand Down Expand Up @@ -157,8 +157,9 @@
"source": [
"## Data Visualization\n",
"### RGB Image\n",
"As we are now in posession of the image data, we can start with the computations and visualizations.\n",
"First we define a mask to filter out the clouds and the areas with no data and then we can plot a composite median image of the data, which is just an image where each pixel value is the median value of all the scences we have found. This is necessary to get rid of clouds and outliers, which some images may have."
"With the image data now in our possession, we can proceed with computations and visualizations.\n",
"\n",
"First, we define a mask to exclude cloud cover and areas with missing data. Subsequently, we create a composite median image, where each pixel value represents the median value across all the scenes we have identified. This approach helps to eliminate clouds and outliers present in some of the images, thereby providing a clearer and more representative visualization of the scene."
]
},
{
Expand Down Expand Up @@ -198,7 +199,13 @@
"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. This gives us a good overview of the vegetation in the area. The values can range from -1 to 1 where the following meanings are associated with these values:\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",
"\n",
"$$\n",
"NDVI = \\frac{NIR - Red}{NIR + Red}\n",
"$$\n",
"\n",
"This gives us a good overview of the vegetation in the area. The values can range from -1 to 1 where the following meanings are associated with these values:\n",
"\n",
"- -1 to 0 indicate dead plants or inanimate objects\n",
"- 0 to 0.33 are unhealthy plants\n",
Expand Down
6 changes: 3 additions & 3 deletions _sources/notebooks/references.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
],
"metadata": {
"kernelspec": {
"name": "01_classification",
"name": "python3",
"language": "python",
"display_name": "01_classification",
"path": "/home/runner/.local/share/jupyter/kernels/01_classification"
"display_name": "Python 3 (ipykernel)",
"path": "/home/runner/.local/share/jupyter/kernels/python3"
}
},
"nbformat": 4,
Expand Down
31 changes: 21 additions & 10 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,27 @@
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Preamble</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/how-to-cite.html">How to Cite This Cookbook</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">References</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/references.html">References {.unnumbered}</a></li>
</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Classification</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/01_classification.html">title: Classification
subtitle: Finding forests with satelite imagery
jupyter:
kernelspec:
name: “01_classification”
language: “python”
display_name: “01_classification”
format:
html:
code-fold: show
eval: true</a></li>



</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Floodmapping</span></p>
<ul class="nav bd-sidenav">
Expand All @@ -377,16 +398,6 @@



</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">Classification</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/01_classification.html">Data Acquisition</a></li>


</ul>
<p aria-level="2" class="caption" role="heading"><span class="caption-text">References</span></p>
<ul class="nav bd-sidenav">
<li class="toctree-l1"><a class="reference internal" href="notebooks/references.html">References {.unnumbered}</a></li>
</ul>

</div>
Expand Down
Loading

0 comments on commit 3526519

Please sign in to comment.