Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Interactive Code Editor-style reprs for Earth Engine objects in a Jupyter notebook

License

NotificationsYou must be signed in to change notification settings

aazuspan/eerepr

Repository files navigation

Earth Engine PythonPyPI versionconda-forge linknbviewerOpen In Colab

Add interactive Code Editor-style HTML reprs to Earth Engine objects in a Jupyter environment.

eerepr demo expanding the metadata for an image collection

Setup

Tip

eerepr is pre-installed inGoogle Colab!

Install from PyPI:

$ pip install eerepr

Install from Conda-Forge:

$ conda install -c conda-forge eerepr

Usage

Activating eerepr

importeerepreerepr.initialize()

Runningeerepr.initialize adds an HTML repr method to all Earth Engine objects. When you print them in an IPython environment, you'll see an interactive HTML repr instead of a boring old string repr. Simple as that!

Tip

If you're usinggeemap>=0.35.2,eerepr is automatically imported and initialized.

Manually Rendering Objects

Jupyter only automatically displays the last object in a cell. To manually render an HTML repr anywhere in a code block, useIPython.display.display.

fromIPython.displayimportdisplayimporteeimporteerepree.Initialize()eerepr.initialize()display(ee.FeatureCollection("LARSE/GEDI/GEDI02_A_002_INDEX").limit(3))

Configuration

eerepr.initialize takes a number of configuration options:

  • max_repr_mbs: When an HTML repr exceeds this size (default 100 MBs), the string repr will be displayed instead to avoid freezing the notebook.
  • max_cache_size: The maximum number of Earth Engine objects to cache. UsingNone (default) is recommended unless memory is very limited or the object is likely to change, e.g. getting the most recent image from a near-real-time collection. Caching can be disabled by setting to0.
  • on_error: When an object can't be retrieved from Earth Engine, eitherwarn (default) orraise.

[8]ページ先頭

©2009-2025 Movatter.jp