Automated Cleaning of Occurrence Records from Biological Collections

Automated flagging of common spatial and temporal errors in biological and paleontological collection data, for the use in conservation, ecology and paleontology. Includes automated tests to easily flag (and exclude) records assigned to country or province centroid, the open ocean, the headquarters of the Global Biodiversity Information Facility, urban areas or the location of biodiversity institutions (museums, zoos, botanical gardens, universities). Furthermore identifies per species outlier coordinates, zero coordinates, identical latitude/longitude and invalid coordinates. Also implements an algorithm to identify data sets with a significant proportion of rounded coordinates. Especially suited for large data sets. The reference for the methodology is: Zizka et al. (2019) .


CoordinateCleaner v3.0

CRAN_Status_Badge downloads rstudio mirror downloads Project Status: Active – The project has reached a stable, usable state and is being actively developed. DOI rOpenSci peer-review

CoordinateCleaner has been updated to version 3.0 on github and will shortly be updated on CRAN to adapt to the retirement of sp and raster. The update may not be compatible with analysis-pipelines build with version 2.x*

Automated flagging of common spatial and temporal errors in biological and palaeontological collection data, for the use in conservation, ecology and palaeontology. Specifically includes tests for

  • General coordinate validity
  • Country and province centroids
  • Capital coordinates
  • Coordinates of biodiversity institutions
  • Spatial outliers
  • Temporal outliers
  • Coordinate-country discordance
  • Duplicated coordinates per species
  • Assignment to the location of the GBIF headquarters
  • Urban areas
  • Seas
  • Plain zeros
  • Equal longitude and latitude
  • Rounded coordinates
  • DDMM to DD.DD coordinate conversion errors
  • Large temporal uncertainty (fossils)
  • Equal minimum and maximum ages (fossils)
  • Spatio-temporal outliers (fossils)

CoordinateCleaner can be particularly useful to improve data quality when using data from GBIF (e.g. obtained with rgbif) or the Paleobiology database (e.g. obtained with paleobioDB) for historical biogeography (e.g. with BioGeoBEARS or phytools), automated conservation assessment (e.g. with speciesgeocodeR or conR) or species distribution modelling (e.g. with dismo or sdm). See scrubr and taxize for complementary taxonomic cleaning or biogeo for correcting spatial coordinate errors.

See News for update information.

Installation

Stable from CRAN

install.packages("CoordinateCleaner")
library(CoordinateCleaner)

Developmental from GitHub

devtools::install_github("ropensci/CoordinateCleaner")
library(CoordinateCleaner)

Usage

A simple example:

# Simulate example data
minages <- runif(250, 0, 65)
exmpl <- data.frame(species = sample(letters, size = 250, replace = TRUE),
                    decimalLongitude = runif(250, min = 42, max = 51),
                    decimalLatitude = runif(250, min = -26, max = -11),
                    min_ma = minages,
                    max_ma = minages + runif(250, 0.1, 65),
                    dataset = "clean")

# Run record-level tests
rl <- clean_coordinates(x = exmpl)
summary(rl)
plot(rl)

# Dataset level 
dsl <- clean_dataset(exmpl)

# For fossils
fl <- clean_fossils(x = exmpl,
                          taxon = "species",
                          lon = "decimalLongitude", 
                          lat = "decimalLatitude")
summary(fl)

# Alternative example using the pipe
library(tidyverse)

cl <- exmpl %>%
  cc_val()%>%
  cc_cap()%>%
  cd_ddmm()%>%
  cf_range(lon = "decimalLongitude", 
           lat = "decimalLatitude", 
           taxon  ="species")

Documentation

Pipelines for cleaning data from the Global Biodiversity Information Facility (GBIF) and the Paleobiology Database (PaleobioDB) are available in here.

Contributing

See the CONTRIBUTING document.

Citation

Zizka A, Silvestro D, Andermann T, Azevedo J, Duarte Ritter C, Edler D, Farooq H, Herdean A, Ariza M, Scharn R, Svanteson S, Wengtrom N, Zizka V & Antonelli A (2019) CoordinateCleaner: standardized cleaning of occurrence records from biological collection databases. Methods in Ecology and Evolution, 10(5):744-751, doi:10.1111/2041-210X.13152, https://github.com/ropensci/CoordinateCleaner

ropensci_footer

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("CoordinateCleaner")

3.0.1 by Alexander Zizka, 3 years ago


https://ropensci.github.io/CoordinateCleaner/


Report a bug at https://github.com/ropensci/CoordinateCleaner/issues


Browse source code at https://github.com/cran/CoordinateCleaner


Authors: Alexander Zizka [aut, cre] , Daniele Silvestro [ctb] , Tobias Andermann [ctb] , Josue Azevedo [ctb] , Camila Duarte Ritter [ctb] , Daniel Edler [ctb] , Harith Farooq [ctb] , Andrei Herdean [ctb] , Maria Ariza [ctb] , Ruud Scharn [ctb] , Sten Svanteson [ctb] , Niklas Wengstrom [ctb] , Vera Zizka [ctb] , Alexandre Antonelli [ctb] , Bruno Vilela [ctb] (Bruno updated the package to remove dependencies on sp , raster , rgdal , maptools , and rgeos packages) , Irene Steves [rev] (Irene reviewed the package for ropensci , see <https://github.com/ropensci/onboarding/issues/210>) , Francisco Rodriguez-Sanchez [rev] (Francisco reviewed the package for ropensci , see <https://github.com/ropensci/onboarding/issues/210>)


Documentation:   PDF Manual  


GPL-3 license


Imports dplyr, geosphere, ggplot2, graphics, grDevices, methods, rgbif, rnaturalearth, stats, terra, tidyselect, utils

Suggests countrycode, covr, knitr, magrittr, maps, rmarkdown, rnaturalearthdata, sf, testthat, viridis

System requirements: GDAL (>= 2.0.1)


Imported by BeeBDC, bdc, biofetchR, caretSDM, gatoRs, gbif.range.

Suggested by RuHere, biomes, dynamicSDM, rbiodatacr, redlist.


See at CRAN