--- title: "land4health-setup" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{1. Installation} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` This vignette shows how to install the required components and register a new user on the **Google Earth Engine platform**, in order to use its API within the `land4health` package to access and extract multiple variables relevant to **Spatial Epidemiology**. ## 1.1 What is Google Earth Engine? **Google Earth Engine** is a cloud-based platform that helps access high-performance computing resources for processing and analyzing large geospatial datasets (Noel Golerick et al.,2017). ## 1.2 Objectives: - Be accessible to various professionals without being experts in handling supercomputers. - Reduce pre-post processing time of satellite images on a local, regional or global scale. - Implement application development without being a backend/frontend expert. - Boost the development of big data for remote sensing. ## 1.3 Components: - **Data catalog**: Curated collection of several petabytes of geospatial datasets widely used in remote sensing available to the general public. - **High performance computing service**: Google’s computational infrastructure to optimize parallel processing and distribution of geospatial data. - **API and client libraries**: Application programming interface for making requests to Earth Engine servers. - API - Client libraries - Code Editor - REST API - Client libraries: - JavaScript - Python - R (no official) ## 1.4 Quickly review of Data catalog # 2. Installation and setup land4health ## 2.1 GMAIL register To access all the benefits offered by the Earth Engine platform, you must have an active Google (Gmail) account. To register, go to πŸ‘‰ . Earth Engine offers two registration options: - **Commercial user**: For commercial product development, service monetization, and related purposes. - **Non-commercial user**: For research, education, and academic activities. For our purposes, we will proceed by selecting the non-commercial user option. You can install the development version of `land4health` from GitHub with: ```{r eval=FALSE} # install.packages("pak") pak::pkg_install("harmonize-tools/land4health") ``` ```{r setup, eval=FALSE} library(land4health) ``` ```r ── Welcome to land4health ─────────────────────────────────────────────────────────────────────────────── A tool of Harmonize Project to calculate and extract Remote Sensing Metrics for Spatial Health Analysis. Currently,`land4health` supports metrics in the following categories: β€’ Accesibility β€’ Climate β€’ Enviroment β€’ and more! For a complete list of available metrics, use the `l4h_list_metrics()` function. ───────────────────────────────────────────────────────────────────────────────────────────────────────── Attaching core land4health packages: β†’ rgee v1.1.7 β†’ sf v1.0.21 ``` ```{r eval=FALSE} l4h_install() ``` ```r ── Installing land4health Python dependencies ─────────────── β„Ή Step 1/3: Checking Python environment β„Ή Step 2/3: Installing Python packages βœ” Python packages installed successfully β„Ή Step 3/3: Finalizing setup βœ” land4health setup completed. ``` ```{r initialize, eval=FALSE} l4h_use_python() rgee::ee_Initialize() ``` ```r #> ── rgee 1.1.7 ─────────────────────────────────────── earthengine-api 0.1.370 ── #> βœ” user: not_defined #> βœ” Initializing Google Earth Engine: βœ” Initializing Google Earth Engine: DONE! #> βœ” Earth Engine account: users/geografo2023 #> βœ” Python Path: C:/Users/mvcs_dgppvu_ambi/AppData/Local/R/cache/R/reticulate/uv/cache/archive-v0/At8gJm7EZeLgoj4R1d2hk/Scripts/python.exe #> ──────────────────────────────────────────────────────────────────────────────── ``` ```{r} land4health::l4h_packages() ```