planetlabs / notebooks

interactive notebooks from Planet Engineering
https://developers.planet.com/
Apache License 2.0
618 stars 302 forks source link

Replace download_quads notebook with a more complete overview #342

Closed joferkington closed 2 months ago

joferkington commented 2 months ago

Currently, the download_quads notebook and example script interacts with the API incorrectly and silently gives the wrong results. It ignores two very critical things for interacting with any Planet API:

  1. pagination - the results returned by the API are not on a single page
  2. automatic retries of 429/etc responses - the API will respond with 429s that should be retried with exponential backoff

As a result, it gives on the first few quads, not all quads found by the search in the example. It also will very quickly give errors if used, as 429 responses are not correctly retried.

This MR replaces the incorrect content in the notebook with a broader overview of the Basemaps API showing correct pagination usage and automatic retries of 429/etc responses.