Package: OccurrenceCleaner 0.2.0

OccurrenceCleaner: Fast Quality Checks for Species Occurrence Records

An extension of 'CoordinateCleaner' (Zizka et al. 2019 <doi:10.1111/2041-210X.13152>) tailored to large-scale species occurrence data. Flags common problems in occurrence records, such as coordinates at country centroids, capitals or biodiversity institutions, zero or equal coordinates, records at sea, in the wrong country or outside the species range, duplicates, outliers within a species, and datasets with converted or gridded coordinates, with the test definitions and default buffers of 'CoordinateCleaner' apart from documented differences. It also reads the quality warnings GBIF attaches to each record, the basis of record and the establishment means, and checks records at sea or on land against the habitat of their genus from the Interim Register of Marine and Nonmarine Genera. Records are flagged and kept, and users choose afterwards which flags to filter on. Data frames of a few million records are flagged in seconds, and GBIF snapshots of billions of records are processed by reading Parquet files in chunks.

Authors:Gilles Colling [aut, cre, cph]

OccurrenceCleaner_0.2.0.tar.gz
OccurrenceCleaner_0.2.0.zip(r-4.7-x86_64)OccurrenceCleaner_0.2.0.zip(r-4.7-arm64)OccurrenceCleaner_0.2.0.zip(r-4.6-x86_64)OccurrenceCleaner_0.2.0.zip(r-4.6-arm64)OccurrenceCleaner_0.2.0.zip(r-4.5-x86_64)
OccurrenceCleaner_0.2.0.tgz(r-4.6-x86_64)OccurrenceCleaner_0.2.0.tgz(r-4.6-arm64)OccurrenceCleaner_0.2.0.tgz(r-4.5-x86_64)OccurrenceCleaner_0.2.0.tgz(r-4.5-arm64)
OccurrenceCleaner_0.2.0.tar.gz(r-4.7-arm64)OccurrenceCleaner_0.2.0.tar.gz(r-4.7-x86_64)OccurrenceCleaner_0.2.0.tar.gz(r-4.6-arm64)OccurrenceCleaner_0.2.0.tar.gz(r-4.6-x86_64)
OccurrenceCleaner_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
OccurrenceCleaner/json (API)

# Install 'OccurrenceCleaner' in R:
install.packages('OccurrenceCleaner', repos = c('https://gcol33.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/gcol33/occurrencecleaner/issues

Pkgdown/docs site:https://gillescolling.com

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library
Datasets:
  • gentiana - GBIF records of gentians in Austria

On CRAN:

Conda:

biodiversitycoordinatecleanerdata-cleaninggbifoccurrence-datarcppcppopenmp

4.50 score 29 scripts 47 exports 10 dependencies

Last updated from:2cd91fa1c7. Checks:15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK322
linux-devel-x86_64OK436
source / vignettesOK327
linux-release-arm64OK369
linux-release-x86_64OK460
macos-release-arm64OK311
macos-release-x86_64OK771
macos-oldrel-arm64OK433
macos-oldrel-x86_64OK648
windows-devel-arm64OK505
windows-devel-x86_64OK569
windows-release-arm64OK508
windows-release-x86_64OK482
windows-oldrel-x86_64OK467
wasm-releaseOK127

Exports:as_spatialvalidclean_age_equalclean_age_outlierclean_age_range_outlierclean_aohiclean_basis_fossilclean_basis_livingclean_capitalclean_centroidclean_country_mismatchclean_dataset_ddmmclean_dataset_roundedclean_duplicateclean_equalclean_establishment_introducedclean_establishment_managedclean_gbif_headquartersclean_institutionclean_invalidclean_issue_coordinateclean_issue_dateclean_issue_roundedclean_issue_taxonclean_land_marineclean_outlierclean_rangeclean_seaclean_sea_nonmarineclean_spatiotemporal_outlierclean_urbanclean_zerodownload_referenceexport_pyrateflag_maskflag_occurrencesflag_referenceflag_testsflagged_tablehas_flagkeep_unflaggedocc_columnsread_flaggedreference_habitatreference_inforeference_pointstally_flagstest_plan

Dependencies:cligluelibgeoslifecycleRcpprlangtidyselectvctrsvectrawithr

Reference data
The layers | Capitals | Country and province centroids | Land, countries and urban areas | Institutions | Genus habitats | Artificial hotspots | How the reference data differ from CoordinateCleaner's | Extension points | Land scale and the sea test | Buffers | Recording the reference | Choosing a reference

Last update: 2026-10-17
Started: 2026-10-10

Running on several threads
Setting the number of threads | Tests that use the threads | Identical flags | Speedup | Enabling OpenMP

Last update: 2026-10-13
Started: 2026-10-13

Compatibility with CoordinateCleaner
Running both packages on the same records | Removing the flagged records | How agreement is tested | Checking agreement on your own records | Function mapping | Tests | Arguments and output | Functions around the tests | Where the results differ | Design differences | Buffer circles | Records without valid coordinates | Random age draws | Records without a dataset key | Country codes | Gazetteers | Behaviour of CoordinateCleaner 3.0.1 | The zero buffer | Records in France, Norway and Kosovo | Outliers of large species | Small datasets | Timings | One million records | Ten million records | The shared tests in one call | When is CoordinateCleaner the better choice? | References

Last update: 2026-10-13
Started: 2026-10-10

Cleaning GBIF data
Example data | Flagging with every test the columns allow | Where the flagged records are | How often tests coincide | Comparing cleaning rules | Record age and coordinate uncertainty | The cleaned table | Practical guidance

Last update: 2026-10-13
Started: 2026-10-10

Large tables on disk
Example | Example input | Flagging into an output directory | Tallying from disk | Selecting and joining flagged records | Duplicates across files | Selecting records before flagging | Resuming an interrupted run | The output directory | Progress and threads | Memory and disk | A GBIF snapshot

Last update: 2026-10-13
Started: 2026-10-10

Choosing a cleaning rule
Example | Example records | Flag once | What each test removes | Comparing rules | By group | Record age and coordinate precision | Where the removed records are | Applying the rule | How the shares are computed

Last update: 2026-10-13
Started: 2026-10-10

Cleaning fossil records
A small fossil table | Flagging | Filtering records | A wider centroid buffer | Filtering by age range | Outliers within a taxon | Export to PyRate | Comparison with CoordinateCleaner | Fossils in GBIF data | References

Last update: 2026-10-13
Started: 2026-10-10

Custom reference points and polygons
A filtered point layer | An extended point layer | Polygon layers | Species ranges | A genus habitat table | Recording the layer | Comparison with CoordinateCleaner

Last update: 2026-10-13
Started: 2026-10-10

Get started
Installation | Flagging a data frame | Filtering records | Running every test the columns allow | Comparing cleaning rules | Changing a test's distance | Flagging other data | Fixing common errors | Checks based on GBIF metadata | Flagging a table on disk | Where next

Last update: 2026-10-13
Started: 2026-10-12

Outliers and dataset tests
Example data | Geographic outliers | Species with many records | Dataset tests | Artificial hotspots | One rule over all of them | Streamed input | Practical guidance | References

Last update: 2026-10-13
Started: 2026-10-10

The tests in detail
Coordinate validity | Zero and equal coordinates | Proximity to reference points | Land and sea | Habitat at sea and on land | Urban areas | Country codes | Duplicates | GBIF issue flags | Basis of record and establishment means | Choosing columns | All tests and the flag word | References

Last update: 2026-10-13
Started: 2026-10-10

Readme and manuals

Help Manual

Help pageTopics
Convert flags to CoordinateCleaner's spatialvalid formatas_spatialvalid
Test: fossil age rangeclean_age_equal test_age_equal
Test: fossil age outliersclean_age_outlier test_age_outlier
Test: fossil age-range outliersclean_age_range_outlier test_age_range_outlier
Test: artificial hotspotsclean_aohi test_aohi
Tests: basis of recordclean_basis_fossil clean_basis_living test_basis
Test: country capitalsclean_capital test_capital
Test: country and province centroidsclean_centroid test_centroid
Test: country code mismatchclean_country_mismatch test_country_mismatch
Test: degree-minute conversion errors in a datasetclean_dataset_ddmm test_dataset_ddmm
Test: rasterised datasetsclean_dataset_rounded test_dataset_rounded
Test: duplicatesclean_duplicate test_duplicate
Test: equal coordinatesclean_equal test_equal
Tests: establishment meansclean_establishment_introduced clean_establishment_managed test_establishment
Test: GBIF headquartersclean_gbif_headquarters test_gbif_headquarters
Test: biodiversity institutionsclean_institution test_institution
Test: invalid coordinatesclean_invalid test_invalid
Tests: GBIF issue flagsclean_issue_coordinate clean_issue_date clean_issue_rounded clean_issue_taxon test_gbif_issue
Test: geographic outliersclean_outlier test_outlier
Test: outside the species rangeclean_range test_range
Test: records at seaclean_sea test_sea
Tests: habitat at sea and on landclean_land_marine clean_sea_nonmarine test_habitat
Test: fossil outliers in space and timeclean_spatiotemporal_outlier test_spatiotemporal_outlier
Test: urban areasclean_urban test_urban
Test: zero coordinatesclean_zero test_zero
Download the 1:10 million land layerdownload_reference
Export fossil records as PyRate inputexport_pyrate
Bit mask and membership for sets of testsflag_mask has_flag
Flag occurrence recordsflag_occurrences
Reference data behind a set of flagsflag_reference
The flag layout: one bit per testflag_tests
GBIF records of gentians in Austriagentiana
Keep the records no test flaggedkeep_unflagged
Name the record fieldsocc_columns
Plot flag percentages, or map flagged recordsplot.occ_flagged plot.occ_flags plot.occ_summary plot.occ_tally
Read flag output written by flag_occurrences()flagged_table read_flagged
Genus habitats of the habitat testsreference_habitat
Reference data: sources and versionsreference_info
Reference points of a proximity testreference_points
Share of records flagged, per test and rulesummary.occ_flagged summary.occ_flags summary.occ_tally
Tally flags into a loss tabletally_flags
Which tests run on an inputtest_plan