knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of OBIShmpr is to link and query OBIS occurence data with a variety of marine habitat data.
sdmpredictors
:a set of GIS rasters providing geophysical, biotic and environmental data for surface and benthic marine realms. Accessed via sdmpredictors
sedmaps
[Synthetic map of the NW EuropeanShelf sedimentary environment](https://www.earth-syst-sci-data.net/10/109/2018/essd-10-109-2018.pdf) data product 10.15129/1e27b806-1eae-494d-83b5-a5f4792c46fc 0.125◦ by 0.125◦ resolution synthetic maps of continuous properties of the north-west European sedimentary environment. The maps are a blend of gridded survey data, statistically modelled values based on distributions of bed shear stress due to tidal currents and waves and bathymetric properties.
You can install the development version from GitHub with:
# install.packages("remotes") remotes::install_github("EMODnet/OBIShmpr")
library(OBIShmpr)
This is an example of how to run the above code for a single species - we use Scytothamnus fasciculatus, Aphia ID 325567, chosen as it has just 6 OBIS records so should run reasonably quickly.
Choose some layers to extract data from
sp_id <- 325567 layers <- c("BO2_nitratemax_bdmin", "BO_parmax", "BO2_tempmax_bdmax", "permeability", "tidal_vel_max", "april")
obis_match_habitat(sp_id, layers = layers)
layer_codes <- c("BO_ph", "BO_phosphate", "BO2_phosphatemean_bdmax", "BO_nitrate", "BO2_nitratemean_bdmax", "surface_nitrogen", "tn", "surface_carbon", "BO_sstmean", "BO_sstmin", "BO_sstmax", "MS_biogeo13_sst_mean_5m", "MS_biogeo14_sst_min_5m", "MS_biogeo15_sst_max_5m")
Next I use the AphiaID for Palinurus elephas.
species_id <- worrms::wm_name2id("Palinurus elephas") data <- OBIShmpr::obis_match_habitat( sp_id = species_id, layers = layer_codes, geometry = bbox_nwes) data
library(ggplot2) world <- rnaturalearth::ne_countries(scale = "medium", returnclass = "sf") ggplot() + geom_sf(data = world) + geom_sf(data = data, aes(color = BO_ph) ) + coord_sf(crs = 3035, xlim = c(2426378.0132, 7093974.6215), ylim = c(1308101.2618, 5446513.5222)) + theme_bw() + ggtitle("Palinurus elephas", subtitle = paste0('AphiaID = ', species_id))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.