library(rangeModelMetadata)
library(rgbif)
library(raster)
library(dismo)
library(ENMeval)
library(dplyr)
library(sp)
library(spThin)
library(jsonlite)
# search GBIF for occurrence data
bv <- rgbif::occ_search(scientificName ='Bradypus variegatus')
# restrict table to coordinates
occs <- dplyr::select(bv$data, decimalLongitude, decimalLatitude)
# remove duplicate values
occs <- occs[!duplicated(occs),]
# remove NAs
occs <- occs[complete.cases(occs),]
# make a stack of Worldclim v1.4 bioclim rasters
# Note 1: we are using the Worldclim version that comes with the current
# dismo distribution, which is the older v1.4 -- if you want to use v2.0 or
# a different dataset entirely, download it and place the file path here,
# instead of list.files(...)
# Note 2: as categorical variable "biome" has cells with NA where other bioclim
# variables have values, you may see some warnings when the predict functions
# are run
files <- list.files(path=paste(system.file(package='dismo'), '/ex',
sep=''), pattern='grd', full.names=TRUE)
envs <- raster::stack(files)
# thin points to remove spatial autocorrelation
occs.thinned <- spThin::thin.algorithm(data.frame(occs), thin.par=20, reps=1)
# make a spatial points object for the occurrences
occs.sp <- sp::SpatialPoints(occs.thinned[[1]])
# get the bounding box
bb <- sp::bbox(occs.sp)
# make extent object and buffer by 5 degrees
bb.buf <- raster::extent(bb[1]-5, bb[3]+5, bb[2]-5, bb[4]+5)
# crop environmental rasters by the extent to make the background extent
bg.ext <- raster::crop(envs, bb.buf)
# generate up to 10,000 random points within the background extent (we'll sample from the "biome" raster as it has more holes)
bg <- dismo::randomPoints(bg.ext[[9]], n=10000)
## Warning in dismo::randomPoints(bg.ext[[9]], n = 10000): generated random points
## = 0.5604 times requested number
# run ENMeval
e <- ENMeval::ENMevaluate(occs, bg.ext, bg, method='block', RMvalues=1:3, fc=c('L','LQ'), algorithm='maxnet')
## *** Running ENMevaluate using maxnet v.0.1.2 ***
## Doing evaluations using spatial blocks...
##
|
| | 0%
|
|============ | 17%
##
## 2 grid cells found with at least one NA value: these cells were excluded from raster predictions.
##
|
|======================= | 33%
##
## 2 grid cells found with at least one NA value: these cells were excluded from raster predictions.
##
|
|=================================== | 50%
##
## 2 grid cells found with at least one NA value: these cells were excluded from raster predictions.
##
|
|=============================================== | 67%
##
## 2 grid cells found with at least one NA value: these cells were excluded from raster predictions.
##
|
|========================================================== | 83%
##
## 2 grid cells found with at least one NA value: these cells were excluded from raster predictions.
##
|
|======================================================================| 100%
##
## 2 grid cells found with at least one NA value: these cells were excluded from raster predictions.
## ENMeval completed in 0 minutes 16.3 seconds.
# find the index number of the model with the highest mean test AUC: this will be the optimal model
i <- which(e@results$avg.test.AUC == max(e@results$avg.test.AUC ))
# extract the optimal model object
m <- e@models[[i]]
Note that the selected model uses linear and quadratic features with a regularization multiplier of 1.
## settings features rm train.AUC avg.test.AUC var.test.AUC avg.diff.AUC
## 5 L_3 L 3 0.8675127 0.8142638 0.04635953 0.1004334
## var.diff.AUC avg.test.orMTP var.test.orMTP avg.test.or10pct var.test.or10pct
## 5 0.03026228 0.05802342 0.005202404 0.2426309 0.07737649
## AICc delta.AICc w.AIC parameters
## 5 7245.702 137.8355 1.173295e-30 6
# the prediction rasters produced by ENMeval are "raw" values,
# which correspond to the relative occurrence rate (ROR) per cell --
# see Merow et al. 2013 (Ecography)
p <- e@predictions[[i]]
plot(p)
# specify extent further south for model transfer (this region
# should have different climatic conditions than the region
# used to train the model). This could be useful if no observations
# are available in this region, but you're interested in determining
# if there are any potentially suitable areas there.
pt.bb <- raster::extent(-80,-40,-60,-30)
# crop environmental predictors by transfer extent
pt.ext <- raster::crop(envs, pt.bb)
pt <- ENMeval::maxnet.predictRaster(m, pt.ext, type = "exponential", clamp = TRUE)
##
## 1 grid cells found with at least one NA value: these cells were excluded from raster predictions.
rmm
objectBegin by choosing a few families of fields relevant for this analysis and making a template. This will generate all the recommended fields, although the only fields that you must fill in are in base
.
# generate an empty range model metadata template
rmm <- rmmTemplate(family=c('base','dataPrep','maxent','prediction',
'transferEnv1','binaryClassification'))
Note that to see a little bit less detail, it’s useful to use
## List of 8
## $ authorship :List of 8
## $ studyObjective:List of 4
## $ data :List of 5
## $ dataPrep :List of 4
## $ model :List of 9
## $ prediction :List of 6
## $ assessment :List of 5
## $ code :List of 8
## - attr(*, "class")= chr [1:2] "list" "RMM"
## List of 8
## $ authorship :List of 8
## ..$ rmmName : NULL
## ..$ names : NULL
## ..$ license : NULL
## ..$ contact : NULL
## ..$ relatedReferences: NULL
## ..$ authorNotes : NULL
## ..$ miscNotes : NULL
## ..$ doi : NULL
## $ studyObjective:List of 4
## ..$ purpose : NULL
## ..$ rangeType: NULL
## ..$ invasion : NULL
## ..$ transfer : NULL
## $ data :List of 5
## ..$ occurrence :List of 6
## ..$ environment:List of 9
## ..$ observation:List of 3
## ..$ dataNotes : NULL
## ..$ transfer :List of 1
## $ dataPrep :List of 4
## ..$ dataPrepNotes: NULL
## ..$ geographic :List of 6
## ..$ biological :List of 5
## ..$ environmental:List of 3
## $ model :List of 9
## ..$ algorithms : NULL
## ..$ algorithmCitation : NULL
## ..$ speciesCount : NULL
## ..$ selectionRules : NULL
## ..$ finalModelSettings: NULL
## ..$ notes : NULL
## ..$ partition :List of 3
## ..$ references : NULL
## ..$ algorithm :List of 1
## $ prediction :List of 6
## ..$ binary :List of 2
## ..$ extrapolation: NULL
## ..$ transfer :List of 2
## ..$ uncertainty :List of 4
## ..$ continuous :List of 3
## ..$ notes : NULL
## $ assessment :List of 5
## ..$ references : NULL
## ..$ notes : NULL
## ..$ trainingDataStats :List of 12
## ..$ testingDataStats :List of 12
## ..$ evaluationDataStats:List of 9
## $ code :List of 8
## ..$ software :List of 2
## ..$ demoCodeLink : NULL
## ..$ vignetteCodeLink: NULL
## ..$ fullCodeLink : NULL
## ..$ demoDataLink : NULL
## ..$ vignetteDataLink: NULL
## ..$ fullDataLink : NULL
## ..$ codeNotes : NULL
## - attr(*, "class")= chr [1:2] "list" "RMM"
rmm$studyObjective$purpose='transfer'
rmm$studyObjective$rangeType='potential'
rmm$studyObjective$transfer='detect unoccupied suitable habitat'
Note that the first two entities used standardized terms ('projection'
) but the last one didn’t. That’s ok; the rules are meant to be flexible!
To make it easier to fill some rmm
fields, we provide autofill functions that extract relevant information from common R objects used in the
# occurrence data
rmm <- rmmAutofillspocc(rmm, bv$gbif)
# autofill info for environmental rasters used for model training and transfer
rmm <- rmmAutofillEnvironment(rmm, bg.ext, transfer=0)
rmm <- rmmAutofillEnvironment(rmm, pt.ext, transfer=1)
# autofill for ENMeval
rmm <- rmmAutofillENMeval(rmm, e,
selectionCriteria="highest mean test AUC",
optimalModelIndex=i)
# R packages used
rmm <- rmmAutofillPackageCitation(rmm=rmm,
packages=
c('rgbif','sp','raster','dismo','ENMeval'))
Now we need to fill in some fields manually.
rmm$data$occurrence$sources <- lapply(rgbif::gbif_citation(bv),function(x) x$citation$citation)
rmm$data$occurrence$yearMin <- 1970
rmm$data$occurrence$yearMax <- 2000
Note that in the use of gbif_citation
above, we use a journal formatted style for references, instead of bibtex, as used below. We chose this because the journal formatting is returned by gbif_citation
and bibtex it not available. Rather than request that authors spend an inordinate amount of time manually reformatting perfectly good citations (which is error prone) we suggest simply using this default format.
rmm$data$environment$yearMin <- 1960
rmm$data$environment$yearMin <- 1990
rmm$data$environment$sources <- '@article{hijmans2005,
title={Very high resolution interpolated climate surfaces for global land areas},
author={Hijmans, Robert J and Cameron, Susan E and Parra, Juan L and Jones, Peter G and Jarvis, Andy},
journal={International Journal of Climatology: A Journal of the Royal Meteorological Society},
volume={25},
number={15},
pages={1965--1978},
year={2005},
publisher={Wiley Online Library}
}'
rmm$data$dataNotes <- 'WorldClim v1.4 data accessed through dismo v1.1-4'
To fill in the min and max values of each data layer, it’s easiest to create a data.frame
and convert that to JSON.
mm <- data.frame(rbind(apply(values(envs),2,min,na.rm=T),
apply(values(envs),2,max,na.rm=T)))
rmm$data$environment$minVal <- toJSON(mm[1,])
(rmm$data$environment$maxVal <- toJSON(mm[2,])) # printed to show format
## [{"bio1":289,"bio12":7682,"bio16":2458,"bio17":1496,"bio5":422,"bio6":242,"bio7":461,"bio8":323,"biome":14}]
To fill in the extent of the layers, you can either do it manually or programatically. I do it programatically because I think it’s easier to make it JSON format.
## class : Extent
## xmin : -125
## xmax : -32
## ymin : -56
## ymax : 40
# make an extent object a data.frame, because that's easy to use with toJSON
tmp <- as.data.frame(lapply(slotNames(ex), function(i) slot(ex, i) ))
names(tmp) <- slotNames(ex)
rmm$data$environment$extentSet <- toJSON(tmp)
Have I missed anything?
## $type
## [1] "field2"
##
## $suggestions
## [1] "data$occurrence" "data$environment" "data$observation" "data$transfer"
## [5] "data$dataNotes"
Oh yeah, we haven’t dealt with the environment to which the model is transferred. In the modeling above we transferred to an adjacent region. So this follows analogous information provided for the fitting layers.
rmm$data$transfer$environment1$yearMin <- 1970
rmm$data$transfer$environment1$yearMin <- 2000
rmm$data$transfer$environment1$resolution=paste0(res(pt.ext)[1],' degrees')
rmm$data$transfer$environment1$sources <- '@article{hijmans2005,
title={Very high resolution interpolated climate surfaces for global land areas},
author={Hijmans, Robert J and Cameron, Susan E and Parra, Juan L and Jones, Peter G and Jarvis, Andy},
journal={International Journal of Climatology: A Journal of the Royal Meteorological Society},
volume={25},
number={15},
pages={1965--1978},
year={2005},
publisher={Wiley Online Library}
}'
mm.pt <- data.frame(rbind(apply(values(pt.ext),2,min,na.rm=T),
apply(values(pt.ext),2,max,na.rm=T)))
rmm$data$transfer$environment1$minVal <- toJSON(mm.pt[1,])
(rmm$data$transfer$environment1$maxVal <- toJSON(mm.pt[2,])) # printed to show format
## [{"bio1":208,"bio12":6045,"bio16":1753,"bio17":1284,"bio5":345,"bio6":101,"bio7":336,"bio8":270,"biome":12}]
## class : Extent
## xmin : -80
## xmax : -40
## ymin : -56
## ymax : -30
# duplicated observations removed within the grid cells defined by the environmental layers
rmm$dataPrep$biological$duplicateRemoval$rule <- 'one observation per cell'
rmm$dataPrep$geographic$spatialThin$rule <- "20 km used as minimum distance between points"
Note that we took the value of rmm$modelFit$partition$partitionRule
straight from the helpfile of ENMeval::get.block
; this can be useful for standardizing text. Also note that we demonstrate how to add a field which is not included in the standards metadata dictionary ’rmm\(modelFit\)maxent$numberParameters` to describe the number of parameters retained in the selected model.
# fill in remaining fields for model prediction in background extent
rmm$prediction$continuous$units <- "relative occurrence rate"
rmm$prediction$continuous$minVal <- cellStats(p, min)
rmm$prediction$continuous$maxVal <- cellStats(p, max)
# we chose to clamp our model predictions
rmm$prediction$extrapolation <- "clamping"
Analogous fields for transfer
rmm$code$software <- '@Manual{
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2017},
url = {https://www.R-project.org/},}'
rmm$code$vignetteCodeLink <- 'https://github.com/cmerow/rangeModelMetadata/blob/master/vignettes/rmm_workflowWithExampleRangeModel.Rmd'
rmm
objectLet’s see how we’re doing so far by printing all the filled fields.
## $authorship
## $authorship$rmmName
## [1] "MerowMaitnerOwensKassEnquistJetzGuralnick_2018_BradypusVariegatus_Maxent_b3"
##
## $authorship$names
## [1] "Merow, Cory and Maitner, Brian and Owens, Hannah and Kass, Jamie and Enquist, Brian and Jetz, Walter and Guralnick, Rob"
##
## $authorship$license
## [1] "CC"
##
## $authorship$contact
## [1] "cory.merow@gmail.com"
##
## $authorship$relatedReferences
## [1] "@article{, \n title={RMMS: Species’ Range Model Metadata Standards },\n author={Merow, Cory and Maitner, Brian S. and Owens, Hannah L. and Kass, \n Jamie M. and Enquist, Brian and Jetz, Walter and Guralnick, Robert},\n journal={Global Ecology and Biogeography},\n year={2019}}"
##
## $authorship$miscNotes
## [1] "Funding from NSF grant DBI-1661510 and DBI-1913673."
##
##
## $studyObjective
## $studyObjective$purpose
## [1] "transfer"
##
## $studyObjective$rangeType
## [1] "potential"
##
## $studyObjective$transfer
## [1] "detect unoccupied suitable habitat"
##
##
## $data
## $data$occurrence
## $data$occurrence$dataType
## [1] "presence only"
##
## $data$occurrence$yearMin
## [1] 1970
##
## $data$occurrence$yearMax
## [1] 2000
##
## $data$occurrence$sources
## $data$occurrence$sources[[1]]
## [1] "iNaturalist.org (2020). iNaturalist Research-grade Observations. Occurrence dataset https://doi.org/10.15468/ab3s5x accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[2]]
## [1] "naturgucker.de. naturgucker. Occurrence dataset https://doi.org/10.15468/uc1apo accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[3]]
## [1] "Villegas M, Moreno J (2019). Primer monitoreo y seguimiento de fauna terrestre para el AID y AII de la Pequeña Central Hidráulica Riofrío. 2018. Corporación Paisajes Rurales. Occurrence dataset https://doi.org/10.15472/lh28wc accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[4]]
## [1] "Olaciregui C (2017). Evaluación de la presencia de 'Marmosa robinsoni' e inventario de mamíferos en el Departamento del Atlántico. Fundación Botánica y Zoológica de Barranquilla. Occurrence dataset https://doi.org/10.15472/54fglv accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[5]]
## [1] "Villegas M, Bolaños A (2017). Monitoreo y seguimiento de fauna terrestre para el AID y AII de la Central Hidroeléctrica de Calima - 2017. Corporación Paisajes Rurales. Occurrence dataset https://doi.org/10.15472/l3cboh accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[6]]
## [1] "Villegas M, Zambrano F H, Guerra Gonzalez G J, Gonzalez G J (2019). Establecimiento de línea base de fauna terrestre para el AID y AII de la Pequeña Central Hidroeléctrica Riofrío. 2017.. Version 1.1. Corporación Paisajes Rurales. Occurrence dataset https://doi.org/10.15472/7s9kiw accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
##
## $data$occurrence$presenceSampleSize
## [1] 483
##
## $data$occurrence$backgroundSampleSize
## [1] 5604
##
##
## $data$environment
## $data$environment$variableNames
## [1] "bio1" "bio12" "bio16" "bio17" "bio5" "bio6" "bio7" "bio8" "biome"
##
## $data$environment$yearMin
## [1] 1990
##
## $data$environment$extentSet
## [{"xmin":-125,"xmax":-32,"ymin":-56,"ymax":40}]
##
## $data$environment$resolution
## [1] 0.5 0.5
##
## $data$environment$sources
## [1] "@article{hijmans2005,\n title={Very high resolution interpolated climate surfaces for global land areas},\n author={Hijmans, Robert J and Cameron, Susan E and Parra, Juan L and Jones, Peter G and Jarvis, Andy},\n journal={International Journal of Climatology: A Journal of the Royal Meteorological Society},\n volume={25},\n number={15},\n pages={1965--1978},\n year={2005},\n publisher={Wiley Online Library}\n}"
##
## $data$environment$minVal
## [{"bio1":-23,"bio12":0,"bio16":0,"bio17":0,"bio5":61,"bio6":-212,"bio7":60,"bio8":-66,"biome":1}]
##
## $data$environment$maxVal
## [{"bio1":289,"bio12":7682,"bio16":2458,"bio17":1496,"bio5":422,"bio6":242,"bio7":461,"bio8":323,"biome":14}]
##
##
## $data$dataNotes
## [1] "WorldClim v1.4 data accessed through dismo v1.1-4"
##
## $data$transfer
## $data$transfer$environment1
## $data$transfer$environment1$minVal
## [{"bio1":-23,"bio12":96,"bio16":42,"bio17":0,"bio5":90,"bio6":-136,"bio7":92,"bio8":-66,"biome":1}]
##
## $data$transfer$environment1$maxVal
## [{"bio1":208,"bio12":6045,"bio16":1753,"bio17":1284,"bio5":345,"bio6":101,"bio7":336,"bio8":270,"biome":12}]
##
## $data$transfer$environment1$yearMin
## [1] 2000
##
## $data$transfer$environment1$sources
## [1] "@article{hijmans2005,\n title={Very high resolution interpolated climate surfaces for global land areas},\n author={Hijmans, Robert J and Cameron, Susan E and Parra, Juan L and Jones, Peter G and Jarvis, Andy},\n journal={International Journal of Climatology: A Journal of the Royal Meteorological Society},\n volume={25},\n number={15},\n pages={1965--1978},\n year={2005},\n publisher={Wiley Online Library}\n}"
##
## $data$transfer$environment1$extentSet
## [{"xmin":-80,"xmax":-40,"ymin":-56,"ymax":-30}]
##
## $data$transfer$environment1$resolution
## [1] "0.5 degrees"
##
##
##
##
## $dataPrep
## $dataPrep$geographic
## $dataPrep$geographic$spatialThin
## $dataPrep$geographic$spatialThin$rule
## [1] "20 km used as minimum distance between points"
##
##
##
## $dataPrep$biological
## $dataPrep$biological$duplicateRemoval
## $dataPrep$biological$duplicateRemoval$rule
## [1] "one observation per cell"
##
##
##
## $dataPrep$environmental
## named list()
##
##
## $model
## $model$algorithms
## [1] "maxnet v.0.1.2"
##
## $model$selectionRules
## [1] "highest mean test AUC"
##
## $model$finalModelSettings
## [1] L_3
## Levels: LQ_1 LQ_2 LQ_3 L_1 L_2 L_3
##
## $model$partition
## $model$partition$partitionSet
## [1] "spatial blocks"
##
## $model$partition$partitionRule
## [1] "4 spatial partitions defined by latitude/longitude lines that ensure a balanced number of occurrence localities in each bin"
##
## $model$partition$notes
## [1] "background points also partitioned"
##
## $model$partition$occurrenceSubsampling
## [1] "k-fold cross validation"
##
## $model$partition$numberFolds
## [1] 4
##
##
## $model$algorithm
## $model$algorithm$maxent
## $model$algorithm$maxent$regularizationMultiplierSet
## [1] 3
##
## $model$algorithm$maxent$samplingBiasRule
## [1] "ignored"
##
##
##
##
## $prediction
## $prediction$extrapolation
## [1] "clamping"
##
## $prediction$transfer
## $prediction$transfer$environment1
## $prediction$transfer$environment1$units
## [1] "relative occurrence rate"
##
## $prediction$transfer$environment1$minVal
## [1] 6.316346e-08
##
## $prediction$transfer$environment1$maxVal
## [1] 0.0004328058
##
##
##
## $prediction$continuous
## $prediction$continuous$units
## [1] "relative occurrence rate"
##
## $prediction$continuous$minVal
## [1] 6.817044e-08
##
## $prediction$continuous$maxVal
## [1] 0.01327394
##
##
##
## $assessment
## $assessment$trainingDataStats
## $assessment$trainingDataStats$AIC
## [1] 7245.702
##
##
## $assessment$testingDataStats
## $assessment$testingDataStats$AUC
## [1] 0.8142638
##
## $assessment$testingDataStats$omissionRate
## [1] 0.05802342 0.24263085
##
## $assessment$testingDataStats$notes
## [1] "omission rate thresholds are 1) minimum training presence, 2) 10% training presence"
##
##
##
## $code
## $code$software
## [1] "@Manual{\n title = {R: A Language and Environment for Statistical Computing},\n author = {{R Core Team}},\n organization = {R Foundation for Statistical Computing},\n address = {Vienna, Austria},\n year = {2017},\n url = {https://www.R-project.org/},}"
##
## $code$vignetteCodeLink
## [1] "https://github.com/cmerow/rangeModelMetadata/blob/master/vignettes/rmm_workflowWithExampleRangeModel.Rmd"
##
##
## $modelFit
## $modelFit$maxent
## $modelFit$maxent$notes
## [1] "ENMeval was used to compare models with L and LQ features, each using regularization multipliers of 1,2,3. The best model was selected based on test AUC evaluated with spatial cross validation."
Check the final object by printing all the filled fields.
## $authorship
## $authorship$rmmName
## [1] "MerowMaitnerOwensKassEnquistJetzGuralnick_2018_BradypusVariegatus_Maxent_b3"
##
## $authorship$names
## [1] "Merow, Cory and Maitner, Brian and Owens, Hannah and Kass, Jamie and Enquist, Brian and Jetz, Walter and Guralnick, Rob"
##
## $authorship$license
## [1] "CC"
##
## $authorship$contact
## [1] "cory.merow@gmail.com"
##
## $authorship$relatedReferences
## [1] "@article{, \n title={RMMS: Species’ Range Model Metadata Standards },\n author={Merow, Cory and Maitner, Brian S. and Owens, Hannah L. and Kass, \n Jamie M. and Enquist, Brian and Jetz, Walter and Guralnick, Robert},\n journal={Global Ecology and Biogeography},\n year={2019}}"
##
## $authorship$miscNotes
## [1] "Funding from NSF grant DBI-1661510 and DBI-1913673."
##
##
## $studyObjective
## $studyObjective$purpose
## [1] "transfer"
##
## $studyObjective$rangeType
## [1] "potential"
##
## $studyObjective$transfer
## [1] "detect unoccupied suitable habitat"
##
##
## $data
## $data$occurrence
## $data$occurrence$dataType
## [1] "presence only"
##
## $data$occurrence$yearMin
## [1] 1970
##
## $data$occurrence$yearMax
## [1] 2000
##
## $data$occurrence$sources
## $data$occurrence$sources[[1]]
## [1] "iNaturalist.org (2020). iNaturalist Research-grade Observations. Occurrence dataset https://doi.org/10.15468/ab3s5x accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[2]]
## [1] "naturgucker.de. naturgucker. Occurrence dataset https://doi.org/10.15468/uc1apo accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[3]]
## [1] "Villegas M, Moreno J (2019). Primer monitoreo y seguimiento de fauna terrestre para el AID y AII de la Pequeña Central Hidráulica Riofrío. 2018. Corporación Paisajes Rurales. Occurrence dataset https://doi.org/10.15472/lh28wc accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[4]]
## [1] "Olaciregui C (2017). Evaluación de la presencia de 'Marmosa robinsoni' e inventario de mamíferos en el Departamento del Atlántico. Fundación Botánica y Zoológica de Barranquilla. Occurrence dataset https://doi.org/10.15472/54fglv accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[5]]
## [1] "Villegas M, Bolaños A (2017). Monitoreo y seguimiento de fauna terrestre para el AID y AII de la Central Hidroeléctrica de Calima - 2017. Corporación Paisajes Rurales. Occurrence dataset https://doi.org/10.15472/l3cboh accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
## $data$occurrence$sources[[6]]
## [1] "Villegas M, Zambrano F H, Guerra Gonzalez G J, Gonzalez G J (2019). Establecimiento de línea base de fauna terrestre para el AID y AII de la Pequeña Central Hidroeléctrica Riofrío. 2017.. Version 1.1. Corporación Paisajes Rurales. Occurrence dataset https://doi.org/10.15472/7s9kiw accessed via GBIF.org on 2020-03-13.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2020-03-13"
##
##
## $data$occurrence$presenceSampleSize
## [1] 483
##
## $data$occurrence$backgroundSampleSize
## [1] 5604
##
##
## $data$environment
## $data$environment$variableNames
## [1] "bio1" "bio12" "bio16" "bio17" "bio5" "bio6" "bio7" "bio8" "biome"
##
## $data$environment$yearMin
## [1] 1990
##
## $data$environment$extentSet
## [{"xmin":-125,"xmax":-32,"ymin":-56,"ymax":40}]
##
## $data$environment$resolution
## [1] 0.5 0.5
##
## $data$environment$sources
## [1] "@article{hijmans2005,\n title={Very high resolution interpolated climate surfaces for global land areas},\n author={Hijmans, Robert J and Cameron, Susan E and Parra, Juan L and Jones, Peter G and Jarvis, Andy},\n journal={International Journal of Climatology: A Journal of the Royal Meteorological Society},\n volume={25},\n number={15},\n pages={1965--1978},\n year={2005},\n publisher={Wiley Online Library}\n}"
##
## $data$environment$minVal
## [{"bio1":-23,"bio12":0,"bio16":0,"bio17":0,"bio5":61,"bio6":-212,"bio7":60,"bio8":-66,"biome":1}]
##
## $data$environment$maxVal
## [{"bio1":289,"bio12":7682,"bio16":2458,"bio17":1496,"bio5":422,"bio6":242,"bio7":461,"bio8":323,"biome":14}]
##
##
## $data$dataNotes
## [1] "WorldClim v1.4 data accessed through dismo v1.1-4"
##
## $data$transfer
## $data$transfer$environment1
## $data$transfer$environment1$minVal
## [{"bio1":-23,"bio12":96,"bio16":42,"bio17":0,"bio5":90,"bio6":-136,"bio7":92,"bio8":-66,"biome":1}]
##
## $data$transfer$environment1$maxVal
## [{"bio1":208,"bio12":6045,"bio16":1753,"bio17":1284,"bio5":345,"bio6":101,"bio7":336,"bio8":270,"biome":12}]
##
## $data$transfer$environment1$yearMin
## [1] 2000
##
## $data$transfer$environment1$sources
## [1] "@article{hijmans2005,\n title={Very high resolution interpolated climate surfaces for global land areas},\n author={Hijmans, Robert J and Cameron, Susan E and Parra, Juan L and Jones, Peter G and Jarvis, Andy},\n journal={International Journal of Climatology: A Journal of the Royal Meteorological Society},\n volume={25},\n number={15},\n pages={1965--1978},\n year={2005},\n publisher={Wiley Online Library}\n}"
##
## $data$transfer$environment1$extentSet
## [{"xmin":-80,"xmax":-40,"ymin":-56,"ymax":-30}]
##
## $data$transfer$environment1$resolution
## [1] "0.5 degrees"
##
##
##
##
## $dataPrep
## $dataPrep$geographic
## $dataPrep$geographic$spatialThin
## $dataPrep$geographic$spatialThin$rule
## [1] "20 km used as minimum distance between points"
##
##
##
## $dataPrep$biological
## $dataPrep$biological$duplicateRemoval
## $dataPrep$biological$duplicateRemoval$rule
## [1] "one observation per cell"
##
##
##
## $dataPrep$environmental
## named list()
##
##
## $model
## $model$algorithms
## [1] "maxnet v.0.1.2"
##
## $model$selectionRules
## [1] "highest mean test AUC"
##
## $model$finalModelSettings
## [1] L_3
## Levels: LQ_1 LQ_2 LQ_3 L_1 L_2 L_3
##
## $model$partition
## $model$partition$partitionSet
## [1] "spatial blocks"
##
## $model$partition$partitionRule
## [1] "4 spatial partitions defined by latitude/longitude lines that ensure a balanced number of occurrence localities in each bin"
##
## $model$partition$notes
## [1] "background points also partitioned"
##
## $model$partition$occurrenceSubsampling
## [1] "k-fold cross validation"
##
## $model$partition$numberFolds
## [1] 4
##
##
## $model$algorithm
## $model$algorithm$maxent
## $model$algorithm$maxent$regularizationMultiplierSet
## [1] 3
##
## $model$algorithm$maxent$samplingBiasRule
## [1] "ignored"
##
##
##
##
## $prediction
## $prediction$extrapolation
## [1] "clamping"
##
## $prediction$transfer
## $prediction$transfer$environment1
## $prediction$transfer$environment1$units
## [1] "relative occurrence rate"
##
## $prediction$transfer$environment1$minVal
## [1] 6.316346e-08
##
## $prediction$transfer$environment1$maxVal
## [1] 0.0004328058
##
##
##
## $prediction$continuous
## $prediction$continuous$units
## [1] "relative occurrence rate"
##
## $prediction$continuous$minVal
## [1] 6.817044e-08
##
## $prediction$continuous$maxVal
## [1] 0.01327394
##
##
##
## $assessment
## $assessment$trainingDataStats
## $assessment$trainingDataStats$AIC
## [1] 7245.702
##
##
## $assessment$testingDataStats
## $assessment$testingDataStats$AUC
## [1] 0.8142638
##
## $assessment$testingDataStats$omissionRate
## [1] 0.05802342 0.24263085
##
## $assessment$testingDataStats$notes
## [1] "omission rate thresholds are 1) minimum training presence, 2) 10% training presence"
##
##
##
## $code
## $code$software
## [1] "@Manual{\n title = {R: A Language and Environment for Statistical Computing},\n author = {{R Core Team}},\n organization = {R Foundation for Statistical Computing},\n address = {Vienna, Austria},\n year = {2017},\n url = {https://www.R-project.org/},}"
##
## $code$vignetteCodeLink
## [1] "https://github.com/cmerow/rangeModelMetadata/blob/master/vignettes/rmm_workflowWithExampleRangeModel.Rmd"
##
##
## $modelFit
## $modelFit$maxent
## $modelFit$maxent$notes
## [1] "ENMeval was used to compare models with L and LQ features, each using regularization multipliers of 1,2,3. The best model was selected based on test AUC evaluated with spatial cross validation."
# you can also use this function to omit the NULLs at the end of your workflow using, so if you're happy with the above...
rmm <- rmmCleanNULLs(rmm)
Now run all availables checks to be sure you’re ready to go.
##
##
##
## Element name ' $data$occurrence$backgroundSampleSize ' not found in data dictionary !
## Did you mean: ' $data$occurrence$backgroundSampleSizeSet '? The following names are similar to suggested names, please verify:
## $data$occurrence$backgroundSampleSize
## Suggested alternatives include:
## $data$occurrence$backgroundSampleSizeSet
## The following names are not similar to any suggested names, please verify that these are accurate:
## $data$occurrence$sources[[1]]
## $data$occurrence$sources[[2]]
## $data$occurrence$sources[[3]]
## $data$occurrence$sources[[4]]
## $data$occurrence$sources[[5]]
## $data$occurrence$sources[[6]]
## $dataPrep$environmental
## $code$software
## $modelFit$maxent$notes
##
## ==========================================
## For the field rmm$authorship$license
## The following entries appear accurate:
##
## CC
##
## ==========================================
## For the field rmm$studyObjective$purpose
## The following entries are not similar to any suggested values, please verify that these are accurate:
## transfer
##
## ==========================================
## For the field rmm$studyObjective$rangeType
## The following entries are not similar to any suggested values, please verify that these are accurate:
## potential
##
## ==========================================
## For the field rmm$studyObjective$transfer
## The following entries are not similar to any suggested values, please verify that these are accurate:
## detect unoccupied suitable habitat
##
## ==========================================
## For the field rmm$data$occurrence$dataType
## The following entries appear accurate:
##
## presence only
##
## ==========================================
## For the field rmm$data$environment$variableNames
## The following entries appear accurate:
##
## bio1; bio12; bio16; bio17; bio5; bio6; bio7; bio8
## The following entries are similar to suggested values, please verify:
## biome
##
## Suggested alternatives include:
## bio1
##
## ==========================================
## For the field rmm$dataPrep$biological$duplicateRemoval$rule
## The following entries are not similar to any suggested values, please verify that these are accurate:
## one observation per cell
##
## ==========================================
## For the field rmm$model$algorithms
## The following entries are not similar to any suggested values, please verify that these are accurate:
## maxnet v.0.1.2
##
## ==========================================
## For the field rmm$model$partition$occurrenceSubsampling
## The following entries are similar to suggested values, please verify:
## k-fold cross validation
##
## Suggested alternatives include:
## 5-fold cross validation
##
## ==========================================
## For the field rmm$model$algorithm$maxent$samplingBiasRule
## The following entries are not similar to any suggested values, please verify that these are accurate:
## ignored
##
## ==========================================
## For the field rmm$prediction$continuous$units
## The following entries appear accurate:
##
## relative occurrence rate
##
## ==========================================
## For the field rmm$prediction$extrapolation
## The following entries appear accurate:
##
## clamping
##
## ==========================================
## For the field rmm$prediction$transfer$environment1$units
## The following entries are similar to suggested values, please verify:
## relative occurrence rate
##
## Suggested alternatives include:
## relative occurrence rate
## ===================================
## ===================================
## All fields are populated.