-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.R
32 lines (27 loc) · 1.13 KB
/
global.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
ptgal <- terra::vect("mapas/utm10+ilhas.gpkg")
atlas <- read.csv("dados/atlas_mamiferos_portugal_2019.csv")
# add external data:
datapaper <- read.csv("dados/Grilo2022_datapaper_utm10.csv")
redbook <- read.csv("dados/Mathias2023_redbook_utm10.csv")
# match columns among data sets:
names(atlas)
datapaper <- data.frame(datapaper[ , "utm10", drop = FALSE],
centr_x = NA_real_,
centr_y = NA_real_,
datapaper[ , "especie", drop = FALSE],
ordem = NA_character_,
recente = NA_integer_,
confirmado = NA_integer_)
redbook <- data.frame(redbook[ , "utm10", drop = FALSE],
centr_x = NA_real_,
centr_y = NA_real_,
redbook[ , "especie", drop = FALSE],
ordem = NA_character_,
recente = NA_integer_,
confirmado = NA_integer_)
# add 'source' column:
atlas$source <- "atlas"
datapaper$source <- "datapaper"
redbook$source <- "redbook"
# join data sets:
dados <- rbind(atlas, datapaper, redbook)