When you are using and comparing pollen data from multiple sites, it is important to make sure pollen taxa are named consistently across sites. This process is called taxon harmonization. Throughout this tutorial we will be using Olea, the olive, as an example.
There are a few different reasons why taxon harmonization is important.
There are multiple good ways to harmonize. It all depends on what best suits the analysis you intend.
Luckily for us, The African Pollen Database curates a valuable table for assisting in taxa harmonization across African pollen. This guide will walk you through use of the APD taxa harmonization table with a simple example.
We’ll first load up some packages we’re going to be using, and then grab some pollen data to play with from Neotoma.
if (length(grep("pacman",as.data.frame(installed.packages())$Package)) ==0) {
install.packages("pacman")
library(pacman)
p_load(neotoma2,tidyverse,DT,geojsonsf,sf,leaflet,httr,stringr, ggplot2, tmap, rosm, osmdata,plotly)
} else {
library(pacman)
p_load(neotoma2,tidyverse,DT,geojsonsf,sf,leaflet,httr,stringr, ggplot2, tmap, rosm, osmdata,plotly)}We make a bounding box that encompasses all of Africa. Then we grab all Neotoma sites from that box, and filter for just those datasetids that concern pollen. Then we use the Neotoma2 package to download all of those pollen data.
lats = c(38, 38, -36, -36)
lons = c(-18, 52, 52, -18) # Reordered for a rectangle
# Create a data frame with coordinates
coordinates = data.frame(lat = lats, lon = lons)
# Convert to sf object and create a polygon
coordinates_sf = coordinates %>%
st_as_sf(coords = c("lon", "lat"), crs = 4326) %>%
summarise(geometry = st_combine(geometry)) %>%
st_cast("POLYGON")
# Plot to check
tm_shape(osm.raster(coordinates_sf)) +
tm_rgb() +
tm_shape(coordinates_sf) +
tm_polygons(alpha = 0.5)