Action:

The following report documents pilot code for evaluating spectral indices (NDVI) for identifying change in Living England AOI. This includes deployment of google earth engine through python and rgee package for data acquisition and rendering of spectral mosaics, as well as development of acccuracy metrics using caret modelling package in R.

Assign Python(3.10.6) version in use

reticulate::use_python("/usr/bin/python3.10",
                       required = TRUE)
reticulate::py_config()

Initialize Earth Engine

# Necessary only once in each environment/IDE
ee_Initialize() 
## ── rgee 1.1.5 ─────────────────────────────────────── earthengine-api 0.1.357 ── 
##  ✔ user: not_defined
##  ✔ Initializing Google Earth Engine:
 ✔ Initializing Google Earth Engine:  DONE!
## 
 ✔ Earth Engine account: users/MurphyS 
## ────────────────────────────────────────────────────────────────────────────────
# To activate Google Cloud/Tidyverse API for data storage/sharing
# ee_Initialize(user = 'seamusrobertmurphy@gmail.com', drive = TRUE, gcs = TRUE) 

Run diagnostics on Earth Engine Installation

ee_check()
## ◉  Python version
## ✔ [Ok] /home/seamus/.virtualenvs/rgee/bin/python v3.9
## ◉  Python packages:
## ✔ [Ok] numpy
## ✔ [Ok] earthengine-api
ee_check_python()
## ◉  Python version
## ✔ [Ok] /home/seamus/.virtualenvs/rgee/bin/python v3.9
ee_check_credentials()
## ◉  Credentials neccesaries for rgee:
## ✔ [Ok] Earth Engine Credentials found.
ee_check_python_packages()
## ◉  Python packages:
## ✔ [Ok] numpy
## ✔ [Ok] earthengine-api

Derive DTM from Global SRTM data

srtm <- ee$Image("USGS/SRTMGL1_003")
# Set vizualization parameters
viz <- list(
  max = 4000,
  min = 0,
  palette = c("#000000","#5AAD5A","#A9AD84","#FFFFFF")
)
# Visualize
Map$addLayer(
  eeObject = srtm,
  visParams =  viz,
  name = 'SRTM'
)