# NOT RUN {
lonlat <- data.frame(lon = c(-55.0281,-54.9857),
lat = c(-2.8094, -2.8756))
dates <- c("2017-12-15","2018-06-20")
# by default the function set a very small buffer around the points
# which can return NAs due to cloudiness in ESI data
dt <- get_esi(lonlat, dates = dates)
# the argument dist passed through sf increase the buffer area
dt <- get_esi(lonlat, dates = dates, dist = 0.1)
# }
Run the code above in your browser using DataLab