check_spatial_outliers: This function takes a data frame of all species records,...

Description Usage Arguments Value

Description

This function takes a data frame of all species records, flags records as spatial outliers (T/F for each record in the df), and saves images of the checks for each. Manual cleaning of spatial outliers is very tedious, but automated cleaning makes mistakes, so checking is handy It uses the CoordinateCleaner package https://cran.r-project.org/web/packages/CoordinateCleaner/index.html. It assumes that the input dfs are those returned by the coord_clean_records function

Usage

1
2
3
4
5
6
7
8
check_spatial_outliers(
  all_df,
  urban_df,
  land_shp,
  clean_path,
  spatial_mult,
  prj
)

Arguments

all_df

Data.frame. DF of all species records returned by the coord_clean_records function

urban_df

Data.frame of Urban records (only used if you have urban data, e.g. I-naturalist)

land_shp

R object. Shapefile of the worlds land (e.g. https://www.naturalearthdata.com/downloads/10m-physical-vectors/10m-land/)

clean_path

Character string - The file path used for saving the checks

spatial_mult

Numeric. The multiplier of the interquartile range (method == 'quantile', see ?cc_outl)

Value

Data.frame of species records, with spatial outlier T/F flag for each record


HMB3/sdmgen documentation built on April 16, 2021, 7:29 p.m.