-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscores_exploration.qmd
3048 lines (2664 loc) · 110 KB
/
scores_exploration.qmd
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
title: "TrophCost Project: Exploration of Conservation Scores for Economic and Ecological Modelling"
date: 2023-06-28
author:
- name: Esteban Menares
orcid: 0000-0002-3731-3452
email: [email protected]
affiliation:
- name: Brandenburg University of Technology Cottbus-Senftenberg
department: Department of Ecology
address: Konrad-Wachsmann-Allee 6
postal-code: 03046
city: Cottbus
country: Germany
format:
html:
toc: true
toc-expand: true
number-sections: true
toc-depth: 3
embed-resources: true # render Quarto document into self contained HTML
execute:
echo: false
warning: false
editor_options:
chunk_output_type: console
bibliography: references.bib
---
Set up
```{r}
#| message: FALSE
#| echo: true
library(tidyverse)
library(ggpubr) # publication-ready formatting for ggplots
library(corrplot) # for making nice correlation visualizations/plots
library(kableExtra) # for extra table formatting
library(gghighlight) # for highlighting ggplots
# solve packages conflicts
conflicted::conflicts_prefer(dplyr::select)
conflicted::conflicts_prefer(dplyr::filter)
# set theme for all plots
theme_set(theme_pubr(10))
# my collection of functions
source('scripts/source_script.R')
# Read in data
# scores_sp: species list per region with their respective conservation scores
scores_sp <-
read_csv('data/raw/scores_sp.csv') %>%
rename_with(., tolower, everything())
# scores_site: conservation scores of species summed up per site
scores_site <-
read_csv('data/raw/scores_site.csv') %>%
rename_with(., tolower, everything())
# sites: table with all environmental and land use variables
sites <- read_csv('data/raw/sites.csv') %>%
rename_with(tolower, everything())
```
This document explores and describes the calculation of scores for the design of scenarios for the conservation of butterflies (Lepidoptera: Rhopalocera) and plants in permanent grasslands in 89 sites in two regions in Germany. Region ALB in Baden-Württemberg (south-west) and region SCH in Brandenburg (north-east).
To calculate all scores per community (per site), we used two different matrices. First, we gathered extensive data to build a "Scores per Species" matrix per region and taxa, which includes information for different scores for **each species** including:
1\) Red list status: yes or no. Each species is represented by a Boolean variable based on the different threat categories of the regional red lists each taxa [@breunig1999; @gelbrecht2001; @ristow2006; @ebert2008]. It considers any species between "Near Threatened" and "Threatened with Extinction" as 1, "Not Threatened" as 0, and "Data deficient" as NA.
2\) Threat category: Threatened with Extinction ('Vom Aussterben bedroht') Highly Threatened ('Stark gefährdet') Threatened ('Gefährdet') Threat of Unknown Extent ('Gefährdung unbekannten Ausmaßes') Extremely Rare ('Extrem selten') Near Threatened ('Vorwarnliste') Not Threatened ('Ungefährdet') Data Deficient ('Daten unzureichend').
3\) Regional distribution: percentage relative to the total regional area. The regional distribution range represents the occupancy per species of the total regional area in %. It is calculated as the percentage of topographic map grid cells (MTB - TK25) occupied by each species in each region reported in <https://schmetterlinge-brandenburg-berlin.de/> (butterflies SCH, observations from 2001 on), <https://www.schmetterlinge-bw.de/> (butterflies ALB, observations from 2001 on), and <https://www.floraweb.de/> (plants SCH and ALB). For plants, data were directly provided by FloraWeb. For butterflies, only for region SCH we were able to retrieve data directly from the website under internal agreement. Therefore, we developed a method to extract pixel data from images using ImageJ, an open-source image analysis software (@schneider2012, <https://imagej.net/ij/>) and convert them to occupancy values for ALB. The data of SCH was used to check our results and the accuracy of our method. For a full description of the process see @fig-process-reg-dist.
{#fig-process-reg-dist}
4\) Low regional distribution: yes or no, having regional distribution ≤ 33%.
5\) Number of trophic interactions. Trophic interactions between plants and Lepidoptera were extracted from the literature for each region individually from @ebert2005 for ALB and @richert2018 for SCH. We then filtered for species with occurrences in the respective region and then calculated the number of trophic interactions for each plant and butterfly separately. Trophic interactions were coded according to their intensity from 0 to 1. We considered any trophic interaction higher than zero.
6\) Number of unique trophic interactions. Boolean variable indicating if the species has a unique interaction or not (i.e. a plant interacting with one species of butterfly only, or a butterfly interacting with one species of plant only).
7\) Number of co-occurrences: only significant positive co-occurrences obtained using the pairwise approach and the Probabilistic method [@veech2013a; @veech2014a] with a cutoff of p_gt ≤ 0.2.
8\) Potential number of pollinated crops: Lepidoptera only, adjusted to the regional commercial crop pool. Information on which commercial crops are cultivated per region were extracted from <https://www.statistik-berlin-brandenburg.de/land-und-forstwirtschaft> for Berlin and Brandenburg, and <https://www.statistik-bw.de/Landwirtschaft/Bodennutzung/> for Baden-Württemberg. To find out which of these crops are pollinated by which butterfly species, we compare the regional crop lists with the truncated data for Lepidoptera used to generate the crop-flower visitor network Fig. 1 of @rader2020
9\) Crop pest: Lepidoptera only: yes or no. Data on which lepidoptera are considered pests of commercial crops were collected from different sources including [@edde2022; @ahdb2023; @eppo2023; @ukbms2023]. This score represents the negative effect of the Larva of butterflies present on each community, therefore it does not represent the direct effect of adult butterflies detected on the field. Given that butterflies can disperse large distances, this score should be taken with consideration.
# Scores per species
## Red list species and their threat-level
First we will summarize the number of red list species per region and taxa.
```{r}
#| label: tbl-sp-summary-red-list
#| tbl-cap: "Sum of red list species per region and taxa"
scores_sp %>%
summarise(
`total species` = n_distinct(species_id),
`total red list` = sum(red_list_bool > 0, na.rm = TRUE),
`proportion` = round(`total red list` / `total species`, digits = 2),
.by = c(region, taxa)) %>%
# Send to 'kable' for formatting as a table
kable(booktabs = TRUE) %>%
kable_styling(font_size = 12)
```
Then, we plot the all species per region and taxa to vizualise their threat-level.
**Lepidoptera - ALB**
```{r, fig.height=6}
#| label: fig-sp-threat-lepi-alb
#| fig-cap: "Red list threat-category per Lepidoptera species at region ALB"
scores_sp %>%
filter(region == "ALB" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(red_list)) %>%
ggplot(
aes(x = species_name,
y = red_list)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Red list threat-category"
) +
scale_y_continuous(limits = c(0, 1),
breaks = c(0, 0.17, 0.33, 0.50, 0.67, 0.83, 1))
```
**Plants - ALB**
```{r, fig.height=11}
#| label: fig-sp-threat-plant-alb
#| fig-cap: "Red list threat-category per plant species at region ALB"
scores_sp %>%
filter(region == "ALB" & taxa == "plant") %>%
drop_na(red_list) %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(red_list)) %>%
ggplot(
aes(x = species_name,
y = red_list)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 5),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Red list threat-category"
) +
scale_y_continuous(limits = c(0, 1),
breaks = c(0, 0.17, 0.33, 0.50, 0.67, 0.83, 1))
```
**Lepidoptera - SCH**
```{r}
#| label: fig-sp-threat-lepi-sch
#| fig-cap: "Red list threat-category per Lepidoptera species at region SCH"
scores_sp %>%
filter(region == "SCH" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(red_list)) %>%
ggplot(
aes(x = species_name,
y = red_list)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Red list threat-category"
) +
scale_y_continuous(limits = c(0, 1),
breaks = c(0, 0.17, 0.33, 0.50, 0.67, 0.83, 1))
```
**Plants - SCH**
```{r, fig.height=7}
#| label: fig-sp-threat-plant-sch
#| fig-cap: "Red list threat-category per plant species at region SCH"
scores_sp %>%
filter(region == "SCH" & taxa == "plant") %>%
drop_na(red_list) %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(red_list)) %>%
ggplot(
aes(x = species_name,
y = red_list)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Red list threat-category"
) +
scale_y_continuous(limits = c(0, 1),
breaks = c(0, 0.17, 0.33, 0.50, 0.67, 0.83, 1))
```
## Regional distribution range
**Lepidoptera - ALB**
```{r, fig.height=6}
#| label: fig-sp-reg-dist-lepi-alb
#| fig-cap: "Regional distribution per Lepidoptera species at region ALB"
scores_sp %>%
filter(region == "ALB" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(reg_dist, .na_rm = TRUE)) %>%
ggplot(
aes(x = species_name,
y = reg_dist)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Regional distribution range (% occupancy of total regional area)"
)
```
**Plants - ALB**
```{r, fig.height=11}
#| label: fig-sp-reg-dist-plant-alb
#| fig-cap: "Regional distribution per plant species at region ALB"
scores_sp %>%
filter(region == "ALB" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(reg_dist, .na_rm = TRUE)) %>%
ggplot(
aes(x = species_name,
y = reg_dist)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 6),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Regional distribution range (% occupancy of total regional area)"
)
```
**Lepidoptera - SCH**
```{r}
#| label: fig-sp-reg-dist-lepi-sch
#| fig-cap: "Regional distribution per Lepidoptera species at region SCH"
scores_sp %>%
filter(region == "SCH" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(reg_dist, .na_rm = TRUE)) %>%
ggplot(
aes(x = species_name,
y = reg_dist)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Regional distribution range (% occupancy of total regional area)"
)
```
**Plants - SCH**
```{r, fig.height=7}
#| label: fig-sp-reg-dist-plant-sch
#| fig-cap: "Regional distribution per plant species at region SCH"
scores_sp %>%
filter(region == "SCH" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(reg_dist, .na_rm = TRUE)) %>%
ggplot(
aes(x = species_name,
y = reg_dist)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 10),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
labs(
x = "Species name",
y = "Regional distribution range (% occupancy of total regional area)"
)
```
## Low regional distribution range
```{r}
#| label: tbl-sp-summary-low-reg-dist
#| tbl-cap: "Sum of species with regional distribution < 33% per region and taxa"
scores_sp %>%
summarise(
`total species` = n_distinct(species_id),
`total low reg dist` = sum(low_reg_dist > 0, na.rm = TRUE),
`proportion` = round(`total low reg dist`/`total species`, digits = 2),
.by = c(region, taxa)) %>%
# Send to 'kable' for formatting as a table
kable(booktabs = TRUE) %>%
kable_styling(font_size = 12)
```
## Trophic interactions
**Lepidoptera - ALB**
```{r, fig.height=7}
#| label: fig-sp-troph-int-lepi-alb
#| fig-cap: "Sum of trophic interactions per Lepidoptera species at region ALB. Solid dots represents trophic interactions filtered only for species occurring at each site. Open dots represents all potential interactions from literature at the region, filtered for any of the sampled species in the study, and excluding interactions with trees, bushes, non-flowering plants and lower-taxonomic categories (e.g. genus-level interactions)."
scores_sp %>%
filter(region == "ALB" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
color = "only occurrent species per site")) +
geom_point(aes(x = species_name,
y = n_troph_int_lit,
color = "potential interactions from literature"),
shape = 1) +
scale_color_manual(
name = "",
values = c("only occurrent species per site" = "black",
"potential interactions from literature" = "chocolate")) +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
labs(
x = "Species name",
y = "Sum of trophic interactions"
)
```
**Plants - ALB**
```{r, fig.height=11}
#| label: fig-sp-troph-int-plant-alb
#| fig-cap: "Sum of trophic interactions per plant species at region ALB. Solid dots represents trophic interactions filtered only for species occurring at each site. Open dots represents all potential interactions from literature at the region, filtered for any of the sampled species in the study, and excluding interactions with trees, bushes, non-flowering plants and lower-taxonomic categories (e.g. genus-level interactions)."
scores_sp %>%
filter(region == "ALB" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
color = "only occurrent species per site")) +
geom_point(aes(x = species_name,
y = n_troph_int_lit,
color = "potential interactions from literature"),
shape = 1) +
scale_color_manual(
name = "",
values = c("only occurrent species per site" = "black",
"potential interactions from literature" = "chocolate")) +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 6),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
labs(
x = "Species name",
y = "Sum of trophic interactions"
)
```
**Lepidoptera - SCH**
```{r}
#| label: fig-sp-troph-int-lepi-sch
#| fig-cap: "Sum of trophic interactions per Lepidoptera species at region SCH. Solid dots represents trophic interactions filtered only for species occurring at each site. Open dots represents all potential interactions from literature at the region, filtered for any of the sampled species in the study, and excluding interactions with trees, bushes, non-flowering plants and lower-taxonomic categories (e.g. genus-level interactions)."
scores_sp %>%
filter(region == "SCH" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
color = "only occurrent species per site")) +
geom_point(aes(x = species_name,
y = n_troph_int_lit,
color = "potential interactions from literature"),
shape = 1) +
scale_color_manual(
name = "",
values = c("only occurrent species per site" = "black",
"potential interactions from literature" = "chocolate")) +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
labs(
x = "Species name",
y = "Sum of trophic interactions"
)
```
**Plants - SCH**
```{r, fig.height=7}
#| label: fig-sp-troph-int-plant-sch
#| fig-cap: "Sum of trophic interactions per plant species at region SCH. Solid dots represents trophic interactions filtered only for species occurring at each site. Open dots represents all potential interactions from literature at the region, filtered for any of the sampled species in the study, and excluding interactions with trees, bushes, non-flowering plants and lower-taxonomic categories (e.g. genus-level interactions)."
scores_sp %>%
filter(region == "SCH" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
color = "only occurrent species per site")) +
geom_point(aes(x = species_name,
y = n_troph_int_lit,
color = "potential interactions from literature"),
shape = 1) +
scale_color_manual(
name = "",
values = c("only occurrent species per site" = "black",
"potential interactions from literature" = "chocolate")) +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 6),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
labs(
x = "Species name",
y = "Sum of trophic interactions"
)
```
## Species with unique interactions
```{r}
#| label: tbl-sp-summary-unique-troph-int
#| tbl-cap: "Sum of species with unique trophic interactions per region and taxa. Data of trophic interactions was filtered for species occurring at any site and does not represent the whole potential interactions described in the literature."
scores_sp %>%
summarise(
`total species` = n_distinct(species_id),
`total unique troph int` = sum(n_unique_int > 0, na.rm = TRUE),
`proportion` = round(`total unique troph int`/`total species`, digits = 2),
.by = c(region, taxa)) %>%
# Send to 'kable' for formatting as a table
kable(booktabs = TRUE) %>%
kable_styling(font_size = 12)
```
## Co-occurrences
**Lepidoptera - ALB**
```{r, fig.height=7}
#| label: fig-sp-cooccur-lepi-alb
#| fig-cap: "Sum of significant positive co-occurrences per Lepidoptera species at region ALB. Obtained using the pairwise approach and the Probabilistic method with a cutoff of p_gt ≤ 0.2."
scores_sp %>%
filter(region == "ALB" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_cooccur)) %>%
ggplot(
aes(x = species_name,
y = n_cooccur)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of co-occurrences"
)
```
**Plants - ALB**
```{r, fig.height=11}
#| label: fig-sp-cooccur-plants-alb
#| fig-cap: "Sum of significant positive co-occurrences per plant species at region ALB. Obtained using the pairwise approach and the Probabilistic method with a cutoff of p_gt ≤ 0.2."
scores_sp %>%
filter(region == "ALB" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_cooccur)) %>%
ggplot(
aes(x = species_name,
y = n_cooccur)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 5),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of co-occurrences"
)
```
**Lepidoptera - SCH**
```{r}
#| label: fig-sp-cooccur-lepi-sch
#| fig-cap: "Sum of significant positive co-occurrences per Lepidoptera species at region SCH Obtained using the pairwise approach and the Probabilistic method with a cutoff of p_gt ≤ 0.2."
scores_sp %>%
filter(region == "SCH" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_cooccur)) %>%
ggplot(
aes(x = species_name,
y = n_cooccur)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of co-occurrences"
)
```
**Plants - SCH**
```{r, fig.height=7}
#| label: fig-sp-cooccur-plants-sch
#| fig-cap: "Sum of significant positive co-occurrences per plant species at region SCH Obtained using the pairwise approach and the Probabilistic method with a cutoff of p_gt ≤ 0.2."
scores_sp %>%
filter(region == "SCH" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_cooccur)) %>%
ggplot(
aes(x = species_name,
y = n_cooccur)) +
geom_point() +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef')) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of co-occurrences"
)
```
## Trophic interactions vs. co-occurrences
**Lepidoptera - ALB**
```{r, fig.height=7}
#| label: fig-sp-cooccur-vs-troph-int-alb
#| fig-cap: "Trophic interactions vs co-occurences of per Lepidoptera species at region ALB"
scores_sp %>%
filter(region == "ALB" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
col = "trophic interactions")) +
geom_point(aes(x = species_name,
y = n_cooccur,
color = "co-occurrences"),
shape = 1) +
coord_flip() +
scale_color_manual(name = "",
values = c("trophic interactions" = "black",
"co-occurrences" = "chocolate")) +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of interactions and co-occurrences"
)
```
**Plants - ALB**
```{r, fig.height=11}
#| label: fig-sp-cooccur-vs-troph-int-plant-alb
#| fig-cap: "Trophic interactions vs co-occurences of per plant species at region ALB"
scores_sp %>%
filter(region == "ALB" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
col = "trophic interactions")) +
geom_point(aes(x = species_name,
y = n_cooccur,
color = "co-occurrences"),
shape = 1) +
coord_flip() +
scale_color_manual(name = "",
values = c("trophic interactions" = "black",
"co-occurrences" = "chocolate")) +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 5),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of interactions and co-occurrences"
)
```
**Lepidoptera - SCH**
```{r}
#| label: fig-sp-cooccur-vs-troph-int-sch
#| fig-cap: "Trophic interactions vs co-occurences of per Lepidoptera species at region SCH"
scores_sp %>%
filter(region == "SCH" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
col = "trophic interactions")) +
geom_point(aes(x = species_name,
y = n_cooccur,
color = "co-occurrences"),
shape = 1) +
coord_flip() +
scale_color_manual(name = "",
values = c("trophic interactions" = "black",
"co-occurrences" = "chocolate")) +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of interactions and co-occurrences"
)
```
**Plants - SCH**
```{r, fig.height=7}
#| label: fig-sp-cooccur-vs-troph-int-plant-sch
#| fig-cap: "Trophic interactions vs co-occurences of per plant species at region SCH"
scores_sp %>%
filter(region == "SCH" & taxa == "plant") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_troph_int)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_troph_int,
col = "trophic interactions")) +
geom_point(aes(x = species_name,
y = n_cooccur,
color = "co-occurrences"),
shape = 1) +
coord_flip() +
scale_color_manual(name = "",
values = c("trophic interactions" = "black",
"co-occurrences" = "chocolate")) +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of interactions and co-occurrences"
)
```
## Flowering crop pollination and crop pests
**Lepidoptera - ALB**
```{r, fig.height=7}
#| label: fig-sp-crop-pollinators-and-pests-alb
#| fig-cap: "Sum of flowering crops that a Lepidoptera species can potentially pollinate at region ALB. Species are marked in blue if their larvae are considered crop pests."
# TODO: decide on a better tittle for the x-axis
scores_sp %>%
filter(region == "ALB" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_crops)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_crops),
color = "chocolate") +
gghighlight(crop_pest == 1,
use_direct_label = FALSE,
unhighlighted_params = list(colour = NULL)) +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of potentially pollinated flowering crops from regional crop pool"
)
```
**Lepidoptera - SCH**
```{r}
#| label: fig-sp-crop-pollinators-and-pests-sch
#| fig-cap: "Sum of flowering crops that a Lepidoptera species can potentially pollinate at region SCH Species are marked in blue if their larvae are considered crop pests."
scores_sp %>%
filter(region == "SCH" & taxa == "lepidoptera") %>%
mutate(species_name =
factor(species_name) %>%
fct_reorder(n_crops)) %>%
ggplot() +
geom_point(aes(x = species_name,
y = n_crops),
color = "chocolate") +
gghighlight(crop_pest == 1,
use_direct_label = FALSE,
unhighlighted_params = list(colour = NULL)) +
coord_flip() +
theme(axis.title = element_text(size = 12),
axis.text = element_text(size = 8),
panel.grid.minor = element_line(linetype = "dashed"),
panel.grid.major = element_line(color = '#efefef'),
legend.position = "bottom",
legend.text = element_text(size = 10),
legend.title = element_text(size = 12)) +
scale_y_continuous(n.breaks = 6) +
labs(
x = "Species name",
y = "Sum of potentially pollinated flowering crops from regional crop pool"
)
```
# Scores per site
Using a "Species per Community" matrix, which includes information on the abundance of each species per community (i.e. per site) for all plots in each region. We used both matrices to calculate three categories of scores:
1) Presence/Absence (P/A): first abundance information was turned into Boolean variables to represent the presence/absence of each species, then multiplying the scores per species by 1 when the species is present in the community (i.e. site). This category represents scores which are not abundance-weighted and not scaled for multidiversity.
2) Community Weighted Means (CWM): is computed, for each site (community), by multiplying the scores per species values by the species relative abundance and summing the resulting values (De Bello et al. 2021). Abundances were log+1 transformed to reduce the importance of very common species before calculating CWM following De Bello et al. (2021). For numeric scores, the final value per community represents the average value of that score in the community. For binary/categorical scores, the final value represents the proportion of that score in the community. In these scores, species with higher number of individuals get higher weight, hence contributing more to the final value of the score per site.
3) Multidiversity (Multidiv): each score is scaled (or corrected) by the total number of species per taxa and region, hence reducing the influence of plants (group with higher number of species) on the final value of the scores per site and allowing for combination of score values from both taxa. When a score is calculated, taxa with generally higher species numbers (richness, in our case plants) will have more weight than a species poor taxon (in our case butterflies). Therefore, we need to standardize to be able to combine both taxa into one score. For each taxon, each score has a value from 0 to 1, hence the combined taxa score has a value from 0 to 2.
## Comparing P/A vs. CWM vs. Multidiv scores
Aim: to compare calculated scores between the three categories and explore if richness or abundance drives differences between the scores. Plot scores against species richness and abundances per taxa and region.
To be able to compare abundances of plant and Lepidoptera, we need to scale/normalize both variables between 0 and 1 within each taxa and region. We do this by scaling by the max. This scaling is equivalent to min-max normalization when there are 0 values in the variable. We choose explicitly not to min-max normalize, to be able to differentiate between abundance/richness of a single taxa (values 0 - 1) and of both taxa combined (sum of both i.e values 0 - 2). We adjust the scales of the features to have a standard scale of measure. Min-max scaling is also useful if we don't know the distribution of our data and it doesn't necesarilly follow a Gaussian distribution. The smooth line is only for visual aid and does not represent a formal regression analysis.
```{r}
#| echo: false
## ---- scale/normalize abundances and richness values to compare scores
scores_site <-
scores_site %>%
mutate(sAbund_lepi = abund_lepi/max(abund_lepi),
sAbund_plant = abund_plant/max(abund_plant),
sN_lepi = n_lepi / max(n_lepi),
sN_plant = n_plant / max(n_plant),
.by = region) %>%
mutate(sAbund_multidiv = sAbund_lepi + sAbund_plant) %>%
relocate(c(sAbund_lepi, sAbund_plant, sAbund_multidiv),
.after = abund_plant) %>%
rename(sN_multidiv = n_spp_multidiv) %>%
relocate(c(sN_lepi, sN_plant, sN_multidiv), .after = n_spp)
```
### Abundance vs. Richness
```{r}
#| label: fig-site-abund-vs-rich
#| fig-cap: "Species abundance (max scaled) vs. species richness (max scaled). Values of both are constrained between 0 - 1 for each taxa, therefore the maximum possible value of either richness or abundance for a site is euqal to 2."
## ---- abundance vs. richness - multidiv
scores_site %>%
ggplot() +
# abundance vs. richness - combined
geom_point(aes(x = sN_multidiv, y = sAbund_multidiv,
col = "combined"),
alpha = 0.5) +
geom_smooth(method = lm, se = FALSE,
aes(x = sN_multidiv, y = sAbund_multidiv,
col = "combined")) +
# abundance vs. richness - plant
geom_point(aes(x = sN_plant, y = sAbund_plant, col = "plant"),
alpha = 0.5) +
geom_smooth(method = lm, se = FALSE,
aes(x = sN_plant, y = sAbund_plant, col = "plant")) +
# abundance vs. richness - lepi
geom_point(aes(x = sN_lepi, y = sAbund_lepi, col = "lepi"),
alpha = 0.5) +
geom_smooth(method = lm, se = FALSE,
aes(x = sN_lepi, y = sAbund_lepi, col = "lepi")) +
scale_color_manual(name = "",
values = c("combined" = "chocolate",
"plant" = "seagreen",
"lepi" = "slateblue")) +
coord_cartesian(xlim = c(0,2), ylim = c(0,2)) +
facet_wrap(~region) +
theme(legend.position = "bottom") +
labs(x = "Species richness (max scaled)",
y = "Species abundance (max scaled)")
```
**Species richness butterflies:**
Total number (richness) of day active butterfly species per community (i.e. site). Data obtained from field observations between May and August 2008 in regions ALB and SCH including 3 surveys on all plots. Lepidoptera species (and their individual numbers) were counted within 2.5 m either side and 5 m in front of the scientists on transects of 300 m length within 30 min (BExIS dataset 12526_2; @börschig, @börschig2013). This is a traditional conservation goal to maximize butterfly species richness.
**Species richness plants:**
Total number (richness) of plant species in each community (i.e. site). Data obtained from field observations between May and June in 2008 in regions ALB and SCH. Plant species were sampled in an area of 4m x 4m and estimated the percentage (canopy) cover of each species relative to the whole 4 m x 4 m plot. (BExIS dataset 23586_2; @schäfer). We excluded those species identified only until family and genus level, unknown observations, tree, shrubs, and fern species. This is a traditional conservation goal to maximize plant species richness.
**Species richness combined (multidiv):**
Total number of species (richness) of both taxa combined and scaled for the maximum number of species per taxa per region. Each taxa ranges from 0 to 1 within the region, therefore the sum of both taxa within the region for each site ranges from 0 to 2.
### Sum of red list species
Total number of red list species present per site. It considers any species between "Near Threatened" and "Threatened with Extinction" as 1, "Not Threatened" as 0, and "Data deficient" as NA. Then, that value was multiplied by 1 if the species is present in the "Species per Community" matrix, or by zero if absent or adjusted for multidiversity (per region and taxa scaled). The final score in the "Scores per Community" matrix represents the sum. Another traditional conservation goal to promote rare species.
```{r}
#| include: FALSE
p7 <-
scores_site %>%
ggplot() +
geom_point(aes(x = sN_lepi,
y = norm_minmax(n_red_list_lepi_pa),
col = "n_red_list_lepi_pa")) +
geom_smooth(method = lm,
aes(x = sN_lepi,
y = norm_minmax(n_red_list_lepi_pa),
col = "n_red_list_lepi_pa"),
se = FALSE) +
geom_point(aes(x = sN_plant,
y = norm_minmax(n_red_list_plant_pa),
col = "n_red_list_plant_pa")) +
geom_smooth(method = lm,
aes(x = sN_plant,
y = norm_minmax(n_red_list_plant_pa),
col = "n_red_list_plant_pa"),
se = FALSE) +
geom_point(aes(x = sN_multidiv,
y = norm_minmax(n_red_list_pa),
col = "n_red_list_pa")) +
geom_smooth(method = lm,
aes(x = sN_multidiv,
y = norm_minmax(n_red_list_pa),
col = "n_red_list_pa"),
se = FALSE) +
geom_point(aes(x = sN_multidiv,
y = norm_minmax(n_red_list_multidiv),
col = "n_red_list_multidiv")) +
geom_smooth(method = lm,
aes(x = sN_multidiv,
y = norm_minmax(n_red_list_multidiv),
col = "n_red_list_multidiv"),
se = FALSE) +
geom_point(aes(x = sN_lepi,
y = norm_minmax(cwm_n_red_list_lepi),
col = "cwm_n_red_list_lepi")) +
geom_smooth(method = lm,
aes(x = sN_lepi,
y = norm_minmax(cwm_n_red_list_lepi),
col = "cwm_n_red_list_lepi"),
se = FALSE) +
geom_point(aes(x = sN_plant,
y = norm_minmax(cwm_n_red_list_plant),
col = "cwm_n_red_list_plant")) +
geom_smooth(method = lm,
aes(x = sN_plant,
y = norm_minmax(cwm_n_red_list_plant),
col = "cwm_n_red_list_plant"),
se = FALSE) +
coord_cartesian(xlim =c(0, 2), ylim = c(0, 1)) +
scale_color_manual(name = "",
values = c("n_red_list_lepi_pa" = "skyblue",