knitr::opts_chunk$set( collapse = TRUE, comment = ">" )
This document describes how to use rOceans, an R package for exploring spatial trends in marine biodiversity and conservation. Here we have a examples of usage for explore spatial patterns of biodiversity in scleractinian corals of the genus Acropora.
(1) Download rOceansNew from GitHub and load the package
invisible(devtools::install_github("monteroserra/rOceansNew")) invisible(library(rOceansNew))
Allows merging, checking, filtering the raw data from OBIS and/or GBIF into a common standard database. It removes occurrences with inconsistent or inconmplete taxonomic information, land-based occurrences, and duplicate occurrences.
For this set of functions, we first need to access and download data from GBIF (www.gbif.org) and OBIS (www.iobis.org).
Here I show an example with data of species within the genus Acropora that were directly downloaded from the website on June 2018. The data can be accessed from my GitHub repository "monteroserra/rOceanData" or using data()
#Accesing raw datasets data(Acropora_GBIF) data(Acropora_OBIS) #Checking OBIS or GBIF individually Acropora_OBIS_checked = oceanDataCheck(OBIS_occurrences = Acropora_OBIS, source = "OBIS") Acropora_GBIF_checked = oceanDataCheck(GBIF_occurrences = Acropora_GBIF, source = "GBIF")
Merging OBIS and GBIF Datasets, and checking for taxonomic and geographic issues
Acropora_Total_Checked = oceanDataCheck(GBIF_occurrences = Acropora_GBIF, OBIS_occurrences = Acropora_OBIS, source = "GBIF_&_OBIS")
Allows creating global or delimited spatial grids with abundance of occurrences per cell at differenc cell sizes.
Following with the Acropora example, we will use this function to compute global rasters of abundance per grid cell for Acropora species at different resolutions (10 x 10?) (5 x 5?) (1? x 1?) and (0.5 x 0.0?) using cell_size
Acropora_abundance_10x10 = oceanAbundGrid(occurrences = Acropora_Total_Checked, cell_size=10) Acropora_abundance_5x5 = oceanAbundGrid(occurrences = Acropora_Total_Checked, cell_size=5) Acropora_abundance_1x1 = oceanAbundGrid(occurrences = Acropora_Total_Checked, cell_size=1) Acropora_abundance_0.5x0.5 = oceanAbundGrid(occurrences = Acropora_Total_Checked, cell_size=0.5)
A versatile data mapping tool for a rapid visualization of marine biodiversity patterns previously computed.
par(mfrow=c(2,2)) oceanMaps(Acropora_abundance_10x10, logScale=T, main="Acropora abundance (10x10)") oceanMaps(Acropora_abundance_5x5, logScale=T, main="Acropora abundance (5x5)") oceanMaps(Acropora_abundance_1x1, logScale=T, main="Acropora abundance (1x1)") oceanMaps(Acropora_abundance_0.5x0.5, logScale=T, main="Acropora abundance (0.5x0.5)") par(mfrow=c(1,1))
Allows computing several diversity metrics (shannon, richness, simpson) at global scale or for specifically delimited areas. It also provides a species abundance matrix per grid cell, to allow for further multivariate analyses.
Computing global rasters of diversity metrics: example of Acropora species
Acropora_div = oceanDiversity(occurrences = Acropora_Total_Checked) Acropora_species_matrix = Acropora_div[[1]] Acropora_richness = Acropora_div[[2]] Acropora_simpson = Acropora_div[[3]] Acropora_shannon = Acropora_div[[4]] par(mfrow=c(2,2)) oceanMaps(Acropora_richness, logScale=T,main="Acropora Species Richness") oceanMaps(Acropora_shannon, logScale=T,main="Acropora Shannon Diversity") oceanMaps(Acropora_simpson, logScale=T,main="Acropora Simpson Diversity") par(mfrow=c(1,1))
This function classifies sites into high, mid, and low diversity given any biodiversity metric (work in progress)
AcroporaHotspots = oceanHotspots(biodiversity_grid = Acropora_richness)
Allows accessing environmental layers at present conditions to explore and test potential drivers of marine biodiversity patterns
Following with the previous example on abundance and diversity of Acropora species
Acropora_abundance = oceanAbundGrid(occurrences = Acropora_Total_Checked, cell_size=5) # getting envioronmental parameters and linking them to biodiversity patterns abundance_environ_df = invisible(oceanEnv(biod_grid = Acropora_abundance, biodiv_metric = "abundance", plot=T, log_scale=T))
We can also explore environmental drivers of other metrics such as species richness using previously computed grids
abundance_environ_df = invisible(oceanEnv(biod_grid = Acropora_richness, biodiv_metric = "richness", plot=T, log_scale=T))
We can specify any alternative environmental parameters using env_parameters to see the full list of avilable parameters (326)
env_variables = sdmpredictors::list_layers() marine_layers = env_variables[env_variables$marine==T, ]
Allows accessing, analyzing and mapping future trends in temeperature and other environmental parameters according to different IPCC scenarios
In the following example, we will access and map expected increases in Sea Surface Temperature data for 2100 according to different IPCC scenarios
SST_2100_RCP8.5 = oceanFuture(IPCC_scenario = "RCP85") SST_2100_RCP4.5 = oceanFuture(IPCC_scenario = "RCP45") SST_2100_RCP2.5 = oceanFuture(IPCC_scenario = "RCP26")
You can check other available enviornmental parameters with avaialable future projections
env_variables_future = sdmpredictors::list_layers_future()
Other examples of potentially useful environmental drivers expected to change
#Maximum Surface Salinity Surface_Salinity_max_2100_RCP8.5 = oceanFuture(env_parameter = "BO2_salinitymax_ss", IPCC_scenario = "RCP45") #IPCC RCP4.5 Surface_Salinity_max_2100_RCP2.5 = oceanFuture(env_parameter = "BO2_salinitymax_ss", IPCC_scenario = "RCP85") #Ice thick Ice_thick_trends_2100_RCP8.5 = oceanFuture(env_parameter = "BO2_icethickmax_ss", IPCC_scenario = "RCP45")
Allows accessing future warming trends and linking them to global hotspots of high biodiversity
In this example, we analyze and plot hotspots of Acropora biodiversity and the expected warming trends according to three IPPC scenarios.
hotspots_vulnerb <- oceanVulnerab(biodiversity_grid = AcroporaHotspots, map_climtatic_impacts = F, plot_histograms = T)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.