Skip to content

Instantly share code, notes, and snippets.

@csaybar
Created June 17, 2020 23:21
Show Gist options
  • Save csaybar/dfcc9f16fdccc6b227d128724008f31b to your computer and use it in GitHub Desktop.
Save csaybar/dfcc9f16fdccc6b227d128724008f31b to your computer and use it in GitHub Desktop.
smap L3 download
library(rgee)
library(sf)
ee_Initialize()
# Define study area
ee_arequipa <- system.file("shp/arequipa.shp", package="rgee") %>%
st_read() %>%
st_bbox() %>%
st_as_sfc() %>%
sf_as_ee() %>%
ee$FeatureCollection$geometry()
# Define start and end ee$Dates.
startDate <- "2018-01-10"
endDate <- "2018-01-20"
#Define a base collection
smap <- ee$ImageCollection("NASA_USDA/HSL/SMAP_soil_moisture")$
map(function(x) x$select("ssm"))$
filterDate(startDate, endDate)
smap_arq <- ee_imagecollection_to_local(smap, ee_arequipa, dsn = "arq_")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment