[API-users] Changes in GBIF.org and API

Mauro Cavalcanti maurobio at gmail.com
Thu Sep 1 16:16:22 CEST 2016


Here is how to achieve this using Python/pygbif (what else? ;-))

from pprint import pprint
from pygbif import species, occurrences

taxon_name = "Plantae" # a kingdom level taxon
taxon_rank = "kingdom"

key = species.name_backbone(name=taxon_name, rank=taxon_rank)["usageKey"]
n = occurrences.count(taxonKey=key, isGeoreferenced=True)
print format(n, ','), " record(s) for ", taxon_name

max = 5 # maximum number of records to retrieve
results = occurrences.search(taxonKey=key,
basisOfRecord="PRESERVED_SPECIMEN", hasCoordinate=True, limit=max)
for x in results["results"]:
    print pprint(x) # results are returned in JSON format

Hope it helps.

Salud!

2016-09-01 10:28 GMT-03:00 Eduardo Dalcin <edalcin at jbrj.org>:

> Oops: http://www.gbif.org/occurrence/search?taxon_key=
> Plantae&basis_of_record=PRESERVED_SPECIMEN
>
>
> --------------------------------
> *Eduardo Dalcin <http://eduardo.dalc.in>*
> Instituto de Pesquisas Jardim Botânico do Rio de Janeiro - JBRJ
> Diretoria de Pesquisas
> e-mail: edalcin at jbrj.org
> Trabalho / Work: +55 21 3204 2116
> WhatsApp / Telegram: +55 21 98393 3344
> Portal de Dados do JBRJ/DIPEQ <http://dados.jbrj.gov.br/>
> --------------------------------
>
> On Thu, Sep 1, 2016 at 10:27 AM, Eduardo Dalcin <edalcin at jbrj.org> wrote:
>
>> That's it! Thanks!
>>
>> I don't get this:
>> [image: Inline image 1]
>>
>>
>> --------------------------------
>> *Eduardo Dalcin <http://eduardo.dalc.in>*
>> Instituto de Pesquisas Jardim Botânico do Rio de Janeiro - JBRJ
>> Diretoria de Pesquisas
>> e-mail: edalcin at jbrj.org
>> Trabalho / Work: +55 21 3204 2116
>> WhatsApp / Telegram: +55 21 98393 3344
>> Portal de Dados do JBRJ/DIPEQ <http://dados.jbrj.gov.br/>
>> --------------------------------
>>
>> On Thu, Sep 1, 2016 at 10:23 AM, Tim Robertson <trobertson at gbif.org>
>> wrote:
>>
>>> Thanks Eduardo.
>>>
>>> No, you can type “Plantae” or any higher taxa in the scientific name
>>> filter and it will assist with autocompletion.
>>>
>>> I hope this helps,
>>> Tim
>>>
>>>
>>>
>>>
>>> From: Eduardo Dalcin <edalcin at jbrj.org>
>>> Date: Thursday 1 September 2016 at 15:19
>>>
>>> To: Tim Robertson <trobertson at gbif.org>
>>> Cc: "api-users at lists.gbif.org" <api-users at lists.gbif.org>
>>> Subject: Re: [API-users] Changes in GBIF.org and API
>>>
>>> Hi Tim, Thanks for the prompt reply. Yes, I'm aware of the KEY
>>> parameter. My comment is that at the filter, for humans that are not aware
>>> of those "obscure codes", still no way to select upper taxonomic ranks but
>>> species, through scientific name. Am I right?
>>>
>>> Eduardo
>>>
>>>
>>> --------------------------------
>>> *Eduardo Dalcin <http://eduardo.dalc.in>*
>>> Instituto de Pesquisas Jardim Botânico do Rio de Janeiro - JBRJ
>>> Diretoria de Pesquisas
>>> e-mail: edalcin at jbrj.org
>>> Trabalho / Work: +55 21 3204 2116
>>> WhatsApp / Telegram: +55 21 98393 3344
>>> Portal de Dados do JBRJ/DIPEQ <http://dados.jbrj.gov.br/>
>>> --------------------------------
>>>
>>> On Thu, Sep 1, 2016 at 10:12 AM, Tim Robertson <trobertson at gbif.org>
>>> wrote:
>>>
>>>> Hi Eduardo,
>>>>
>>>> I hope you are well.  I’m not sure I understand your comment I’m
>>>> afraid.
>>>> Taxonomic filters have been working in GBIF since 2007 and they can be
>>>> combined with any other filters.  They are the most used search filters,
>>>> which all species pages link to.
>>>>
>>>> Plants:  http://www.gbif.org/occurrence/search?TAXON_KEY=6  or
>>>> http://api.gbif.org/v1/occurrence/search?TAXON_KEY=6
>>>> Animals: http://www.gbif.org/occurrence/search?TAXON_KEY=1  or
>>>> http://api.gbif.org/v1/occurrence/search?TAXON_KEY=1
>>>>
>>>> I presume you mean something else though - can you please explain and
>>>> I’ll try and help?
>>>>
>>>> Thanks,
>>>> Tim
>>>>
>>>>
>>>>
>>>> From: Eduardo Dalcin <edalcin at jbrj.org>
>>>> Date: Thursday 1 September 2016 at 14:55
>>>> To: Tim Robertson <trobertson at gbif.org>
>>>> Cc: "api-users at lists.gbif.org" <api-users at lists.gbif.org>
>>>> Subject: Re: [API-users] Changes in GBIF.org and API
>>>>
>>>> Congrats folks! Great job!
>>>>
>>>> Still no way to separate plants of animals, or I missing something?
>>>>
>>>> Cheers
>>>>
>>>> Eduardo
>>>>
>>>>
>>>> --------------------------------
>>>> *Eduardo Dalcin <http://eduardo.dalc.in>*
>>>> Instituto de Pesquisas Jardim Botânico do Rio de Janeiro - JBRJ
>>>> Diretoria de Pesquisas
>>>> e-mail: edalcin at jbrj.org
>>>> Trabalho / Work: +55 21 3204 2116
>>>> WhatsApp / Telegram: +55 21 98393 3344
>>>> Portal de Dados do JBRJ/DIPEQ <http://dados.jbrj.gov.br/>
>>>> --------------------------------
>>>>
>>>> On Thu, Sep 1, 2016 at 8:55 AM, Tim Robertson <trobertson at gbif.org>
>>>> wrote:
>>>>
>>>>> Hi folks,
>>>>>
>>>>> I am very happy to let you know that a new release of GBIF.org went
>>>>> online at lunchtime today with the following enhancements:
>>>>>
>>>>> *Occurrence search (http://www.gbif.org/occurrence/search
>>>>> <http://www.gbif.org/occurrence/search>):*
>>>>>
>>>>>    - New locality based filters:
>>>>>       - locality, province/state and water body
>>>>>       - These are not interpreted terms, but allow search based on
>>>>>       what publishers state
>>>>>       - http://www.gbif.org/occurrence/search?STATE_PROVINCE=Califor
>>>>>       nia
>>>>>       - http://www.gbif.org/occurrence/search?WATER_BODY=AMAZONAS+BA
>>>>>       SIN%2C+RIO+JURUA
>>>>>    - A new organismID filter
>>>>>       - http://www.gbif.org/occurrence/search?ORGANISM_ID=100
>>>>>    - Publishing protocol filter
>>>>>       - http://www.gbif.org/occurrence/search?PROTOCOL=TAPIR
>>>>>    - License filter and facet:
>>>>>       - http://www.gbif.org/occurrence/search?license=CC_BY_4_0
>>>>>    - The occurrence API supports all the filters mentioned above with
>>>>>    the addition of also allowing search by publishing organisation
>>>>>
>>>>> *Occurrence downloads*:
>>>>>
>>>>>    - The rights.txt file: has been changed to list all the licenses
>>>>>    of datasets included in that download.
>>>>>    - DwC-A based downloads and the Datacite metada (DOIs) use the
>>>>>    most restrictive license of the datasets included in the download
>>>>>    defaulting to CC-BY.
>>>>>    - The CSV downloads contain a new column ‘*License*’.
>>>>>
>>>>> The *Dataset search page* now supports faceted navigation by license:
>>>>> http://www.gbif.org/dataset/search?license=CC_BY_4_0
>>>>>
>>>>> In the release, we have temporarily broken the “*repatriation*”
>>>>> filter which is being re-enabled now, and will be online again tomorrow.
>>>>> Sorry about this partial outage of that search term.
>>>>>
>>>>> Many thanks,
>>>>> Tim
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> API-users mailing list
>>>>> API-users at lists.gbif.org
>>>>> http://lists.gbif.org/mailman/listinfo/api-users
>>>>>
>>>>>
>>>>
>>>
>>
>
> _______________________________________________
> API-users mailing list
> API-users at lists.gbif.org
> http://lists.gbif.org/mailman/listinfo/api-users
>
>


-- 
Dr. Mauro J. Cavalcanti
E-mail: maurobio at gmail.com
Web: http://sites.google.com/site/maurobio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gbif.org/pipermail/api-users/attachments/20160901/7bfc2bb3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 6984 bytes
Desc: not available
URL: <http://lists.gbif.org/pipermail/api-users/attachments/20160901/7bfc2bb3/attachment-0001.png>


More information about the API-users mailing list