Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Data API Tile Preview Demo #350

Merged
merged 3 commits into from
Sep 9, 2024
Merged

Add Data API Tile Preview Demo #350

merged 3 commits into from
Sep 9, 2024

Conversation

strixcuriosus
Copy link
Contributor

Add Demo Notebook for Rendering Data API Search Results as Preview Tile Layers

This PR adds a demo notebook that showcases how to visualize Planet’s Data API search results as preview tile layers, similar to the preview experience in Planet Explorer, but directly in Python.

📋 Key Features:

  • Search & Filter: Query the Data API using filters like date range, cloud cover, and AOI.
  • Interactive Map: Use folium to display and toggle Planet satellite imagery preview tiles.
  • GeoJSON AOI: Automatically centers the map on a user-defined GeoJSON AOI.
  • Fast Preview: render imagery preview tiles without waiting for full order activation, streamlining decision-making.

🛠 What’s Included:

  • API setup, AOI definition using GeoJSON, and creating Data API search with filters.
  • Building Tile Service preview URLs for Data API results.
  • Rendering search results as tile layers on a map.

🌟 Value:

  • Offers a quick visualization experience, similar to Planet Explorer, but with the flexibility of Python.
  • Enables fast, synchronous previews, speeding up decision-making
  • Provides early insights before ordering, downloading, or delivering data

See #349

Copy link
Contributor

@olepinard olepinard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ash, this looks really great and will be a helpful add to this repository. Looks good to me!

@matthew-ballard
Copy link
Contributor

this looks great, just a few comments:

  • could the shell command installs be removed and we add those packages to the requirements.txt file?
  • suggest changing the search dates from 2016 to 2024, images look nicer

Copy link
Contributor

@nik-bladey nik-bladey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to see this.

One interesting thing about this demo is that it leverages two different APIs (Data API and Tile Service API), both of which are now maintained by the same team, which is tasked with the "Gather" phase of the platform experience. It might be worth (if not now, then at some point) renaming the directory to reflect that customer journey stage rather than being specific to Data API. @matthew-ballard, do you have thoughts on this?

@nik-bladey
Copy link
Contributor

Also best to keep the README up-to-date.

Documentation updates

Co-authored-by: Nik (Anna) Bladey <[email protected]>
@strixcuriosus
Copy link
Contributor Author

strixcuriosus commented Sep 9, 2024

  • could the shell command installs be removed and we add those packages to the requirements.txt file?

@matthew-ballard thanks for the suggestion. This seems like a topic for bigger conversation outside of this specific notebook.

Including the special notebook-specific dependencies inline ensures that they don't get lost if someone shares or runs just the isolated notebook (without the full repo context). For example, some users will run individual notebooks directly in colab. IMO we should strive to make each notebook fully runnable (or documented) in a standalone environment.

It is also a common pattern in the data science community, for example see:

Are you recommending updating the requirements.txt in planet-notebook-docker/requirements.txt ?
This requirements.txt has not been updated in 4 years, is buried under the docker section, and seems to be global for the entire repo.
I am happy to update this for now to include folium, but I know other notebook authors will prefer different mapping libraries, and I don't think we should have global dependencies as we grow out more of an ecosystem of notebook demos.

I would also like to keep the install command for those who wish to use this notebook without dealing with the global docker env setup so that it can work in colab or other environments with ease.

@strixcuriosus strixcuriosus merged commit 33af52b into master Sep 9, 2024
@jonasViehweger jonasViehweger deleted the scene-preview-tiles branch October 1, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants