Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to contents

Project Status: Active – The project has reached a stable, usable state and is being actively developed. cran checks R-CMD-check real-requests codecov.io rstudio mirror downloads cran version DOI

rgbif is an R package which gives you access to GBIF mediated data via its REST API.

GBIF (the Global Biodiversity Information Facility) is an international network and data infrastructure funded by the world’s governments and aimed at providing anyone, anywhere, open access to data about all types of life on Earth.

Installation

install.packages("rgbif") # CRAN version
pak::pkg_install("ropensci/rgbif") # dev version
install.packages("rgbif", repos="https://dev.ropensci.org") # dev version

Getting Started

There are several long-form articles that can help get you started:

Most GBIF users are interested in getting lat-lon occurrence records.

occ_search(scientificName = "Pan troglodytes")
occ_data(scientificName = "Pan troglodytes")

It is usually better to get occurrence records using a taxonKey. See the article Working With Taxonomic Names.

taxonKey <- name_backbone("Pan troglodytes")$usageKey
occ_search(taxonKey = taxonKey)

GBIF strongly recommends the use of occ_download() rather than occ_search() for serious research projects. See article Getting Occurrence Data From GBIF.

It is required to set up your GBIF credentials to make downloads from GBIF.

occ_download(pred("taxonKey", 5219534)) # 5219534 is the taxonKey for Pan troglodytes

Citation

Under the terms of the GBIF data user agreement, users who download data agree to cite a DOI. Please see GBIF’s citation guidelines and Citing GBIF Mediated Data.

Please also cite rgbif by running citation(package = "rgbif").

Meta

  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for rgbif in R doing citation(package = 'rgbif')
  • Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

There are similar GBIF clients in other languages :

This package is part of spocc, along with several other packages, that provide access to occurrence records from multiple data sources.