Automated flagging of common spatial and temporal errors in biological and palaeontological collection data, for the use in conservation, ecology and palaeontology.
Clone or download
Zizka
Latest commit 53e676f Jan 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R skip tests on CRAN Jan 21, 2019
data spelling and encoding Oct 17, 2018
docs url fix 2 Jan 16, 2019
inst added citation Jan 21, 2019
man url fix Jan 16, 2019
tests skip tests on CRAN Jan 21, 2019
vignettes spell-checks and language setting Jan 14, 2019
.Rbuildignore build Oct 24, 2018
.gitignore webpage update Sep 19, 2018
.travis.yml travis6 Jul 26, 2018
CONTRIBUTING.md Ropensci reviews 1 Jun 5, 2018
CRAN-RELEASE added citation Jan 21, 2019
CoordinateCleaner.Rproj cc_coun bugfix Dec 4, 2018
DESCRIPTION added citation Jan 21, 2019
NAMESPACE url fixes Oct 17, 2018
NEWS.md skip tests on CRAN Jan 21, 2019
README.md added citation Jan 21, 2019
_pkgdown.yml cc_outl fixes Sep 8, 2018
codemeta.json cran update v2.0-6 Jan 16, 2019
cran-comments.md added citation Jan 21, 2019

README.md

CoordinateCleaner v2.0-7

Build Status codecov.io CRAN_Status_Badge downloads rstudio mirror downloads Project Status: Active – The project has reached a stable, usable state and is being actively developed. DOI

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. You can find a detailed comparison of the functionality of CoordinateCleaner, scrubr, and biogeo here.

See News for update information.

Installation

Stable from CRAN

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

Developmental using devtools

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 (2018) CoordinateCleaner: standardized cleaning of occurrence records from biological collection databases. https://github.com/ropensci/CoordinateCleaner

ropensci_footer