forked from EduardoArle/big_data_biogeography
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwed_bioregionalization.Rmd
64 lines (49 loc) · 3.42 KB
/
wed_bioregionalization.Rmd
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
---
title: "Bioregionalization"
output: html_document
```{r global_options, include=FALSE}
knitr::opts_chunk$set(fig.width=12, fig.height=8, eval = FALSE,
echo=TRUE, warning=FALSE, message=FALSE,
tidy = TRUE, collapse = TRUE,
results = 'hold')
```
## Background
Bioregions are an important tool for biogeography, evolutionary biology and ecology. There are a set of tools for identifying bioregions, but especially in biogeography, regions are mostly either based on very broad taxonomy ("all plants") or, if taxon-specific on expert knowledge. Taxon-specific bioregions are of high interest, as barriers might be of different strength for different groups based on their dispersal capacity Infomap bioregions is a user-friendly tool delineate bioregions based on species distributions using networks and information theory. The concept behind the methods is described [here](https://www.nature.com/articles/ncomms7848) and the software tool itself is described [here](https://academic.oup.com/sysbio/article/66/2/197/2670349/Infomap-Bioregions-Interactive-Mapping-of).
## Objectives
After this exercise you will be able to:
1. Use Infomap Bioregions to delineate taxon-specific biogeographic regions based on distribution data using
a. Point occurrences in txt format
b. Species ranges in shape format
2. We will use the area classification from Infomaps for the ancestral range estimation tomorrow, so please make sure you have the range classification file.
## Exercise
In this exercise you will use Infomap bioregions, available at http://bioregions.mapequation.org/. Here we are going to use the cleaned point occurrence data from your group from exercise 2) and the calculated ranges from exercise 4) (if you have it). There is a tutorial for the use of the software and explaining its functionality available on this webpage. **For the ancestral area reconstruction exercise tomorrow, you want to have around 5-8 areas.**
1. Locate the clean point occurrence .txt file and the .shp range file on your computer and navigate your browser to http://bioregions.mapequation.org/.
2. Use Infomap bioregions to create bioregions for the cleaned point occurrences following the tutorial on the website
3. Download the GeoJson file from Infomap bioregions and convert it into a shape file.
4. Generate bioregions using the convex hull-based distribution ranges from yesterdays exercise (optional)
## Possible questions for your project
* How many bioregions are there for your group?
* Do the reconstructed bioregions correspond to classification from the literature, e.g. the Olson 2001 biomes?
* How does the size of the bioregions vary through space, and where are regions of small bioregions? What does that mean?
* Does the bioregionalization differ between different subsets of your group, e.g. different subfamilies, or large genera?
# Library setup
```{r}
library(rgdal)
library(geojsonio)
library(sf)
library(tidyverse)
```
# Tutorial
## Convert a GeoJson file into a shape file
```{r}
inp <- geojsonio::geojson_read("example_data/bombacoids_ranges_ingroup_0712_bioregions.geojson",
what = "sp")
dat <- st_as_sf(inp)
# plot the rbioregions
ggplot() +
geom_sf(data = dat, aes(fill = as.factor(bioregion)))
st_write(obj = dat, dsn = "example_data", layer = "bombacoideae_infomap_shapefile",
driver = "ESRI Shapefile",
delete_layer=TRUE,
delete_dsn=TRUE)
```