You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this repository, you'll find a collection of [Jupyter notebooks](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_is_jupyter.html) from the software developers, data scientists, and developer advocates at [Planet](https://www.planet.com/). These interactive, open-source ([APLv2](LICENSE)) guides are designed to help you work with our APIs and tools, explore Planet data, 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](https://github.com/planetlabs/notebooks/issues/new) and we'll get back to you.
Now, your Planet API Key is stored in the variable ```PLANET_API_KEY``` and is ready to use in your Python code.
55
53
56
-
###Sentinel Hub Python SDK
54
+
## Sentinel Hub Python SDK
57
55
Some Notebooks in this repository use the [Sentinel Hub Python SDK](https://sentinelhub-py.readthedocs.io/en/latest/index.html). Currently, this SDK uses a different method of authenticating than what is used with the Planet APIs and SDK for Python.
58
56
59
57
For the Sentinel Hub Python SDK, you must provide a ```client_id``` and a ```client_secret``` which can be obtained from the [Dashboard](https://apps.sentinel-hub.com/dashboard/) app. You can find full instructions on setting up the client credentials in this SDK from the [SDK documentation](https://sentinelhub-py.readthedocs.io/en/latest/configure.html).
@@ -75,140 +73,45 @@ else:
75
73
```
76
74
77
75
## Run Planet Notebooks in Docker
78
-
Planet Notebooks rely on a complex stack of technologies that are not always easy to install and properly
79
-
configure. To ease this complexity we provide a docker container for running the notebook on docker compatible
80
-
systems. To install docker on your system please see docker's [documentation](https://docs.docker.com/engine/installation/)
81
-
for your operating system.
76
+
Planet Notebooks rely 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 documentation](https://docs.docker.com/get-started/get-docker/) for your operating system.
82
77
83
-
### Download prebuilt Docker image (recommended)
84
-
The Docker image for these notebooks is hosted in the [planetlabs/notebooks](https://hub.docker.com/r/planetlabs/notebooks) repo on DockerHub. To download and prepare the image for use, run:
78
+
### Build the Docker image
85
79
86
-
```bash
87
-
cd notebooks
88
-
docker pull planetlabs/notebooks
89
-
docker tag planetlabs/notebooks planet-notebooks
90
-
91
-
# If you get errors running the above, you might have to add sudo to the beginning:
92
-
#sudo docker pull planetlabs/notebooks
93
-
#sudo docker tag planetlabs/notebooks planet-notebooks
94
-
```
95
-
96
-
If you want to re-build the Docker image yourself, this is documented below in the "Appendix: Build the Docker image" section.
97
-
98
-
### Run the container
99
-
To run the container (after building or downloading it), add your Planet API key below and issue the following command from the git repository root directory:
80
+
First you must build the docker image. After checking out the repository, you run:
This will build and install the Docker image on your system, making it available to run. This may take some time (from 10 minutes to an hour) depending on your network connection and how long Anaconda takes to configure its environment.
111
87
112
-
1. Maps the docker container's ```8888``` port to your system's ```8888``` port. This makes the
113
-
container available to your host systems web browser.
88
+
> [!IMPORTANT]
89
+
> You may need to rebuild the Docker image if this repository changes or if you need to use newer versions of the Planet SDK for Python.
114
90
115
-
1. Maps a host system path ```$PWD``` to the docker container's working directory.
116
-
This ensures that the notebooks you create, edit, and save are available on your host system under the
117
-
`jupyter-notebooks` sub-directory and are not *destroyed* when you exit the container.
118
-
This also allows for running tests in the `tests` sub-directory.
91
+
### Run the Container
92
+
To run the container after building it, add your Planet API key to the command below and run it from the cloned `planetlabs/notebooks` repository root directory in Unix bash, Windows PowerShell, Git Bash, or WSL.
119
93
120
-
1. Ensures that the directory in the Docker container named `/home/jovyan/work` that has the notebooks
121
-
in them is accessible to the Jupyter notebook server.
1. Starts an interactive terminal that is accessible through http://localhost:8888.
98
+
> [!TIP]
99
+
> If you get permission errors: Add sudo to the front (Linux/Mac) or run PowerShell as Administrator (Windows).
124
100
125
-
1. Sets an environment variable with your unique Planet API key for authenticating against the API.
101
+
This does several things:
126
102
127
-
1. Includes the ```--rm``` option to clean up the notebook after you exit the process.
103
+
1.**Maps port 8888** - Makes the container accessible at http://localhost:8888
104
+
2.**Mounts your notebooks** - Maps `jupyter-notebooks/` folder to `/home/jovyan/work` so your work persists and notebooks are accessible to Jupyter
105
+
3.**Sets your API key** - Replace `your-key` with your actual Planet API key for API authentication
106
+
4.**Starts interactive terminal** - Accessible through the web browser
107
+
5.**Auto-cleanup** - Removes container when you exit (`--rm`)
128
108
129
-
### Open Jupyter notebooks
109
+
### Open Jupyter Notebooks
130
110
Once the Docker container is running, the CLI output will display a URL that you will use to access Jupyter notebooks
131
111
with your browser.
132
112
```
133
113
http://localhost:8888/?token=<UNIQUE-TOKEN>
134
114
```
135
115
136
-
NOTE: This security token will change every time you start your Docker container.
137
-
138
-
## Repository Organization
139
-
140
-
### jupyter-notebooks
141
-
142
-
#### exploring_planet_data: Working with our various image products, how to use the udm mask or deliver imagery to our GEE integration
143
-
144
-
*[How to use the Data and Orders API to create analysis ready data](https://github.com/planetlabs/notebooks/tree/proserve_restructure/jupyter-notebooks/exploring_planet_data/analysis-ready-data)
145
-
*[Converting Raster Results to Vector Features](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics-snippets/README.md)
146
-
*[Introduction to Cloud Native Geospatial Tools](https://github.com/planetlabs/notebooks/tree/master/jupyter-notebooks/cloud-native-geospatial)
147
-
*[Comparing Planet Scope with Landsat 8]()
148
-
*[Deliver data to GEE](https://github.com/planetlabs/notebooks/tree/master/jupyter-notebooks/cloud-native-geospatial)
149
-
*[Start working with satellite imagery in Python](https://github.com/planetlabs/notebooks/tree/master/jupyter-notebooks/cloud-native-geospatial)
150
-
*[Create labels using Planet imagery](https://github.com/planetlabs/notebooks/tree/master/jupyter-notebooks/cloud-native-geospatial)
151
-
*[Pixel-by-pixel comparison of PlanetScope and Landsat Scenes](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/landsat-ps-comparison/landsat-ps-comparison.ipynb)
152
-
*[Visualize and convert a UDM to a binary mask](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/udm/udm.ipynb)
153
-
*[Work with the Usable Data Mask (UDM2)](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/udm2)
154
-
155
-
156
-
157
-
158
-
#### Search, activate, download with the Data API
159
-
*[Explore the Planet Data API with Python](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/data-api-tutorials/planet_data_api_introduction.ipynb)
160
-
*[Search, activate, and download imagery with the Planet Python Client](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/data-api-tutorials/planet_python_client_introduction.ipynb)
*[Planet Data API reference](https://developers.planet.com/docs/apis/data/)
163
-
164
-
#### Ordering, delivery, and tools with the Orders API
165
-
*[Ordering and Delivery](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/orders_api_tutorials/ordering_and_delivery.ipynb)
166
-
*[Tools and Toolchains](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/orders_api_tutorials/tools_and_toolchains.ipynb)
167
-
*[Planet Orders API reference](https://developers.planet.com/docs/orders/)
168
-
169
-
### Process Planet data
170
-
*[Create a mosaic from multiple PlanetScope scenes](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/mosaicing/basic_compositing_demo.ipynb)
171
-
*[Calculate a vegetation index from 4-band satellite imagery](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/ndvi/ndvi_planetscope.ipynb)
172
-
*[Convert PlanetScope metadata from radiance to reflectance](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/toar/toar_planetscope.ipynb)
173
-
174
-
175
-
### Analyze and visualize Planet data
176
-
177
-
* Analytics quickstart:
178
-
1.[Summarizing Feeds and Subscriptions](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics/quickstart/01_checking_available_feeds_and_subscriptions.ipynb)
1.[Getting Started with Planet Analytics API](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics/user-guide/01_getting_started_with_the_planet_analytics_api.ipynb)
5.[Summary Statistics - Ships and Clouds](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics/user-guide/05_summary_statistics_ships_and_clouds.ipynb)
187
-
* Other analytics notebooks:
188
-
*[Detect, count, and visualize ships in Planet imagery](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/ship-detector/01_ship_detector.ipynb)
189
-
*[Pixel-by-pixel comparison of PlanetScope and Landsat Scenes](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/landsat-ps-comparison/landsat-ps-comparison.ipynb)
190
-
*[Calculate Coverage for a Search Query](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/coverage/calculate_coverage.ipynb)
191
-
*[Segment and Classify Crops](https://github.com/planetlabs/notebooks/tree/master/jupyter-notebooks/crop-segmentation-and-classification)
*[Identify the Temporal Signature of Crops](https://github.com/planetlabs/notebooks/tree/master/jupyter-notebooks/temporal-analysis)
194
-
195
-
*[Creating a Heatmap of Vector Results](https://github.com/planetlabs/notebooks/blob/master/jupyter-notebooks/analytics/change_detection_heatmap.ipynb)
196
-
197
-
198
-
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](https://github.com/planetlabs/notebooks/issues) and let us know.
199
-
200
-
### Appendix: Build the Docker image
201
-
202
-
This documents how to build the docker image yourself, rather than using the recommended step of downloading pre-built Docker images. This is useful if you are a developer adding dependencies or a new Jupyter notebook to this repo, for example.
203
-
204
-
First you must build the docker image. Note, this only has to be done the first time you use it. After checking out the
205
-
repository, you run:
206
-
```bash
207
-
cd planet-notebook-docker
208
-
docker build --rm -t planet-notebooks .
209
-
cd ..
210
-
```
211
-
212
-
This will build and install the Docker image on your system, making it available to run. This may take some
213
-
time (from 10 minutes to an hour) depending on your network connection and how long Anaconda takes to configure
214
-
its environment.
116
+
> [!NOTE]
117
+
> This security token will change every time you start your Docker container.
Copy file name to clipboardExpand all lines: planet-notebook-docker/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
# Planet Notebook
1
+
# Planet Notebooks Docker Instructions
2
2
3
-
This image provides the dependencies for running jupyter notebooks in the [planetlabs/notebooks](https://github.com/planetlabs/notebooks) GitHub repository. A prebuilt version of this image can be downloaded from the [planetlabs/notebook](https://hub.docker.com/r/planetlabs/notebooks) dockerhub repo (recommended). Alternatively, this image can be built locally from the Dockerfile. The specifics of building and running this image are given in the planetlabs/notebooks GitHub [README.md](https://github.com/planetlabs/notebooks/blob/master/README.md) file.
3
+
This image provides the dependencies for running jupyter notebooks in the [planetlabs/notebooks](https://github.com/planetlabs/notebooks) GitHub repository. This image must be built locally from the Dockerfile. The specifics of building and running this image are given in the planetlabs/notebooks GitHub [README.md](https://github.com/planetlabs/notebooks?tab=readme-ov-file#run-planet-notebooks-in-docker) file.
4
4
5
5
This image is based on the [jupyter/minimal-notebook](https://hub.docker.com/r/jupyter/minimal-notebook/) image and additional tips on running the jupyter notebook can be found in the documentation for that image.
0 commit comments