databaseToAssignedSubspecies: Species Occurrences to Subspecies Occurrences

View source: R/IdentifyBirdSubspecies.R

databaseToAssignedSubspeciesR Documentation

Species Occurrences to Subspecies Occurrences

Usage

databaseToAssignedSubspecies(
  spp,
  subsppList,
  pointLimit,
  dbToQuery,
  quant = 0.95,
  xmin = NULL,
  xmax = NULL,
  ymin = NULL,
  ymax = NULL,
  plotIt = F,
  bgLayer = NULL,
  outputDir,
  datafile = NULL,
  epsilon = 1e-06,
  restrictNominate = F,
  cleanup_nominate = T,
  num_digits_latlong = 2,
  ...
)

Arguments

spp

Genus and species to query, as string

subsppList

Strings of subspecies to query

pointLimit

Maximum point limit to return for each database – see spocc::occ

dbToQuery

List of databases to search through – see spocc::occ

quant

quant for density, below which points are removed. E.g., if set to 0.95, removes 95

\item

xminMinimum longitude extent to clip rasters to

\item

xmaxMaximum longitude extent to clip rasters to

\item

yminMinimum latitute extent to clip rasters to

\item

ymaxMaximum latitude extent to clip rasters to

\item

plotItWhether to generate plots

\item

bgLayerA background layer for generating plots

\item

outputDirWhat directory to output to

\item

datafileif already ran and saved output from spocc:occ, put file here – default NULL

\item

epsilonParameter for anomaly detection

This function is a wrapper for the package and takes a species with a list of subspecies, and then assigns points to subspecies. Points that have problems with assignment are listed as "suspect" and points without problems are listed as "good." Also returns polygons used to make subspecies assignments.

Env = raster::stack(list.files(path='~/wc2-5/',pattern="\\.bil$",full.names=T)) ext = raster::extent(c(-125,-60,10,50)) Env = raster::crop(Env, ext) bg = Env[[1]] phainopeplaNitens = databaseToAssignedSubspecies(spp="Phainopepla nitens", subsppList=c("nitens","lepida"), pointLimit=500,dbToQuery=c("gbif","bison","inat","ebird","ecoengine","vertnet"), quant=0.95,xmin=-125,xmax=-60,ymin=10,ymax=50,plotIt=T,bgLayer=bg, outputDir="~/project/") suspect_occurrences = phainopeplaNitens$loc_suspect, good_occurrences = phainopeplaNitens$loc_good, subspecies_polygons = phainopeplaNitens$pol


kaiyaprovost/subsppLabelR documentation built on March 17, 2024, 5:09 p.m.