Four tests read the issue names GBIF attaches to a record during processing:
issue_coordinate: COORDINATE_INVALID, COORDINATE_OUT_OF_RANGE, COORDINATE_REPROJECTION_FAILED, COORDINATE_REPROJECTION_SUSPICIOUS, COORDINATE_UNCERTAINTY_METERS_INVALID, COORDINATE_PRECISION_INVALID, GEODETIC_DATUM_INVALID, CONTINENT_COORDINATE_MISMATCH, COUNTRY_COORDINATE_MISMATCH, PRESUMED_SWAPPED_COORDINATE, PRESUMED_NEGATED_LONGITUDE, PRESUMED_NEGATED_LATITUDE, ZERO_COORDINATE;issue_taxon: TAXON_MATCH_FUZZY, TAXON_MATCH_HIGHERRANK, TAXON_MATCH_NONE, TAXON_MATCH_AGGREGATE;issue_date: RECORDED_DATE_INVALID, RECORDED_DATE_UNLIKELY, RECORDED_DATE_MISMATCH;issue_rounded: COORDINATE_ROUNDED, which GBIF sets when it rounds a coordinate to five decimals.
Usage
clean_issue_coordinate(x, ...)
clean_issue_taxon(x, ...)
clean_issue_date(x, ...)
clean_issue_rounded(x, ...)Arguments
- x
A data frame of occurrence records.
- ...
Further arguments to
flag_occurrences():columns,reference,gazetteers,land_scale.
Value
clean_<test>(): the rows of x the test does not flag, with the
columns of x unchanged. See keep_unflagged(), Cleaning functions.
Details
The issue column is a string of names separated by ;, ,, | or
spaces, or a list column of character vectors; case is ignored.
See also
flag_occurrences(), flag_tests()
Other tests:
clean_age_equal(),
clean_age_outlier(),
clean_age_range_outlier(),
clean_aohi(),
clean_basis_fossil(),
clean_capital(),
clean_centroid(),
clean_country_mismatch(),
clean_dataset_ddmm(),
clean_dataset_rounded(),
clean_duplicate(),
clean_equal(),
clean_establishment_introduced(),
clean_gbif_headquarters(),
clean_institution(),
clean_invalid(),
clean_outlier(),
clean_range(),
clean_sea(),
clean_sea_nonmarine(),
clean_spatiotemporal_outlier(),
clean_urban(),
clean_zero()
Examples
x <- data.frame(issue = c("COORDINATE_ROUNDED;GEODETIC_DATUM_ASSUMED_WGS84",
"TAXON_MATCH_FUZZY", "PRESUMED_SWAPPED_COORDINATE", ""))
f <- flag_occurrences(x, tests = c("issue_coordinate", "issue_taxon", "issue_rounded"))
f[, c("flag_issue_coordinate", "flag_issue_taxon", "flag_issue_rounded")]
x |> clean_issue_coordinate() |> clean_issue_taxon()