https://github.com/harmonize-tools/land4health
Extract remote sensing metrics for spatial health analysis 🛰️, integrating vector-borne disease data. Easily compute areal and zonal statistics for infectious disease modelling in spatial epidemiology 🦠🏥
https://github.com/harmonize-tools/land4health
geography geohealth harmonize health-geography innovalab rgee rspatial spatial-epidemiology zonal-statistics
Last synced: 5 months ago
JSON representation
Extract remote sensing metrics for spatial health analysis 🛰️, integrating vector-borne disease data. Easily compute areal and zonal statistics for infectious disease modelling in spatial epidemiology 🦠🏥
- Host: GitHub
- URL: https://github.com/harmonize-tools/land4health
- Owner: harmonize-tools
- License: other
- Created: 2024-05-27T10:34:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-29T13:04:48.000Z (5 months ago)
- Last Synced: 2026-01-01T14:53:43.853Z (5 months ago)
- Topics: geography, geohealth, harmonize, health-geography, innovalab, rgee, rspatial, spatial-epidemiology, zonal-statistics
- Language: R
- Homepage: https://harmonize-tools.github.io/land4health/
- Size: 9.88 MB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# land4health: Remote Sensing Metrics for Spatial Health Analysis 
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://github.com/harmonize-tools/land4health/actions/workflows/R-CMD-check.yaml)
[](https://harmonize-tools.github.io/land4health/)
[](./LICENSE)
[](https://github.com/harmonize-tools/land4health/actions/workflows/test-coverage.yaml)
[](https://app.codecov.io/gh/harmonize-tools/land4health)
Calculate and extract remote sensing metrics for spatial health analysis 🛰️.
This package offers R users a quick and easy way to obtain areal or zonal statistics of key indicators and covariates, ideal for modeling infectious diseases 🦠 within the framework of spatial epidemiology 🏥.
## 1. Installation
You can install the development version with:
```r
# install.packages("pak")
pak::pak("harmonize-tools/land4health")
```
```{r message=FALSE,warning=FALSE}
library(land4health)
l4h_install()
```
```{r message=FALSE,warning=FALSE}
l4h_use_python()
rgee::ee_Initialize(quiet = TRUE)
```
```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
```
## 2. List of available metrics
```{r}
l4h_list_metrics()
```
## 3. Example: Calculate Forest Loss in a Custom Region
This example demonstrates how to calculate forest loss between 2005 and 2020 using a custom polygon and Earth Engine.
```{r example, message=FALSE, warning=FALSE}
library(geoidep)
# Downloading the adminstration limits of Loreto provinces
provinces_loreto <- get_provinces(show_progress = FALSE) |>
subset(nombdep == "LORETO")
# Run forest loss calculation
result <- provinces_loreto |>
l4h_forest_loss(from = '2005-01-01', to = '2020-01-01', sf = TRUE)
head(result)
```
```{r area,fig.dpi=300, fig.height= 5,fig.width= 12}
# Visualization with ggplot2
library(ggplot2)
ggplot(data = st_drop_geometry(result), aes(x = date, y = value)) +
geom_area(fill = "#FDE725FF", alpha = 0.8) +
facet_wrap(~nombprov) +
theme_minimal()
```
```{r mapa,fig.dpi=300, fig.height= 14,fig.width= 15}
# Spatial visualization
ggplot(data = result) +
geom_sf(aes(fill = value), color = NA) +
scale_fill_viridis_c(name = "Forest loss mean \n(km²)") +
theme_minimal(base_size = 15) +
facet_wrap(date ~ .)
```
## 4. Example: Extract time series of climate variables
```{r,message=FALSE, warning=FALSE}
etp_ts <- provinces_loreto |>
l4h_sebal_modis(
from = "2005-01-01",
to = "2022-12-31",
by = "month"
)
```
```{r ts,fig.dpi=300, fig.height= 5,fig.width= 12}
etp_ts |>
st_drop_geometry() |>
ggplot(aes(x = date, y = value, col = value)) +
geom_line() +
scale_color_viridis_c("ETP (mm)",option = "viridis") +
theme_minimal() +
facet_wrap(~nombprov, ncol = 4)
```