A set of Jupyter Notebooks showing the usage of Insula's APIs, in particular:
- Insula Access & Discovery: query collections and download files
- Insula SearchAPI: catalog search, download api and WMS/WFS capabilities
- Insula Data Collections: create collections and upload files
- Insula Processing Services: see available services and launch one. This notebook requires to create a demo processor, follow these instructions to do it
- Insula OpenEO: exploit Insula's OpenEO backend and capabilities (ECOSTRESS dataset).
- Copernicus OpenEO: learn how to use the OpenEO library and services to access external OpenEO datasets.
- Kubeflow Pipeline: Jupyter Notebook to produce yaml file of a simple "Hello world!" pipeline
- Collection Batch Download Script: A fully standalone python script of what can be achieved by leveraging Insula APIs. A simple yet often requested use-case that allows us to automatically download all contents from a collection with many files.
Each notebook has a line containing a pip install command with only the packages required to run it. If you prefer to install them all they are listed inside the file requirements.txt:
pip install -r requirements.txtIf you want these packages to survive Jupyter server reboots a virtual environment can be created. To do it open a terminal inside Jupyter and use the following commands:
# Create a new environment:
python -m venv /home/jovyan/InsulaNotebookEnv
# Make it active:
source /home/jovyan/InsulaNotebookEnv/bin/activate
# Install the required packages:
pip install -r requirements.txt
# Enable the environment for usage in a notebook’s kernel
pip install ipykernel
ipython kernel install --user --name=InsulaNotebookEnvThe first block will always be the one which generates the authorization and connects to the desired endpoint. Just change the values with the ones below to use it on another instance:
- ESA-MAAP:
BASE_URL="https://biomass.pal.maap.eo.esa.int"
insulaAuth: InsulaOpenIDConnect = InsulaOpenIDConnect(
authorization_endpoint="https://identity.pal.maap.eo.esa.int/realms/biomass/protocol/openid-connect/auth",
token_endpoint="https://identity.pal.maap.eo.esa.int/realms/biomass/protocol/openid-connect/token",
redirect_uri="http://localhost:9207/auth",
client_id="api-client"
)- DESP:
BASE_URL="https://insula.e2e-2.desp.space"
insulaAuth: InsulaOpenIDConnect = InsulaOpenIDConnect(
authorization_endpoint="https://iam.e2e-2.desp.space/realms/desp/protocol/openid-connect/auth",
token_endpoint="https://iam.e2e-2.desp.space/realms/desp/protocol/openid-connect/token",
redirect_uri="https://broker.datawkfl.e2e-2.desp.space",
client_id="hda-broker-public"
)- FS-TEP:
BASE_URL="https://foodsecurity-explorer.insula.earth/"
insulaAuth: InsulaOpenIDConnect = InsulaOpenIDConnect(
authorization_endpoint="https://identity.insula.earth/realms/foodsecurity-tep/protocol/openid-connect/auth",
token_endpoint="https://identity.insula.earth/realms/foodsecurity-tep/protocol/openid-connect/token",
redirect_uri="http://localhost:9207/auth",
client_id="api-client"
)- PHISAT2: Remember that the Phisat2 instance requires a mail verification. Before using the API be sure to log-in via ui at least once and complete the verification process.
BASE_URL="https://phisat2.insula.earth"
insulaAuth: InsulaOpenIDConnect = InsulaOpenIDConnect(
authorization_endpoint="https://identity.insula.earth/realms/phisat2/protocol/openid-connect/auth",
token_endpoint="https://identity.insula.earth/realms/phisat2/protocol/openid-connect/token",
redirect_uri="http://localhost:9207/auth",
client_id="api-client"
)