ropensci / CoordinateCleaner

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

Home Page:https://docs.ropensci.org/CoordinateCleaner/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CoordClean flagging all as flagged when there is nothing to flag

jaum20 opened this issue · comments

I have a dataset with 9 rows

occs <- data.frame(decimalLatitude.new1 = c(-13.670000,-9.495478,-11.222200,-15.800000,-15.460600,-12.949600,-14.598900,-14.446083,-15.660000),
decimalLongitude.new1 =c(-46.33000,-55.16585,-50.66920,-54.30000,-55.74970,-55.91920,-54.34000,-54.60000,-52.38000),
scientificName= "Virola malmei")

CoordClean<-clean_coordinates(
  occs, lon = "decimalLongitude.new1",
  lat = "decimalLatitude.new1",
  species = "scientificName",
  tests = c("capitals", "centroids", "equal", "gbif", "institutions", "outliers",
            "seas", "zeros"),
  countries = NULL,
  capitals_rad = 10000,
  centroids_rad = 1000,
  centroids_detail = "both",
  inst_rad = 100,
  outliers_method = "quantile",
  outliers_mtp = 5,
  outliers_td = 1000,
  outliers_size = 7,
  range_rad = 0,
  zeros_rad = 0.5,
  capitals_ref = NULL,
  centroids_ref = NULL,
  country_ref = NULL,
  country_refcol = "iso_a3",
  inst_ref = NULL,
  range_ref = NULL,
  seas_ref = NULL,
  seas_scale = 50,
  urban_ref = NULL,
  value = "spatialvalid",
  verbose = TRUE,
  report = FALSE
)

summary(CoordClean)

summary(CoordClean)
.val     .equ     .zer     .cap     .cen     .sea     .otl     .gbf    .inst .summary 
       0        0        0        0        0        0        0        0        0        0 

CoordClean$.summary
[1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE

plot(CoordClean, lon = "decimalLongitude.new1", lat = "decimalLatitude.new1")
image

Hey @jaum20, thanks for pointing out this issue. The problem occurred in the plotting process, we have now fixed it.