Number of occurence for birds

Hello GBIF community!

For some upcoming analysis I would like to get an information about how many bird occurrences are in GBIF grouped by some grid cell and month.

Being an R user I had a quick look at the vignettes from rgbif (https://cran.r-project.org/web/packages/rgbif/vignettes/rgbif.html), so my question is: is there a way to get the number of bird occurrences directly rather than having to download all bird data? If the previous is not possible, how can I download all bird occurrences within a defined spatial area?

Thanks in advance!

Hi there.

If you’re only interested in number of occurrences, the /count endpoint would probably be your best bet. However, I don’t believe this supports geometry like grid cells.

You could use the search API and simply limit number of results to 0, e.g. here’s a random 5-degree cell (described as anti-clockwise polygon).

This call is used to populate this map

It seems you can accomplish the same using occ_data() in rgbif, e.g.

> occ_data(taxonKey=212,geometry='POLYGON((150 -35,155 -35,155 -30,150 -30,150 -35))',limit=0)
Records found [8496723] 
Records returned [0] 
Args [limit=0, offset=0, taxonKey=212, geometry=POLYGON((150 -35,155 -35,155 -30,150 -30,150 -35))] 

Just a few ideas to get you started…

/Daniel

I don´t know how the rgbif handles that, but the APIs offer facets as a parameter, then you can limit the number of observations to 0 (&limit=0), but still get the facet for the search. See more details here

Thanks for your swift and helpful replies, I am indeed only interested in numbers of occurrences. I will have a look at the links that you sent and I know where to come back to if I get stuck :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.