Removes or flags records within 0.5 degree radius around the GBIF headquarters in Copenhagen, DK.
cc_gbif(
x,
lon = "decimalLongitude",
lat = "decimalLatitude",
species = "species",
buffer = 1000,
geod = TRUE,
verify = FALSE,
value = "clean",
verbose = TRUE
)
data.frame. Containing geographical coordinates and species names.
character string. The column with the longitude coordinates. Default = “decimalLongitude”.
character string. The column with the latitude coordinates. Default = “decimalLatitude”.
character string. The column with the species identity. Only required if verify = TRUE.
numerical. The buffer around the GBIF headquarters, where records should be flagged as problematic. Units depend on geod. Default = 100 m.
logical. If TRUE the radius is calculated based on a sphere, buffer is in meters. If FALSE the radius is calculated in degrees. Default = T.
logical. If TRUE records are only flagged if they are the only record in a given species flagged close to a given reference. If FALSE, the distance is the only criterion
character string. Defining the output value. See value.
logical. If TRUE reports the name of the test and the number of records flagged.
Depending on the ‘value’ argument, either a data.frame
containing the records considered correct by the test (“clean”) or a logical vector (“flagged”), with TRUE = test passed and FALSE = test failed/potentially problematic . Default = “clean”.
Not recommended if working with records from Denmark or the Copenhagen area.
x <- data.frame(species = "A",
decimalLongitude = c(12.58, 12.58),
decimalLatitude = c(55.67, 30.00))
cc_gbif(x)
#> Testing GBIF headquarters, flagging records around Copenhagen
#> Removed 1 records.
#> species decimalLongitude decimalLatitude
#> 2 A 12.58 30
cc_gbif(x, value = "flagged")
#> Testing GBIF headquarters, flagging records around Copenhagen
#> Flagged 1 records.
#> [1] FALSE TRUE