⌛ 25 minutes

<aside> 💡

In this practical, you will model where the rosewood Dalbergia oliveri occurs, treating its records as a spatial point process:

  1. Download occurrence records from GBIF and clean them
  2. Project them to metres and build a spatstat point pattern
  3. Fit and compare Poisson point process models, and map the predicted intensity </aside>

Rosewoods are the most seized wildlife product by value: about 35% of all wildlife seizures in 2005-2014, roughly double elephant ivory at 18% (UNODC World Wildlife Crime Report 2016). Southeast Asian rosewoods are the most exploited ones. In this practical, we will predict the species distribution of Dalbergia oliveri.

Your route through the 25 minutes


This is the fourth of five practicals in a 2-hour session. There are six stations, numbered 0 to 5. Use the times in the table to keep on track. Tasks marked + optional can be skipped if you are short of time.

Station Minutes What you do You leave with
0 Set up 0–5 Packages, download records from GBIF occ.df, a table of records
1 Clean the records 5–9 Turn them into points, map them, remove the wrong ones do.clean
2 Project to metres 9–12 Choose a UTM zone and reproject seasia_proj and do_proj
3 Point pattern 12–15 Build the owin window and the ppp object pp
4 Fit and compare 15–19 Homogeneous and log-linear Poisson models, AIC Two fitted models
5 Predict 19–25 Map the predicted intensity Your first species distribution map

Station 0 · Set up


⏱️ 0–5 min

library(ggplot2)
library(raster)         # only used for raster(lambda.im) at the end
library(rnaturalearth)
library(sf)
library(spatstat)
library(spocc)
library(terra)

GBIF (Global Biodiversity Information Facility) is a very important data source that contains > 3 billion occurrence records globally.

occ <- occ(query = "Dalbergia oliveri", from = "gbif", has_coords = TRUE, limit = 5000)  # default limit is only 500 records
occ.df <- occ2df(occ)

<aside> ✅

EXPECT TO SEE

A data frame with one row per record and columns including name, longitude, latitude and prov. The data are downloaded live, so the number of records may differ slightly from your neighbour's if GBIF has been updated.

</aside>

<aside> 🎉

MILESTONE!

You can pull occurrence data for any species straight from GBIF into R.

</aside>

Station 1 · Clean the records


⏱️ 5–9 min