eerepr


Nameeerepr JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryCode Editor-style reprs for Earth Engine data in a Jupyter notebook.
upload_time2025-01-10 17:17:06
maintainerNone
docs_urlNone
authorAaron Zuspan
requires_python>=3.8
licenseMIT License Copyright (c) 2022 Aaron Zuspan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords earthengine gee html jupyter notebook reprs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # eerepr

[![Earth Engine Python](https://img.shields.io/badge/Earth%20Engine%20API-Python-green)](https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api)
[![PyPI version](https://badge.fury.io/py/eerepr.svg)](https://badge.fury.io/py/eerepr)
[![conda-forge link](https://img.shields.io/conda/vn/conda-forge/eerepr)](https://anaconda.org/conda-forge/eerepr)
[![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.org/github/aazuspan/eerepr/blob/main/docs/notebooks/demo.ipynb)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/aazuspan/eerepr/HEAD?labpath=docs%2Fnotebooks%2Fdemo.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/aazuspan/eerepr/blob/main/docs/notebooks/demo.ipynb)

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

![eerepr demo expanding the metadata for an image collection](assets/eerepr.gif)

## Setup

> [!TIP]
> `eerepr` is pre-installed in [Google Colab](https://colab.research.google.com/)!

Install from PyPI:

```bash
$ pip install eerepr
```

Install from Conda-Forge:

```bash
$ conda install -c conda-forge eerepr
```

## Usage

### Activating eerepr

```python
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`.

```python
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`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "eerepr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "earthengine, gee, html, jupyter, notebook, reprs",
    "author": "Aaron Zuspan",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/8d/d8/4c3dcc8a5ea855a3ad49ae1a52fdb00f0ae252daa48d3935c97871fe7619/eerepr-0.1.0.tar.gz",
    "platform": null,
    "description": "# eerepr\n\n[![Earth Engine Python](https://img.shields.io/badge/Earth%20Engine%20API-Python-green)](https://developers.google.com/earth-engine/tutorials/community/intro-to-python-api)\n[![PyPI version](https://badge.fury.io/py/eerepr.svg)](https://badge.fury.io/py/eerepr)\n[![conda-forge link](https://img.shields.io/conda/vn/conda-forge/eerepr)](https://anaconda.org/conda-forge/eerepr)\n[![nbviewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.org/github/aazuspan/eerepr/blob/main/docs/notebooks/demo.ipynb)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/aazuspan/eerepr/HEAD?labpath=docs%2Fnotebooks%2Fdemo.ipynb)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/aazuspan/eerepr/blob/main/docs/notebooks/demo.ipynb)\n\nAdd interactive Code Editor-style HTML reprs to Earth Engine objects in a Jupyter environment.\n\n![eerepr demo expanding the metadata for an image collection](assets/eerepr.gif)\n\n## Setup\n\n> [!TIP]\n> `eerepr` is pre-installed in [Google Colab](https://colab.research.google.com/)!\n\nInstall from PyPI:\n\n```bash\n$ pip install eerepr\n```\n\nInstall from Conda-Forge:\n\n```bash\n$ conda install -c conda-forge eerepr\n```\n\n## Usage\n\n### Activating eerepr\n\n```python\nimport eerepr\n\neerepr.initialize()\n```\n\nRunning `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!\n\n> [!TIP]\n> If you're using `geemap>=0.35.2`, `eerepr` is automatically imported and initialized.\n\n### Manually Rendering Objects\n\nJupyter only automatically displays the last object in a cell. To manually render an HTML repr anywhere in a code block, use `IPython.display.display`.\n\n```python\nfrom IPython.display import display\nimport ee\nimport eerepr\n\nee.Initialize()\neerepr.initialize()\n\ndisplay(ee.FeatureCollection(\"LARSE/GEDI/GEDI02_A_002_INDEX\").limit(3))\n```\n\n## Configuration\n\n`eerepr.initialize` takes a number of configuration options:\n\n- `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. \n- `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`.\n- `on_error`: When an object can't be retrieved from Earth Engine, either `warn` (default) or `raise`.\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2022 Aaron Zuspan\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Code Editor-style reprs for Earth Engine data in a Jupyter notebook.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/aazuspan/eerepr"
    },
    "split_keywords": [
        "earthengine",
        " gee",
        " html",
        " jupyter",
        " notebook",
        " reprs"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aea7b33d42359fcaeb9d34fd0f71d96a01b98b82c51a0a3be937ee6e48177980",
                "md5": "e545aedb33fee8f6f37f6c1a07ee3799",
                "sha256": "6877b2c64dc4af951fe976585d116d2468ac99da9be157276e5d7e507847218b"
            },
            "downloads": -1,
            "filename": "eerepr-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e545aedb33fee8f6f37f6c1a07ee3799",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10051,
            "upload_time": "2025-01-10T17:17:10",
            "upload_time_iso_8601": "2025-01-10T17:17:10.303375Z",
            "url": "https://files.pythonhosted.org/packages/ae/a7/b33d42359fcaeb9d34fd0f71d96a01b98b82c51a0a3be937ee6e48177980/eerepr-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8dd84c3dcc8a5ea855a3ad49ae1a52fdb00f0ae252daa48d3935c97871fe7619",
                "md5": "a9e9f273d38a45fbecfb4b7ea78f42a3",
                "sha256": "a3c6f4d94ee19374aea2ff7ae9f2471f06649be5e18f9cb1cced8a00c2c20857"
            },
            "downloads": -1,
            "filename": "eerepr-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a9e9f273d38a45fbecfb4b7ea78f42a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7929,
            "upload_time": "2025-01-10T17:17:06",
            "upload_time_iso_8601": "2025-01-10T17:17:06.734095Z",
            "url": "https://files.pythonhosted.org/packages/8d/d8/4c3dcc8a5ea855a3ad49ae1a52fdb00f0ae252daa48d3935c97871fe7619/eerepr-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-10 17:17:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "aazuspan",
    "github_project": "eerepr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "eerepr"
}
        
Elapsed time: 1.35594s