Python 3 kernel and Geo science kernel in JupyterLab on CopPhil

Prerequisites

No. 1 Access to CopPhil site

You need a CopPhil account. See articles

Register and create a new account on CopPhil Managing an existing account on CopPhil

No. 2 Working knowledge of JupyterLab

See article Introduction to JupyterLab on CopPhil

Right after starting JupyterLab on CopPhil, there is a choice of several kernels.

../_images/jupyterlab_intro-1.png
Python 3 kernel

For general development using Python 3.

Geo science kernel

Geared geared towards using Python 3 in development of geo science apps.

The difference is that the latter already has downloaded and installed all the Python libraries that are usually of use in EO data analysis and monitoring.

Julia kernel

R kernel

Running code from documentation with Python 3 kernel

Suppose you wanted to work through article Use CopPhil JupyterLab and Python to find all Sentinel 2 products over Manila in 2024 and the code in it starts like this:

Import necessary python librariecs.

# HTTP requests
import requests

# JSON parser
import json

# data manipulation
import pandas as pd

When you run that code in Python 3 kernel, there will be an error which amounts to the fact that these libraries are not installed. So install it with:

pip install requests pandas
../_images/python-vs-geo-science-2.png

The pandas library is now installed and will continue to be present while you are using the same server. In most cases, you should restart the kernel so that updated packages take effect.

Moving on through the code in the article, we get:

../_images/python-vs-geo-science-3.png

Some errors are still present. They appear in one part of the application while they do not appear in the other parts of the same application.

Running the code through Geo science kernel

When starting the code with Geo science kernel, everything runs smoothly:

../_images/python-vs-geo-science-4.png

What To Do Next

The recommendation is to run the codes from this documentation using Geo science kernel. Proceed, for example, with the following EO data articles, running on JupyterLab:

Getting started with EO data

Monitoring, analyzing, processing