-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.R
59 lines (33 loc) · 1.18 KB
/
make.R
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
47
48
49
50
51
52
53
54
55
56
57
58
59
#' birdlife-wp: A Research Compendium
#'
#' @description
#' A paragraph providing a full description of the project and describing each
#' step of the workflow.
#'
#' @author Nicolas Casajus \email{[email protected]}
#'
#' @date 2025/01/20
## Install Dependencies (listed in DESCRIPTION) ----
devtools::install_deps(upgrade = "never")
## Load Project Addins (R Functions and Packages) ----
devtools::load_all(here::here())
## Do not use the 's2' spherical geometry package ----
sf::sf_use_s2(FALSE)
## Run Project ----
### Step 1: Create study area ----
# source(here::here("analyses", "create-western-palearctic-polygon.R"))
### Subset BirdLife polygons of required species ----
# select_birdlife_species_polygons()
### Create Cell x Species occurrence matrix ----
# Extant & Native
create_occurrence_matrix(presence = 1, origin = 1)
# Extant & Introduced
create_occurrence_matrix(presence = 1, origin = 3)
# Extinct & Native
create_occurrence_matrix(presence = 5, origin = 1)
## Explore ----
# x <- sf::st_read(here::here("outputs",
# "occ_matrix_presence_1_origin_1.gpkg"))
# library(ggplot2)
# ggplot(x) +
# geom_sf(aes(fill = upupa_epops))