pygbif icon indicating copy to clipboard operation
pygbif copied to clipboard

date range queries potential issue

Open sckott opened this issue 6 years ago • 1 comments

A user wants to query a range of months overlapping two different years. It's clear that its not really possible to do month 11 to month 2, so probably have to use year-month dates. It doesn't seem possible with year-month dates though. We've tried eventDate with YYYY-MM,YYYY-MM, e.g., 2010-10,2011-02, but that doesn't work. e.g.,

from pygbif import occurrences
x = occurrences.search(2489603, eventDate="2010-11,2011-12")
dates = [ z['eventDate'] for z in x['results'] ]

the dates are all in 2011

In [31]: min(dates)
Out[31]: '2011-01-02T00:00:00'

In [32]: max(dates)
Out[32]: '2011-04-30T00:00:00'

There's about 5500 or so records for this request, and paging through to the end, all dates I believe are 2011.

@MattBlissett @timrobertson100 any ideas on date range searches?

sckott avatar Oct 24 '19 17:10 sckott

note to self, waiting on gbif/occurrence issue linked above

sckott avatar Nov 20 '19 19:11 sckott