Skip to content

rsignell/geo-notebooks

 
 

Repository files navigation

Geospatial Python Notebooks

This repository contains example Jupyter notebooks for working with STAC, OpenDataCube, and Dask.

The ODC Planetary Computer and the ODC Landsat on AWS notebooks were presented at FOSS4G-2021, see the accompanying slides.

The aois directory contains several example GeoJSON features that can be used as AOIs for querying STAC APIs.

The Dockerfile and docker-compose files can be used to run a Jupyter Notebook container complete with all needed libraries.

For Dask there are a few options:

  • Use Dask Gateway to launch a Dask cluster in your preferred cloud provider. The Planetary Computer notebook uses Dask Gateway to launch a cluster within the Planetary Computer environment.
  • Use a local Dask cluster - no external setup is required, but is useful for development and trying out Dask. The data will be downloaded to the local Dask cluster.
  • Use coiled.io to easily manage Dask clusters with any cloud provider and region. Great way to get started when running local notebooks and for tracking costs.

Docker Usage

First, create a .env file in the root directory of this repository and provide the following environment variables:

  • AWS_ACCESS_KEY_ID="your id"
  • AWS_SECRET_ACCESS_KEY="your secret key"
  • AWS_REQUEST_PAYER=requester

If you are using temporary credentials, you also need to set:

  • AWS_SESSION_TOKEN="your session token"

Note: Only some notebooks, e.g. notebooks/odc-landsat.ipynb, require AWS credentials. If you are only running notebooks that do NOT require AWS credentials (e.g. notebooks/odc-planetary-computer.ipynb), you can simply create an empty .env file.

Then build the Docker container:

$ docker-compose build

Then run using Docker compose:

$ docker-compose up

After starting up the container it will print a local URL that can be copy and pasted into a browser.

Launch in SageMaker Studio Lab

If you have an AWS SageMaker Studio Lab account, you can open in Studio Lab using the button below, then when prompted, choose to download the whole repo and to build the conda environment. If you don't have an account, you can sign up for free (no AWS account required).

Open In SageMaker Studio Lab

About

The notebooks in this repository were created by Element 84.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%