151 dataset explorer
Earth Engine Dataset Explorer
The source code is adapted from the scienceai_ee_dataset_explorer_v0.ipynb notebook at https://bit.ly/48cE24D. Credit to the original author Renee Johnston (https://github.com/raj02006).
Please note that this feature experimental. Using the Gemini API may incur charges. Please checkout the pricing here.
Overview¶
This notebook, adapted from the source code by the Science AI team in Google Research, implements the Earth Engine Dataset Explorer, designed to help users discover datasets within the Earth Engine catalog that are relevant to their geospatial analysis tasks. The core functionality includes:
- Loading and processing Earth Engine dataset metadata and pre-computed embeddings.
- Implementing a dataset search function that uses vector similarity to find relevant datasets based on user queries.
- Creating an interactive user interface that displays search results, LLM-generated dataset details, code samples, and map visualizations.
To run the dataset explorer, run all cells, and then check out the "Earth Engine Dataset Explorer" section at the end of the notebook.
Setup Details and Billing¶
You will need:
Each of the above can be stored in the colab "Secrets" panel. Add the following strings as secrets:
- Use
GOOGLE_PROJECT_ID
for the Cloud project id. - Use
GOOGLE_API_KEY
for the Gemini API key
Caveats¶
THIS TOOL IS UNSAFE, AS IT AUTOMATICALLY RUNS LLM-GENERATED PYTHON CODE! USE AT YOUR OWN RISK.
This is an early prototype, bugs and unexpected behavior are likely. Code improvements and refactors to follow.
Currently no spatial or temporal filtering of the datasets occurs as part of the dataset search functionality. Filtering only happens based on semantic relevance. We hope to incorporate spatiotemporal filtering soon in a future version. Stay tuned.
The very lightweight use of the TextEmbedding API from VertexAI requires billing to be enabled in your Cloud project. It should be an extremely minimal expense. (Details).
For assistance, please email scienceai_ee_dataset_explorer@googlegroups.com.
Installation¶
Uncomment the following line to uninstall the existing geemap package.
# %pip uninstall geemap -y
Uncomment the second line to install the latest version of geemap. Restart the kernel after installing geemap.
# %pip install -U "geemap[ai]"
Import library¶
from geemap.ai import DatasetExplorer
Create the Earth Engine Dataset Explorer¶
Run the following cell to create the Earth Engine Dataset Explorer. It may take a few seconds to load datasets and embeddings. Please be patient.
explorer = DatasetExplorer()
Display the Earth Engine Dataset Explorer¶
explorer.show()
Type a query in the search bar and press Enter to search for relevant datasets. The search results will be displayed in the table below. Click on a dataset to view more details, code samples, and a map visualization.