In this repository, you'll find a collection of Jupyter notebooks from the software developers, data scientists, and developer advocates at Planet. These interactive, open-source (APLv2) guides are designed to help you explore Planet data, work with our APIs and tools, and learn how to extract information from our massive archive of high-cadence satellite imagery. We hope these guides will inspire you to ask interesting questions of Planet data. Need help? Find a bug? Please file an issue and we'll get back to you.
- Explore the Planet Data API with Python
- Search, activate, and download imagery with the Planet Python Client
- Planet Data API reference
- Inspecting Available Feeds
- Getting Feed Results
- Visualizing Raster Results
- Converting Raster Results to Vector Features
- Creating a Heatmap of Vector Results
- Create a mosaic from multiple PlanetScope scenes
- Calculate a vegetation index from 4-band satellite imagery
- Convert PlanetScope metadata from radiance to reflectance
- Visualize and convert a UDM to a binary mask
- Work with the Usable Data Mask (UDM2)
- Detect, count, and visualize ships in Planet imagery
- Python examples for remote sensing
- Pixel-by-pixel comparison of PlanetScope and Landsat Scenes
- Calculate Coverage for a Search Query
- Segment and Classify Crops
- Identify Forest Degradation
- Identify the Temporal Signature of Crops
Soon we hope to add notebooks from the researchers, technologists, geographers, and entrepreneurs who are already using Planet data to ask interesting and innovative questions about our changing Earth. If you're working with our imagery and have a notebook (or just an idea for a notebook) that you'd like to share, please file an issue and let us know.
git clone https://github.com/planetlabs/notebooks.git
cd notebooks
Planet Notebooks relies on a complex stack of technologies that are not always easy to install and properly configure. To ease this complexity we provide a docker container for running the notebook on docker compatible systems. To install docker on your system please see docker's documentation for your operating system.
The Docker image for these notebooks is hosted in the planetlabs/notebooks repo on DockerHub. To download and prepare the image for use, run:
docker pull planetlabs/notebooks
docker tag planetlabs/notebooks planet-notebooks
Alternatively, you can build the docker image locally. Note, this only has to be done the first time you use it. After checking out this repository, you run:
cd planet-notebook-docker
docker build --rm -t planet-notebooks .
cd ..
This will build and install the Docker image on your system, making it available to run. This may take some time (between 10 and 20 minutes) depending on your network connection.
To run the container (after building it), add your Planet API key below and issue the following command from the git repository root directory:
docker run -it --rm -p 8888:8888 -v $PWD:/home/jovyan/work -e PL_API_KEY='[YOUR-API-KEY]' planet-notebooks
This does several things:
-
Maps the docker container's
8888
port to your system's8888
port. This makes the container available to your host systems web browser. -
Maps a host system path
$PWD
to the docker containers working directory. This ensures that the notebooks you create, edit, and save are available on your host system under thejupyter-notebooks
sub-directory and are not destroyed when the you exit the container. This also allows for running tests in thetests
sub-directory. -
Starts in an interactive terminal and is accessible through http://localhost:8888.
-
Sets an environment variable with your unique Planet API key for authenticating against the API.
-
Include the
--rm
option to clean up the notebook after you exit the process.
Once the Docker container is running, the CLI output will display a URL that you will use to access Jupyter notebooks with your browser.
http://localhost:8888/?token=<UNIQUE-TOKEN>
NOTE: This security token will change every time you start your Docker container.