Test ipywidgets


In [ ]:
import ipywidgets
ipywidgets.IntSlider()

Test ipyleaflet


In [ ]:
import ipyleaflet
ipyleaflet.Map(zoom=2)

Test Earth Engine (static maps)

Note that you will need to authenticate the Jupyter server to Earth Engine first, before running the ee.Initialize() method. To authenticate, run the command 'earthenging authenticate' in a terminal window and follow the instructions.


In [ ]:
import ee
from IPython.display import Image

In [ ]:
ee.Initialize()

In [ ]:
url = ee.Image("CGIAR/SRTM90_V4").getThumbUrl({'min':0, 'max':3000})
Image(url=url)

Test Earth Engine (interactive maps)


In [ ]:
import ipyleafletee

In [ ]:
map1 = ipyleafletee.Map(zoom=2)
map1

In [ ]:
landsat8 = (
    ee.ImageCollection('LANDSAT/LC08/C01/T1_RT_TOA')
      .filterDate('2017-06-01', '2017-06-9')
)
map_id = landsat8.median().visualize(
  min=0,
  max=0.3,
  bands= ['B4', 'B3', 'B2']
).getMapId()
tile_url = "https://earthengine.googleapis.com/map/{mapid}/{{z}}/{{x}}/{{y}}?token={token}".format(**map_id)

map2 = ipyleafletee.Map(zoom=2)
map2.add_layer(ipyleafletee.TileLayer(url=tile_url))
display(map2)

In [ ]: