This notebook will provide guidance on how to replicate the JupyterLab environment we used during the training school on your local machine (your laptop or desktop). Follow these steps to replicate the JupyterLab environment:
This training material is made available via EUMETSAT's EUMETlab training space on GitLab. While GitLab offers integrated rendering of Jupyter Notebooks, its rendering capabilities is limited. You can view the notebooks using nbviewer.
Follow this link to view notebooks in the repository using nbviewer.
The first step to replicating the JupyterLab environment locally is to clone this repository.
Here are detailed instructions on how to to clone a repository from GitLab.
The data used in this training school are available in the JupyterLab training platform in the eodata
folder as a compressed tar
file.
Follow this link to access and download the data. Right-click on the data file and click on "Download" to download the data. After downloading is complete, make sure you move the data tar
file into the same folder as the cloned repository.
In case you wish to reproduce the course modules on your local setup, the following Python version and Python packages will be required:
Python packages can be installed with: conda env create -f environment.yml
.
Follow these instructions to create an environment from the environment.yml
file provided.
You should already have installed JupyterLab during Step 4. If you need additional help, refer to this link.
You need to navigate to the folder where you have cloned the repository and stored the data. You can do so using the Command Prompt (Windows) or the Terminal in Mac or Linux.
Next, follow these instructions to start JupyterLab on your laptop or desktop. If you've navigated to the right place, you should be able to see the repository and data tar file in your workspace after starting JupyterLab.
Next, you will need to decompress the tar file containing the data. Here is some example code you can modify and use within a Jupyter Notebook to decompress the file. You can use the library tarfile, which is part of the Python library, to open and extract the files.
# Import the library
import tarfile
# Open file
tar = tarfile.open('./data_part1.tar.gz')
# Extract file into the mydata folder
tar.extractall('./mydata/')
tar.close()
You may need to modify the data file paths within the Jupyter Notebooks to navigate to the correct folder where the data is stored, especially if you changed the name of the data folder.
This project is licensed under GNU General Public License v3.0 only and is developed under a Copernicus contract.