Commit 62c8f9c9 authored by Quentin Yeche's avatar Quentin Yeche
Browse files

install instructions

update notebook to reflect the current state of the project
parent 57e86fb9
No related merge requests found
Showing with 112 additions and 28 deletions
+112 -28
# Tutorial notebooks in Python and R for remote sensing # Tutorial notebooks in Python for remote sensing
## Getting Started
There are a variety of ways to use these notebooks, but unelss you're using a server with the notebooks pre-loaded, it all starts with:
### Cloning the repo
```
git clone git@forgemia.inra.fr:beyond/remote_sensing_notebooks.git
```
From here, here are the options:
### Local installations
#### Using conda
For this type of install you will need to have [miniconda](https://docs.conda.io/projects/miniconda/en/latest/), [conda](https://docs.conda.io/en/latest/), or [miniforge](https://github.com/conda-forge/miniforge) installed. Please follow the relevant links for installation instructions
```
cd remote_sensing_notebooks
```
Installing the conda environment (replace conda with mamba if applicable). Note that this can take a few minutes to complete.
```
conda env create --name rs_notebooks --file environment_jupyterlab.yml
```
To launch the notebooks after installation:
1. Activate the envionment:
```
conda activate rs_notebooks
```
2. Launch Jupyterlab:
```
jupyter lab
```
3. Click one of the links to open Jupyter Lab in a browser.
As an alternative you can also open the notebooks directly in a program which supports Python notebooks (Visual Studio Code, PyCharm, etc.), but make sure that the right conda environment is selected.
#### Using Docker
The repositroy includes two Dockerfiles to create Docker images. The first image is for a Jupyter Hub client installation. Most users should instead use the Dockerfile for Jupyter Lab.
```
cd remote_sensing_notebooks
```
Building the docker image (this can take a few minutes):
```
sudo docker buildx build --tag rs_notebooks --file Dockerfile_jupyterlab .
```
To launch the enotebooks after installation:
1. Run the docker image
```
sudo docker run -tp 8888:8888 rs_notebooks
```
2. Click one of the links to open Jupyter Lab in a browser.
### using on a remote server
It is quite possible to import and run these notebooks on a remote Jupyter notebook servers. Two publicly available options are [Google Colab](https://colab.research.google.com/) and [Microsoft Planetary Computer Hub](https://pccompute.westeurope.cloudapp.azure.com/compute/hub/login?next=%2Fcompute%2Fhub%2F). Here are a few key characteristics for each of these services:
#### Google Colab:
- free to use with a Google account
- easy to share notebooks with others
- limited compute power
- can [access Google Drive](https://colab.research.google.com/notebooks/io.ipynb#scrollTo=c2W5A2px3doP) to enable data persistence
#### Microsoft Planetary Computer Hub
- free to use (at the time of writing) but access must be requested
- easier access to the Microsoft Planetary Computer STAC Catalog which is the dedicated method to access satellite images utilized in these notebooks.
- includes QGis
>**Note:** Some Python packages are not included in the default environment of Google Colab or Planetary Computer Hub. When this is the case, the missing packages will be installed upon executing the notebooks.
## Notebook list ## Notebook list
1. STAC Catalogs (SpatioTemporel Asset Catalog) 1. Discovery of Satellite Data Through a STAC Catalog
- What is a STAC catalog? - What is a STAC catalog?
- Metadata - Opening GeoJSON files
- Querying from a vector file/coordinates - Exploring a STAC catalog and some sattelite metadata
2. Handling single-date and single-band data - Querying a STAC catalog from a vector file/coordinates
- Using rasterio - Displaying extents and GeoJSON layers on a map
- Cropping and printing a band (10m, 20m) 2. Opening a Sentinel-2 Image With rasterio
- Visual comparisons - Obtaining an Asset and looking at its properties
- Dynamics histograms - Getting the relevant part of a satellite image
- Contrast - Adjusting the contrast for visuals
- Visualizing and manipulating cloud cover masks - Color composites
3. Xarray for multi-band data
- Querying and data retrieval
- Visual comparisons
- Dynamics histograms
- Contrast - Contrast
- Visualizing and manipulating cloud cover masks - Visualizing and manipulating cloud cover masks
- Color composites 3. Opening a Sentinel-2 image with `Xarray`
4. Data cubes - Creating a data cube from a STAC object
- Xarray overview
- Indexing and selecting
- Plotting data
4. Zonal statistics, spectral signatures and vegetation index
- Loading vector data and converting to a raster to delimit zones
- Computing of zonal statistics
- Spectral signatures
- Band math and vegetation index
5. Time series (part 1)
- Building a times series data cube (spatial extent and time period) - Building a times series data cube (spatial extent and time period)
- Visualizing a time series - Operations on the time dimension
- Applying masks 6. Time series: visualization
- Extracting spectral signatures - Plotting time series images
5. Gap filling for time series - Gap Filling
6. indexes - Variations and change in a time series
- Calculating indexes (NDVI, etc.) 7. Image classfication with a machine learning algorithm
- Visualizing indexes (time series color composites, animated gifs, etc.) - Data pre-processing
7. Sampling according to vector data and plotting - Classification with machine learning methods
8. Detecting changes with indexes and time series color composites - Plotting results
9. Zonal statistics (requires identifying use cases) \ No newline at end of file
10. Thresholding indexes and exporting vector data
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment