Giter Site home page Giter Site logo

loreabad6 / ogh23 Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 2.0 22.09 MB

Materials for the OGH 23 tutorial on S1 and S2 data handling with R and Python

Home Page: https://loreabad6.github.io/ogh23/

Dockerfile 0.01% Jupyter Notebook 5.38% SCSS 0.01% HTML 94.61%
geopython python r rspatial sentinel-1 sentinel-2

ogh23's Introduction

Tools and packages to query and process Sentinel-1 and Sentinel-2 data with R and Python

See a summary blogpost here: https://loreabad6.github.io/posts/2023-10-17-stac-across-languages/

Intro slides here.

Wednesday, Aug. 31th & Sept. 1st 2023

Part 1: Thu. 31.08. - 13h30-15h00

During this session we will take a look at Sentinel-1 data, specifically tools to query data for subsequent large processing and some basic data analysis in Python.

You can browse the material here.

Part 2: Fri. 01.09. - 09h00-10h30

On Friday, we will focus on Sentinel-2 data and the STAC API going back and forth between R and Python environments.

You can browse the R material here and the Python material here.

Set-up

Docker

Since installations of R, but mostly Python, can be complicated, I recommend using Docker for this tutorial. To use them, please download and install Docker Engine/Desktop:

Once you have installed this, start the docker engine.

There are two Dockerfiles for this tutorial.

Python environment:

We will work on a minimal Jupyter notebook image enhanced with some geospatial flavor and the specific requirements for this lesson.

  1. Go to your terminal and navigate to your desired directory.

  2. Clone this repository.

git clone https://github.com/loreabad6/ogh23.git
  1. Build the Docker image:
cd dockerfiles/pyenv
docker build -t pyenv . 
  1. Run the Docker container. Note that --rm will remove the container when you quit.
cd ../..
docker run --name ogh-pyenv --rm -it -p 8888:8888 -v $PWD/:/home/jovyan pyenv 
  1. If successful, you will see a link to the Jupyter notebook printed on the console. Copy that link in your browser and you are ready to go!

To stop the notebook environment go back to the terminal and CTRL+C.

R environment:

For the R environment we will run a RStudio cloud instance. Given that you already followed steps 1 and 2 for the Python environment:

  1. Build the Docker image:
cd dockerfiles/renv
docker build -t renv . 
  1. Run the Docker container
cd ../..
docker run --name ogh-renv --rm -e DISABLE_AUTH=TRUE -e USERID=$UID -p 8786:8787 -v $PWD/:/home/rstudio/ogh23/ renv
  1. Go to your browser and type: http://localhost:8786/. Now you have an RStudio interface on your browser!

To stop the RStudio environment go back to the terminal and CTRL+C.

Since we are going back and forth with the tutorials, it would be good if you can run both containers at the same time. In simple terms this means you can execute docker run in two different command line windows and then have Jupyter Notebooks and RStudio cloud open in two tabs. Please test that this works for you before the tutorial.

Alternatives

If you want to work on your own local machine and do the manual installations, refer to the Dockerfiles for the specific requirements for the R and Python environments.

ogh23's People

Contributors

loreabad6 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.