F64f Checkpoint
Import libraries¶
In [ ]:
Copied!
import ee
import geemap
import ee
import geemap
Create an interactive map¶
In [ ]:
Copied!
Map = geemap.Map(center=[40, -100], zoom=4)
Map = geemap.Map(center=[40, -100], zoom=4)
Add Earth Engine Python script¶
In [ ]:
Copied!
# Add Earth Engine dataset
image = ee.Image("USGS/SRTMGL1_003")
#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Chapter:      F6.4 Combining R and Earth Engine
#  Checkpoint:   F64f
#  Authors:      Cesar Aybar, David Montero, Antony Barja, Fernando Herrera, Andrea Gonzales, and Wendy Espinoza
#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LandsatLST = require("users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js")
geometry = ee.Geometry.Rectangle([-8.91, 40.0, -8.3, 40.4])
satellite = "L8"
date_start = "2018-05-15"
date_end = "2018-05-31"
use_ndvi = True
LandsatColl = LandsatLST.collection(satellite, date_start, date_end, geometry, use_ndvi)
exImage = LandsatColl.first()
cmap = ["blue", "cyan", "green", "yellow", "red"]
Map.centerObject(geometry)
Map.addLayer(exImage.select("LST"), {"min": 290, "max": 320, "palette": cmap}, "LST")
#  -----------------------------------------------------------------------
#  CHECKPOINT
#  -----------------------------------------------------------------------
# Add Earth Engine dataset
image = ee.Image("USGS/SRTMGL1_003")
#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  Chapter:      F6.4 Combining R and Earth Engine
#  Checkpoint:   F64f
#  Authors:      Cesar Aybar, David Montero, Antony Barja, Fernando Herrera, Andrea Gonzales, and Wendy Espinoza
#  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LandsatLST = require("users/sofiaermida/landsat_smw_lst:modules/Landsat_LST.js")
geometry = ee.Geometry.Rectangle([-8.91, 40.0, -8.3, 40.4])
satellite = "L8"
date_start = "2018-05-15"
date_end = "2018-05-31"
use_ndvi = True
LandsatColl = LandsatLST.collection(satellite, date_start, date_end, geometry, use_ndvi)
exImage = LandsatColl.first()
cmap = ["blue", "cyan", "green", "yellow", "red"]
Map.centerObject(geometry)
Map.addLayer(exImage.select("LST"), {"min": 290, "max": 320, "palette": cmap}, "LST")
#  -----------------------------------------------------------------------
#  CHECKPOINT
#  -----------------------------------------------------------------------
Display the interactive map¶
In [ ]:
Copied!
Map
Map