earthengine-jupyter
NOTICE: This is an experimental project and is not an officially supported Google project. You are welcome to use it, but we do not guarantee stability.
Setup
try:
import ee_jupyter
print('ee_jupyter was already installed.')
except ModuleNotFoundError:
print('ee_jupyter was not found. Installing now...')
import os
result = os.system('pip -q install earthengine-jupyter')
Make sure that the earthengine-jupyter package is installed...
How to use
This lib contains a
Map
class that can be used to display an interactive map.
import ee
from ee_jupyter.core import authenticate_if_needed
from ee_jupyter.ipyleaflet import Map
authenticate_if_needed()
✓ Authentication credentials were found.
# Intialize the Earth Engine client library.
ee.Initialize()
map1 = Map(center=(37.5924, -122.09), zoom=8)
map1
Map(center=[37.5924, -122.09], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title', 'zo…
Define an Earth Engine image layer, and add it to the interactive map.
img1 = ee.Image("LANDSAT/LC09/C02/T1_L2/LC09_044034_20220127")
visualization = {
'bands': ['SR_B4', 'SR_B3', 'SR_B2'],
'min': 0.2 / 0.0000275,
'max': 0.4 / 0.0000275,
}
map1.addLayer(eeObject=img1, visParams=visualization, name='Landsat scene')
We can also create an inspector object and associate it with the previously created map.
from ee_jupyter.ipyleaflet import Inspector
inspector1 = Inspector(map_object=map1)
inspector1
Inspector(layout=Layout(border_bottom='solid', border_left='solid', border_right='solid', border_top='solid', …
Typically when you create a inspector object, you will want to display it near the map.
from ipywidgets import HBox
display(HBox([map1, inspector1]))
HBox(children=(Map(center=[37.5924, -122.09], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom…
Tip With Caption
Note that when viewed on GitHub Pages you can manipulate Jupyter widgets independently, but the widgets do not interact with each other. To experience the cross-widget interactivity, open up this notebook in a Jupyter environment.
Displaying a Map Image
If you want to display a static (non-interactive) image, you can do that
as well. The embed=True parameter will allow the image to be saved
within the notebook.
from IPython.display import Image
visualization['dimensions'] = 400 # maximum dimension for the image
url = img1.getThumbUrl(visualization)
Image(url=url, format='png', embed=True)
Metadata
Release files for earthengine-jupyter 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| earthengine-jupyter-0.0.7.tar.gz | 12.9 kB | Without provenance | Details for earthengine-jupyter-0.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| earthengine_jupyter-0.0.7-py3-none-any.whl | Python 3 | none | any | Details for earthengine_jupyter-0.0.7-py3-none-any.whl |
Total release size: 26.4 kB
Release files / earthengine-jupyter-0.0.7.tar.gz
| Download URL | earthengine-jupyter-0.0.7.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0de4b7ef9574b56ef8229aa19ab062e5267a44c49bcfcf51145f81e991bfb21
|
|
BLAKE2b-256 checksum How to use checksums |
b173ed09241b420fb0e274d31e07a17474772dcab5051187eedaca330e788732
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.6
|
Release files / earthengine_jupyter-0.0.7-py3-none-any.whl
| Download URL | earthengine_jupyter-0.0.7-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a942441016d3c9703c3d6a52b590ccee4f182bc3cfed015ec2c0161d62739883
|
|
BLAKE2b-256 checksum How to use checksums |
9dbbf75269b57393974f189115319f9a9bfde0f3efdf455305a836fde14e53c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.6
|
Security for earthengine-jupyter 0.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.