Dalcin,

For retrieving, counting, performing statistical analyses, databasing, plotting charts and maps, of GBIF data I have been using quite successfully the R oftware environment for statistical computing and graphics (https://www.r-project.org/) with the rgbif package (https://github.com/ropensci/rgbif) written by Scott Chamberlain, which makes direct calls to the GBIF API. The advantages of R as a data retrieval and analytical tool are overwhelming and would be worth exploring in your case.

Hope this helps.

Salud!

2015-09-07 12:33 GMT-03:00 Roderic Page <Roderic.Page@glasgow.ac.uk>:
Hi Eduardo,

I’m curious, is the purpose to get counts by dataset by country, or to get all the plant occurrences for Brazil? The later can be obtained by downloading all plant occurrences in Brazil http://www.gbif.org/occurrence/search?TAXON_KEY=6&COUNTRY=BR (you could then compute the per-dataset stats locally). I realise that this isn’t as convenient as having GBIF slice the data for you in the API.

Regards

Rod

---------------------------------------------------------
Roderic Page
Professor of Taxonomy
Institute of Biodiversity, Animal Health and Comparative Medicine
College of Medical, Veterinary and Life Sciences
Graham Kerr Building
University of Glasgow
Glasgow G12 8QQ, UK

Email:  Roderic.Page@glasgow.ac.uk
Tel:  +44 141 330 4778
Skype:  rdmpage
Facebook:  http://www.facebook.com/rdmpage
LinkedIn:  http://uk.linkedin.com/in/rdmpage
Twitter:  http://twitter.com/rdmpage
Blog:  http://iphylo.blogspot.com
ORCID:  http://orcid.org/0000-0002-7101-9767

On 4 Sep 2015, at 10:39, Eduardo Dalcin <edalcin@jbrj.org> wrote:

Hi Markus,

Yes, that's a shame I can't have country and "nub" together. There is any hope about it?

Eduardo


--------------------------------
Instituto de Pesquisas Jardim Botânico do Rio de Janeiro - JBRJ
Trabalho / Work: +55 21 3204 2116
--------------------------------
e-mail alternativo /  alternate email: edalcin@jbrj.org
--------------------------------
Agendar reunião / Schedule a meeting: http://agendar.dalc.in

On Thu, Sep 3, 2015 at 4:29 PM, Markus Döring <mdoering@gbif.org> wrote:
Eduardo,

as you might have seen from my issue comment the webservice uses a different parameter name for taxonKey which is a bug we need to fix at some point.
Please use nubKey for now to use the service like that:

http://api.gbif.org/v1/occurrence/counts/datasets?nubKey=6

The real problem for you will be that we do not support the combination of the country and the taxon filter, just one of the two. So you cannot search for plants in Brazil I am afraid, just for datasets about Brazil and datasets with plant records.

Markus



> On 03 Sep 2015, at 14:12, Eduardo Dalcin <edalcin@jbrj.org> wrote:
>
> Thanks Jan. I'll keep exploring and I'll be in touch, if I need.
>
> Best,
>
> Eduardo
>
>
>
> --------------------------------
> Eduardo Dalcin
> Instituto de Pesquisas Jardim Botânico do Rio de Janeiro - JBRJ
> e-mail: edalcin@jbrj.gov.br
> Trabalho / Work: +55 21 3204 2116
> --------------------------------
> e-mail alternativo /  alternate email: edalcin@jbrj.org
> --------------------------------
> Agendar reunião / Schedule a meeting: http://agendar.dalc.in
>
> On Thu, Sep 3, 2015 at 4:51 AM, Jan Legind [GBIF] <jlegind@gbif.org> wrote:
> Dear Eduardo,
>
>
>
> Thanks for getting in touch with us about these issues.
>
>
>
> The first request http://api.gbif.org/v1/occurrence/count?country=BR&taxonKey=6&basisOfRecord=PRESERVED_SPECIMEN returns the number of records located in Brazil for the facets in the request.
>
> The second query http://api.gbif.org/v1/occurrence/counts/datasets?country=BR&taxonKey=6&basisOfRecord=PRESERVED_SPECIMEN uses the Occurrence Inventories web service http://www.gbif.org/developer/occurrence#inventories which does not support the basis-of-record facet in the /datasets request. I understand that it would be better if the API response yielded an error message in this instance.
>
>
>
> Concerning the other issues – you are indeed right that the counts do not make sense in the context of taxon key 6 which is Plantae. Actually the API does not handle the taxonKey search at all, contrary to what the documentation states:
>
>
>
> /occurrence/counts/datasets
>
> GET
>
> Counts
>
> Lists occurrence counts for datasets that cover a given taxon or country.
>
> country, taxonKey
>
>
>
> As you can see here, http://api.gbif.org/v1/occurrence/counts/datasets?taxonKey=6 , this request doesn’t return anything.
>
>
>
> The GBIF developers will handle this issue in due time.
>
> You can follow the issue in our bug tracking service here: http://dev.gbif.org/issues/browse/POR-2828
>
>
>
>
>
> With best regards,
>
>
>
> Jan K. Legind
>
> Data manager, GBIF Secretariat
>
>
>
>
>
> From: API-users [mailto:api-users-bounces@lists.gbif.org] On Behalf Of Eduardo Dalcin
> Sent: 2. september 2015 20:06
> To: api-users@lists.gbif.org; dev@gbif.org
> Cc: João Monnerat Lanna; Natália Queiroz; Diogo Silva; Laura; Ricardo Avancini
> Subject: [API-users] Some questions from a begginer
>
>
>
> Hi folks,
>
>
>
> This is my first message to the list. So, please, be nice :)
>
>
>
> I'm working here at Rio de Janeiro Botanical Garden, together with the guys at the National Center for Flora Conservation. We are doing the risk assessment of the Brazilian flora to the government. We assess, so far, the risk of ca. 6.000 species, but we still have to assess ca. 35.000. Access occurrence records for Brazil is crucial, and every occurrence is important.
>
>
>
> That means that we have to put together occurrence data from different sources and, after the first batch of the risk assessment, we realize that we need to build up our aggregator. We are planning to do this with the Lontra-harvester, with the help of the guys at Brazilian GBIF Node.
>
>
>
> So, the one of the firsts steps was to list the available resources to understand the dimension of the task and, that brings me to my questions.
>
>
>
> First:
>
>
>
> The request:
>
>
>
> http://api.gbif.org/v1/occurrence/count?country=BR&taxonKey=6&basisOfRecord=PRESERVED_SPECIMEN
>
>
>
> returns 4.982.689 records
>
>
>
> And the request:
>
>
>
> http://api.gbif.org/v1/occurrence/counts/datasets?country=BR&taxonKey=6&basisOfRecord=PRESERVED_SPECIMEN
>
>
>
> returns (here) 7.406.310 records
>
>
>
> Comments?
>
>
>
> Second:
>
>
>
> The request:
>
>
>
> http://api.gbif.org/v1/occurrence/count?country=BR&taxonKey=6&basisOfRecord=PRESERVED_SPECIMEN
>
>
>
> return things like this:
>
>
>
> "197908d0-5565-11d8-b290-b8a03c50a862":27629
>
>
> But the consult of the same dataset:
>
>
>
> http://www.gbif.org/occurrence/search?TAXON_KEY=6&DATASET_KEY=197908d0-5565-11d8-b290-b8a03c50a862
>
>
>
> Returns "null" (of course, is a FishBase!)
>
>
>
> I have plenty of examples like this, on yellow here (not finished!):
>
>
>
> https://docs.google.com/spreadsheets/d/1msUjwMLoKwnXxJFzF20SeN_C65RIkGLbwaYyj459VTc/edit?usp=sharing
>
>
>
> Comments?
>
>
>
> I think those two questions is a good start. Please, let me know if I'm doing something wrong.
>
>
>
> Cheers,
>
>
>
> Eduardo
>
> --------------------------------
>
> Eduardo Dalcin
>
> Instituto de Pesquisas Jardim Botânico do Rio de Janeiro - JBRJ
>
> e-mail: edalcin@jbrj.gov.br
>
> Trabalho / Work: +55 21 3204 2116
>
> --------------------------------
>
> e-mail alternativo /  alternate email: edalcin@jbrj.org
>
> --------------------------------
>
> Agendar reunião / Schedule a meeting: http://agendar.dalc.in
>
>
>
>


_______________________________________________
API-users mailing list
API-users@lists.gbif.org
http://lists.gbif.org/mailman/listinfo/api-users


_______________________________________________
API-users mailing list
API-users@lists.gbif.org
http://lists.gbif.org/mailman/listinfo/api-users




--
Dr. Mauro J. Cavalcanti
E-mail: maurobio@gmail.com
Web: http://sites.google.com/site/maurobio