CoordinateCleaner icon indicating copy to clipboard operation
CoordinateCleaner copied to clipboard

Country test flags entries which it shouldn't

Open jpstevenson2018 opened this issue 2 years ago • 0 comments

Hi, I'm running coordinate_cleaner with the following script:

PHG_comb_issues <- clean_coordinates(x = PHG_comb_cleaned, 
                                 lon = "Decimal_Long", lat = "Decimal_Lat", 
                                 species = "Genus_species", countries = "Country_code", 
                                 tests = c("capitals", "centroids", "countries", 
                                           "duplicates", "equal", "gbif", 
                                           "institutions", "outliers", "urban",
                                           "seas", "zeros"), 
                                 seas_ref = buffland)

But when I check the occurrences flagged by the county test it has entries with coordinates that fall into their country when I check them externally. Not all of them, some are legitimately outside of their countries, whilst others fall into water just off their country's borders (these aren't flagged by the sea test due to using the buffland ref, and I'm not sure how to allow these through the country test?).

An example of an occurrence that shouldn't be flagged is a specimen from Brunei (BRN); Lat: 4.6300000; Long: 114.800000. Looking these coordinates up on maps appears to show it within Brunei, yet the test flags it. It does appear as though many of these flagged coordinates are near to the border. Any idea how I can improve the accuracy of this test?

Here's the data of all the occurrences flagged by the country test in case they are helpful: flagged_country_occurances.csv

Thanks, Jason

jpstevenson2018 avatar Apr 27 '22 13:04 jpstevenson2018