Home

Awesome

gbifrb

gem version Ruby codecov.io

gbifrb is a low level client for the GBIF API

Other GBIF API clients:

Changes

For changes see the Changelog

API

Methods in relation to GBIF API routes

registry

species

occurrences

Install

Release version

gem install gbifrb

Development version

git clone git@github.com:sckott/gbifrb.git
cd gbifrb
rake install

Examples, in Ruby repl

Registry module

Nodes

require 'gbifrb'
registry = Gbif::Registry
registry.nodes(limit: 5)

Networks

registry.networks(uuid: '16ab5405-6c94-4189-ac71-16ca3b753df7')

Species module

GBIF backbone

species = Gbif::Species
species.name_backbone(name: "Helianthus")

Suggester

species.name_suggest(q: "Helianthus")

Lookup

species.name_lookup(q: "Helianthus")

Lookup example with more parameters: name usages of plants where accepted scientific name includes 'reptans':

species.name_lookup(q: 'reptans', higherTaxonKey: 6, nameType: 'SCIENTIFIC', status: 'ACCEPTED')

Name usage (/species)

species.name_usage(name: "Helianthus")

Name usage example with more parameters: name usages of 'Andropogon' in Database of Vascular Plants of Canada (VASCAN) checklist:

species.name_usage(name: 'Andropogon', datasetKey: '3f8a1297-3259-4700-91fc-acc4170b27ce')

Occurrences

occ = Gbif::Occurrences
occ.search(taxonKey: 3329049)
occ.search(taxonKey: 3329049, limit: 2)
occ.search(scientificName: 'Ursus americanus')

curl options

species = Gbif::Species
species.name_backbone("Helianthus", verbose: true)

Todo

Meta