-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake.R
More file actions
46 lines (35 loc) · 1.03 KB
/
make.R
File metadata and controls
46 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#' gis-diversification: A Research Compendium for
#'
#' @description
#' extract diversification metrics on crop fields
#'
#' @author Romain Frelat
#' @date 12 May 2026
## Install Dependencies (listed in DESCRIPTION) ----
# rdeps::add_deps() # update automatically the list of dependencies
if (!("remotes" %in% installed.packages())) {
install.packages("remotes")
}
remotes::install_deps(upgrade = "never")
## Load Project Addins (R Functions)
devtools::load_all()
## Run Project ---------------------------------------
##
# 1 Get metrics from field data
# from the French RPG
source("analysis/F01_get_field_metrics_FR.R") # 3mins
# from the Swiss Nutzung
source("analysis/F01_get_field_metrics_CH.R") #1 min
##
# 2 Get metrics for land cover
source("analysis/F02_get_cover_metrics.R")
# 15 minutes when everything recomputed, else 3mins
##
# 3 Get hedgerow statistics
source("analysis/F03_get_hedgerows.R")
##
# 4 Merge all indicators
source("analysis/F04_merge.R")
##
# 5 Explore dataset
quarto::quarto_render("analysis/10_summary_FRCH.qmd")