spocc is an R client that allows fetching occurrence records data from many different data sources.
We attempt to make it easy as possible to do the same operation across all data sources. For example, you can set whether you want back only records with lat/long coordinates or not across data sources without having to know the internals of what each data source wants you to do (and they often differ). There are many other examples.
A user just asked about how to do date based searching with a single data source. I started looking into it, and it made most sense to simply implement date based searching across all data sources.
The caveat right now is that spocc
only supports date range searches with two dates (a start date and an end date). There are of course other ways to search with dates, but i thought iād start with what I assume is the most common use case for date based searching.
install
install development version from github, requires some dependencies that are also dev versions that needed fixes for date searches to work
remotes::install_github("ropensci/spocc")
date range searches
bison
occ(query = 'Acer', date = c('2010-08-08', '2010-08-21'), from = 'bison', limit=5)
#> Occurrences - Found: 570,483, Returned: 5
#> Search type: Scientific
#> bison: Acer (5)
ala
occ(query = 'Alaba', date = c('2010-01-01T00:00:00Z', '2017-12-31T00:00:00Z'), from = 'ala', limit = 5)
#> Searched: ala
#> Occurrences - Found: 0, Returned: 4
#> Search type: Scientific
#> ala: Alaba (4)
gbif
occ(query = 'Accipiter striatus', date = c('2010-08-01', '2010-08-31'), from = 'gbif', limit=5)
#> Searched: gbif
#> Occurrences - Found: 1,044, Returned: 5
#> Search type: Scientific
#> gbif: Accipiter striatus (5)
ecoengine
occ(date = c('2010-01-01', '2010-12-31'), from = 'ecoengine', limit=5)
#> Searched: ecoengine
#> Occurrences - Found: 41,026, Returned: 5
#> Search type: Scientific
#> ecoengine: custom query (5)
antweb
occ(query = "acanthognathus", date = c('2010-01-01', '2010-12-31'), from = 'antweb', limit=5)
#> Searched: antweb
#> Occurrences - Found: 8, Returned: 5
#> Search type: Scientific
#> antweb: acanthognathus (5)
vertnet
occ(query = 'Mustela nigripes', date = c('1990-01-01', '2015-12-31'), from = 'vertnet', limit=5)
#> Searched: vertnet
#> Occurrences - Found: 49, Returned: 5
#> Search type: Scientific
#> vertnet: Mustela nigripes (5)
idigbio
occ(query = 'Acer', date = c('2010-01-01', '2015-12-31'), from = 'idigbio', limit=5)
#> Searched: idigbio
#> Occurrences - Found: 13, Returned: 5
#> Search type: Scientific
#> idigbio: Acer (5)
obis
occ(query = 'Mola mola', date = c('2015-01-01', '2015-12-31'), from = 'obis', limit=5)
#> Searched: obis
#> Occurrences - Found: 456, Returned: 5
#> Search type: Scientific
#> obis: Mola mola (5)
inat
occ(query = 'Danaus plexippus', date = c('2015-01-01', '2015-12-31'), from = 'inat', limit=5)
#> Searched: inat
#> Occurrences - Found: 4,882, Returned: 5
#> Search type: Scientific
#> inat: Danaus plexippus (5)