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

eerepr-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.

eerepr-0.1.2-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eerepr-0.1.2.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eerepr-0.1.2.tar.gz
Algorithm Hash digest
SHA256 304dc23c365d6fa7cc3b07bc09cf77b565c19af86733e5deed804fdce16fb51f
MD5 6d904e5d7ff52da6c62337839051f83d
BLAKE2b-256 7ff67c9cb681e477fbbec94359672e2a994e6cd3216912158675e0d1cdb1e455

See more details on using hashes here.

Provenance

The following attestation bundles were made for eerepr-0.1.2.tar.gz:

Publisher: publish.yml on aazuspan/eerepr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: eerepr-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for eerepr-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f89731bde17de3d1e378b58a4cc9734f2c885014f56c2fe5eeab285d6eeb536c
MD5 793ce4e67c908f768a2585d9fd2628b5
BLAKE2b-256 fa09f92f3d87c967d80fb73fa45a7b8ce6048fcf6bc9ba04ef0fb04443e209d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for eerepr-0.1.2-py3-none-any.whl:

Publisher: publish.yml on aazuspan/eerepr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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