iobis / robis

R client for the OBIS API
https://iobis.github.io/robis
Other
37 stars 11 forks source link

different number of records robis vs Elasticsearch #40

Closed wardappeltans closed 5 years ago

wardappeltans commented 7 years ago

3125 records: occurrence("Cetacea", geometry = "POLYGON ((-55.000 -37.000, -55.000 -58.000, -70.000 -58.000, -70.000 -37.000,-55.000 -37.000))")

3131 records: http://download.iobis.org/?scientificname=Cetacea&geometry=POLYGON%20((-55.000%20-37.000,%20-55.000%20-58.000,%20-70.000%20-58.000,%20-70.000%20-37.000,-55.000%20-37.000))

pieterprovoost commented 7 years ago

These 6 records are located right on the edges of the bounding box. We can get a higher precision by tweaking the number of geohash tree levels but that will likely impact performance.

library(robis)
library(dplyr)

down <- read.csv("d6b711427badc23d94b849ec02ddb65e9fad662c.csv")
cet <- occurrence("Cetacea", geometry = "POLYGON ((-55.000 -37.000, -55.000 -58.000, -70.000 -58.000, -70.000 -37.000,-55.000 -37.000))")

diff <- down %>% filter(!id %in% cet$id)
leafletmap(diff)

screen shot 2017-11-03 at 13 43 07