-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseymour_og_summary.R
46 lines (38 loc) · 1.76 KB
/
seymour_og_summary.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
tar_load(c(seymour_og_priority, seymour_og_at_risk, seymour_og_all,
seymour_og_priority_protected, seymour_og_at_risk_protected, seymour_og_all_protected))
sey_og_priority <- seymour_og_priority %>%
mutate(og_area = st_area(.),
og_area = as.numeric(set_units(og_area, ha))) %>%
st_drop_geometry() %>%
summarise(og_priority_area = sum(og_area))
sey_og_at_risk <- seymour_og_at_risk %>%
mutate(og_area = st_area(.),
og_area = as.numeric(set_units(og_area, ha))) %>%
st_drop_geometry() %>%
summarise(og_at_risk = sum(og_area))
sey_og_all <- seymour_og_all %>%
mutate(og_area = st_area(.),
og_area = as.numeric(set_units(og_area, ha))) %>%
st_drop_geometry() %>%
summarise(og_all = sum(og_area))
sey_og_priority_prot <- seymour_og_priority_protected %>%
mutate(og_area = st_area(.),
og_area = as.numeric(set_units(og_area, ha))) %>%
st_drop_geometry() %>%
summarise(og_priority_area_prot = sum(og_area))
sey_og_at_risk_prot <- seymour_og_at_risk_protected %>%
mutate(og_area = st_area(.),
og_area = as.numeric(set_units(og_area, ha))) %>%
st_drop_geometry() %>%
summarise(og_at_risk_prot = sum(og_area))
sey_og_all_prot <- seymour_og_all_protected %>%
mutate(og_area = st_area(.),
og_area = as.numeric(set_units(og_area, ha))) %>%
st_drop_geometry() %>%
summarise(og_all_prot = sum(og_area))
sey_summary <- bind_cols(sey_og_priority, sey_og_at_risk, sey_og_all,
sey_og_priority_prot, sey_og_at_risk_prot, sey_og_all_prot) %>%
mutate(perc_priority_prot = sey_og_priority_prot/sey_og_priority*100,
perc_at_risk_prot = sey_og_at_risk_prot/sey_og_at_risk*100,
perc_all_prot = sey_og_all_prot/sey_og_all*100)
write_csv(sey_summary, "out/sey_summary.csv")