From NDVI data with OpenEO to time series visualisation with Holoviews

Author(s) Marie Josse avatar Marie Josse
Reviewers Helena Rasche avatarMarie Josse avatarBjörn Grüning avatar
Overview
Creative Commons License: CC-BY Questions:
  • What’s the NDVI ?

  • How to evaluate the NDVI through out time ?

Objectives:
  • Use OpenEo technologies and learn how to download data with them

  • Learn to use Holoviz environment to process csv data

  • Create timeseries and visualisation of the NDVI

  • Handle going form one interactive tool to another

Requirements:
Time estimation: 1 hour
Supporting Materials:
Published: Jan 24, 2024
Last modification: Jun 29, 2024
License: Tutorial Content is licensed under Creative Commons Attribution 4.0 International License. The GTN Framework is licensed under MIT
purl PURL: https://gxy.io/GTN:T00400
version Revision: 3

Through this tutorial you will learn here how to access and download Copernicus Data Space Ecosystem (CDSE) data through a jupyterlab Galaxy interactive tool :

This tool enables you to leverage the Copernicus Data Space Ecosystem services and access data effortlessly. The JupyterLab service allows you to dive into data exploration, visualization, and analysis without the hassle of installing dependencies or downloading large data sets.

You will also apprehend how to use the Holoviz ecosysytem by plotting and visualising NDVI (from the CDSE) timeseries : HoloViz provides high-level Python tools that are designed to work together to solve the entire problem of visualization, from conducting exploratory data analysis to deploying complex dashboards.

Agenda

In this tutorial, we will cover:

  1. Context on Galaxy
  2. Copernicus Data Space Ecosystem
  3. Holoviz
  4. Conclusion

Context on Galaxy

Interactive tools work differently than classical tools as it allows the user to interact with a dedicated graphical interface. This kind of tools is used to give access to Jupyter notebooks, RStudio or R Shiny apps for example.

You can come back to where you left off the tutorial anytime by clicking level.

Hands-on: Log in to Galaxy
  1. Open your favorite browser (Chrome, Safari or Firefox as your browser, not Internet Explorer!)
  2. Browse to your Galaxy instance
  3. On the top pannel go to Login or Register

The Galaxy homepage is divided into three panels:

  • Tools on the left
  • Viewing panel in the middle
  • History of analysis and files on the right
Screenshot of the Galaxy interface, the tools panel is on the left, the main panel is in the center, and the history is on the right.Open image in new tab

Figure 1: Galaxy interface explanation

The first time you use Galaxy, there will be no files in your history panel.

Copernicus Data Space Ecosystem

Hands-on: Launch the interactive tool
  1. Copernicus Data Space Ecosystem with the following parameters:
    • “Do you already have a notebook?”: Start with a fresh notebook
    • “Include data into the environment - optional “: You don’t need anything
  2. Click on Run Tool

    1. Go to User > Active InteractiveTools
    2. Wait for the Copernicus Data Space Ecosystem to be running (Job Info)
    3. Click on Copernicus Data Space Ecosystem

Hands-on: Navigate the jupyterlab
  1. Once you are in the jupyterlab go to :
    • notebooks
    • Then, openeo
    • Open the notebook NDVI_Timeseries.ipynb
  2. You can start running your notebook. To do so you can go on the pannel displaying button right above the notebook and click on the workflow-run. Everytime you press this button you can excecute a one by one the cells.
  3. In the Setup section when you execute the connection cell you’ll have some actions to conduct.
  4. First click ont the link appearing, you’re notebook should look like the following : Begining of the NDVI notebook  with the connection link visible.
  5. Once you clicked a new window opens. If you don’t have a copernicus account please create one and follow the instructions given.
  6. If you have an account sign in and then press the green YES Image of how does the connection page looks like.
  7. You’ll be redirected to a page letting you know the connection was a success Image of the successful connection.
  8. Now, you can go back on your jupyterlab and execute the rest of the notebook.
  9. Once you executed the entire notebook you should have a new folder in the left pannel named ndvi-results go in it.
  10. Select the 3 files (timeseries-basic.csv, timeseries-masked.csv, timeseries-smoothed.csv) there and click right, and then copy The copy command on the 3 files in the ndvi-results folder.
  11. Then go back to the root of your path and go in the ouputs folder. There you can click right and paste the 3 NDVI files (timeseries-basic.csv, timeseries-masked.csv, timeseries-smoothed.csv). The resulting 3 files in the outputs folder.
  12. This part is now finished you just have to correctly close this notebook. On the top left click on files and then on Shut down. The shut down button to correctly close the jupyterlab.

Go back on your Galaxy window. After a couple minutes you should see your outputs turning green in your history.

Check that your data are in csv format.

galaxy-pencil, it should be csv

  • Click on the galaxy-pencil pencil icon for the dataset to edit its attributes
  • In the central panel, click galaxy-chart-select-data Datatypes tab on the top
  • In the galaxy-chart-select-data Assign Datatype, select csv from “New type” dropdown
    • Tip: you can start typing the datatype into the field to filter the dropdown menu
  • Click the Save button

Holoviz

Hands-on: Launch Holoviz
  1. Holoviz with the following parameters:
    • “Do you already have a notebook?”: Start with a fresh notebook
    • “Include data into the environment - optional “: Select timeseries-basic, timeseries-masked and timeseries-smoothed
  2. Click on Run Tool

    1. Go to User > Active InteractiveTools
    2. Wait for the Holoviz to be running (Job Info)
    3. Click on Holoviz

  3. Once, you are in the jupyterlab go in the the notebooks folder
  4. Open a terminal in bash and write the following
    Input: Download the notebook
    wget https://raw.githubusercontent.com/fair-ease/Holoviz/main/Tabular_Datasets_NDVI.ipynb
    

Now that you have your notebook you can just follow the instructions.

Enjoy discovering the rest of the notebook.

Conclusion

The tutorial ends there and with that you have the basis on how to use jupyterlab tools and more particularly the copernicus and holoviz ones.