# importing required modules
from zipfile import ZipFile
! wget https://github.com/EO-DataHub/eodh-training/raw/refs/heads/main/presentations/Workshop/workshop.zip
# specifying the zip file name
= "workshop.zip"
file_name
# opening the zip file in READ mode
with ZipFile(file_name, 'r') as zip:
# printing all the contents of the zip file
zip.printdir()
# extracting all the files
print('Extracting all the files now...')
zip.extractall()
print('Done!')
Pathfinder Phase Workshop: Setup
Description & purpose: This Notebook is designed to explain how Workshop attendees can set up their system ready for the practical exercises. It also explains how to use the Catalogue UI (as avilable at the time of the workshop).
Author(s): Alastair Graham
Date created: 2025-02-18
Date last modified: 2025-02-19
Licence: This notebook is licensed under Creative Commons Attribution-ShareAlike 4.0 International. The code is released using the BSD-2-Clause license.
Copyright (c) , All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
General Links: * EO Data Hub: https://eodatahub.org.uk/ * CEDA: https://www.ceda.ac.uk/
What is the EODH?
The Earth Observation Data Hub is:
“A UK Pathfinder project delivering access to Earth Observation (EO) data for effective decisionmaking across government, business and academia. The Earth Observation DataHub (EODH) brings together an expert project delivery team and industrial partners in an ambitious project… Users of the Hub will be able to explore areas of interest in the UK and across the globe… It will also enable selected users to support their own analyses, services and tools using the Hub’s workflow and compute environments.”
More details can be found online at https://eodatahub.org.uk/
Components of the Hub include:
- A Resource Catalogue - a STAC compliant catalogue of open and commercial satellite imagery, climate data, model results, workflows and more
- A Workflow Runner - a dedicated piece of cloud infrastructure to horizontally scale workflow requirements
- A Web Presence - an intuitive user interface to allow account management, data discovery and mapping
- An App Hub - a science portal providing access to a Jupyter lab environment
Initial steps
The first step is to log into the system. If you are attending this workshop you should have been provided with an account linked to your GitHub account. Complete the following steps to access the latest Hub platform.
- Open up a browser and navigate to https://staging.eodatahub.org.uk/
This will provide the landing page that looks as shown in the image below.
- Click on the Sign In button and then click on the
Sign In with GitHub
button. You will need to supply the GitHub account details you pre-registered when signing up to the workshop.
Assuming that this has worked successfully then you will be returned to the initial page but you will be logged in and able to access
Click on the Workspaces
button at the top of the page and you will be taken to your EODH workspace manager. It should look something like the image below:
The next thing to do is set up an API key/token so that you are able to access your own workspace resources and interact with the workflow runner should you so wish. Click on Credentials
in the list on the left-hand side of the screen and then click on Request New Token
. Make sure you keep the credentials private to you and ensure that you copy them down. Specifically, you will need the alphanumeric code after API Key:
but copy all the details to a local location. Once you have completed that step your Credentials
page should look similar to that shown below.
The Notebook Service
The next thing to do is access the JupyterHub Notebook Service hosted as part of the EODH platform. At the top of the page, click on Notebooks
and you should be directed to a page that looks like the following:
If not already selected (as in the image above) select EO DataHub
by clicking the radio button to its left and then click Start
. This will take you to the AppHub and you should see a screen similar to that below (but without any folders or files in the left pane - until you have generated them).
Copy the code in the following cell. In the EODH AppHub webpage, click on the Console
button [highlighted in red above] (or File | New | Console
) and paste the copied code into the console. Press Shift + return
and the workshop materials should arrive in your session. You may need to wait, or press the refresh icon at the top of the left pane.
Only run that code once. If you need to run it more than once, delete or rename the files from the first run or run it in a different folder in your JupyterHub space.