Last active
May 12, 2021 16:40
-
-
Save jdbcode/cd911f53c14483ce37386de04c0cec56 to your computer and use it in GitHub Desktop.
[Medium] RStudio Cloud and rgee eemont NDWI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rgee) | |
library(RColorBrewer) | |
library(reticulate) | |
ee_Initialize() | |
eemont <- reticulate::import("eemont") | |
point <- ee$Geometry$Point(c(-76.9, 7.2)) | |
L8 <- (ee$ImageCollection('LANDSAT/LC08/C01/T1_SR') | |
$filterBounds(point) | |
$filterDate("2020-01-01", "2021-01-01")) | |
L8Median <- L8$maskClouds()$scale()$index("NDWI")$median() | |
visParamsNDWI <- list( | |
min = -1, | |
max = 1, | |
bands = "NDWI", | |
palette = brewer.pal(7, "YlGnBu") | |
) | |
Map$centerObject(point, 8) | |
Map$addLayer(L8Median, visParamsNDWI, "L8 NDWI") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment