Skip to main content

Code Editor-style reprs for Earth Engine data in a Jupyter notebook.

Project description

eerepr

Earth Engine Python PyPI version conda-forge link nbviewer Open 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 in Google Colab!

Install from PyPI:

$ pip install eerepr

Install from Conda-Forge:

$ conda install -c conda-forge eerepr

Usage

Activating eerepr

import eerepr

eerepr.initialize()

Running eerepr.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 using geemap>=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, use IPython.display.display.

from IPython.display import display
import ee
import eerepr

ee.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. Using None (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 to 0.
  • on_error: When an object can't be retrieved from Earth Engine, either warn (default) or raise.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labelearthrepr-0.1.2.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labelearthrepr-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file labelearthrepr-0.1.2.tar.gz.

File metadata

  • Download URL: labelearthrepr-0.1.2.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for labelearthrepr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a0495ca8ba51864f12d0b4e7480395db4b01b30f1a752c3a05f5202cb52d8462
MD5 ec80ab57de7262299629b9a92a862726
BLAKE2b-256 813a49b9ef1a31382812194acb4b18d29bdc2a3d2cac32d7b08b0b63c482c865

See more details on using hashes here.

File details

Details for the file labelearthrepr-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: labelearthrepr-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for labelearthrepr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3c02eb394067893013f4a2434fb11d99dee8e1694886b1ce708d3e6c1f9deb82
MD5 6864a8619b209ee218321839779f6b75
BLAKE2b-256 4375efaa96905eddae490b34a5445c02c3ff894e7c78d06f5c04f9dd3ea0e25e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page