CINXE.COM
<!DOCTYPE html> <!-- All GBIF mediated data is freely available through our APIs. https://www.gbif.org/developer/summary All GBIF source code is open source. https://github.com/gbif If your interest is the rendered HTML, then you might be developing a plugin. Let us know if you need custom markup, we would love to know what you are building. helpdesk@gbif.org --> <!--[if !IE]> --> <html lang="en" class="not_ie" ng-app="portal" > <!-- <![endif]--> <!--[if IE]> <html lang="en" class="ie" ng-app="portal"> <![endif]--> <head ng-controller="headCtrl as head"> <title ng-bind="head.getTitle('rgbif')">rgbif</title> <link rel="alternate" hreflang="en" href="https://www.gbif.org/tool/81747/rgbif" /> <link rel="alternate" hreflang="ar" href="https://www.gbif.org/ar/tool/81747/rgbif" /> <link rel="alternate" hreflang="zh" href="https://www.gbif.org/zh/tool/81747/rgbif" /> <link rel="alternate" hreflang="zh-tw" href="https://www.gbif.org/zh-tw/tool/81747/rgbif" /> <link rel="alternate" hreflang="pl" href="https://www.gbif.org/pl/tool/81747/rgbif" /> <link rel="alternate" hreflang="fr" href="https://www.gbif.org/fr/tool/81747/rgbif" /> <link rel="alternate" hreflang="ja" href="https://www.gbif.org/ja/tool/81747/rgbif" /> <link rel="alternate" hreflang="pt" href="https://www.gbif.org/pt/tool/81747/rgbif" /> <link rel="alternate" hreflang="ru" href="https://www.gbif.org/ru/tool/81747/rgbif" /> <link rel="alternate" hreflang="uk" href="https://www.gbif.org/uk/tool/81747/rgbif" /> <link rel="alternate" hreflang="es" href="https://www.gbif.org/es/tool/81747/rgbif" /> <link rel="alternate" hreflang="x-default" href="https://www.gbif.org/tool/81747/rgbif" /> <meta property="fb:app_id" content="1534726343485342" /> <meta property="og:title" content="rgbif" /> <meta property="og:url" content="https://www.gbif.org/tool/81747/rgbif" /> <meta property="og:description" content="An interface to the GBIF API for the R statistical programming environment" /> <meta property="og:image" content="http://api.gbif.org/v1/image/unsafe/1200x627/http%3A%2F%2Fimages.ctfassets.net%2Fuo17ejk9rkwj%2F7yLn4syTtFw1yHmbYz7Bju%2F9914d9ab4fc111ae08128617ab514eea%2Fhero-img-r-page3.png" /> <meta charset="UTF-8"> <!-- If IE use the latest rendering engine --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <!-- Set the page to the width of the device and set the zoom level --> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png"> <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/favicon-194x194.png" sizes="194x194"> <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192"> <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"> <link rel="manifest" href="/manifest.json"> <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#4c9e45"> <link rel="shortcut icon" href="/favicon.ico"> <meta name="msapplication-TileColor" content="#00a300"> <meta name="msapplication-TileImage" content="/mstile-144x144.png"> <meta name="theme-color" content="#4c9e45"> <link rel="stylesheet" type="text/css" href="/css/vendor/vendor.css?v=1741350459850"> <link rel="stylesheet" type="text/css" href="/css/base/shared/style/index.css?v=1741350459850"> <link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=PT+Serif:400i" rel="stylesheet"> <!--[if !IE]> --> <!-- <![endif]--> <!--[if IE]> <![endif]--> <!--[if lt IE 9]> <![endif]--> <script type="text/javascript"> if (/windows/i.test(navigator.userAgent)) { const style = document.createElement("style"); style.textContent = `@font-face { font-family: "Twemoji Country Flags"; unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F; src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2') format('woff2'); font-display: swap; }`; document.head.appendChild(style); } </script> <noscript> <style> body {display: block !important} .no-js-enabled {display: block !important} .no-js-enabled {position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(120,181,120,0.99);color:#fff;z-index:9999;text-align:center} .no-js-enabled span{position:relative;top: 50%;-ms-transform: translateY(-50%);transform: translateY(-50%);} </style> </noscript> <script defer data-domain="gbif.org" data-api="/spoor/api/event" src="/spoor/js/script.js"></script> <script> console.log(`%c ,_, (O,O) ( ) Powered by GBIF -"-"- All GBIF mediated data is freely available through our APIs. https://www.gbif.org/developer/summary All GBIF source code is open source. https://github.com/gbif If your interest is the rendered HTML, then you might be developing a plugin. Let us know if you need custom markup, we would love to know what you are building. helpdesk@gbif.org `, 'color: green; font-weight: bold;'); </script> </head> <body class=" env_prod " ng-init="portal.urlPrefix='';BUILD_VERSION=1741350459850" ng-class="{'hasDrawer': portal.getDrawer()}" ng-controller="portalCtrl as portal"> <noscript> <div class="no-js-enabled" style="display: none"><span>We鈥檙e sorry, but GBIF doesn鈥檛 work properly without JavaScript enabled.</span></div> <div class="ie-splash" style="display:none"><span>Our website has detected that you are using an outdated insecure browser that will prevent you from using the site. We suggest you upgrade to a modern browser.</span></div> </noscript> <div class="stickyNav rtl-supported" data-nosnippet ng-class="{'mobileMenu--active': nav.mobileMenuActive, 'mainMenu--firstLevelActive': nav.activeMenu, hasOffset: nav.scrollOffset > 0}" ng-controller="navCtrl as nav"> <div class="stickyNav__container"> <a ng-href="/" id="block-logo" class="gbif-logo"> <svg viewBox="90 239.1 539.7 523.9" xmlns="http://www.w3.org/2000/svg"> <path class="gbif-logo-svg" d="M325.5,495.4c0-89.7,43.8-167.4,174.2-167.4C499.6,417.9,440.5,495.4,325.5,495.4"/> <path class="gbif-logo-svg" d="M534.3,731c24.4,0,43.2-3.5,62.4-10.5c0-71-42.4-121.8-117.2-158.4c-57.2-28.7-127.7-43.6-192.1-43.6 c28.2-84.6,7.6-189.7-19.7-247.4c-30.3,60.4-49.2,164-20.1,248.3c-57.1,4.2-102.4,29.1-121.6,61.9c-1.4,2.5-4.4,7.8-2.6,8.8 c1.4,0.7,3.6-1.5,4.9-2.7c20.6-19.1,47.9-28.4,74.2-28.4c60.7,0,103.4,50.3,133.7,80.5C401.3,704.3,464.8,731.2,534.3,731"/> </svg> </a> <div class="stickyNav__actions"> <a href="" class="stickyNav__actions__action gb-icon-heartbeat stickyNav__actions__action--notification ng-cloak" ng-click="nav.toggleNotifications()" ng-if="nav.notifications.count > 0" ng-class="{'is-info': nav.notifications.severity == 'INFO'}"></a> <a href="" class="stickyNav__actions__action gb-icon-heartbeat" ng-href="{{ portal.urlPrefix }}/system-health" ng-if="!nav.notifications || nav.notifications.count == 0"></a> <a href="" class="stickyNav__actions__action gb-icon-translate" ng-click="nav.toggleLanguage()"></a> <a href="" class="stickyNav__actions__action gb-icon-search2" ng-click="nav.toggleSearch()"></a> <a href="" class="stickyNav__actions__action gb-icon-bubble" ng-click="nav.toggleFeedback()" ng-class="{'stickyNav__actions__action--notification': nav.commentCount}"></a> <a href="" class="stickyNav__actions__menu gb-icon-menu" ng-click="nav.toggleMobileMenu()" ng-class="{'gb-icon-close_L': nav.mobileMenuActive, 'gb-icon-menu': !nav.mobileMenuActive}"></a> <a class="stickyNav__actions__login" href="" ng-click="nav.toggleUserMenu()"> <span class="service-menu__button hoverBox"> <div class="inline-block"> <span class="ng-cloak">{{nav.loginGreeting}}</span> </div> </span> </a> </div> <div class="mainNavigation" ng-class="{'isActive': nav.mobileMenuActive}"> <nav class="mainMenu" click-outside="nav.toggleMenu()"> <ul> <li class="mainMenu--hasChild mainMenu__firstLevel " ng-class="{'mainMenu--childActive': nav.activeMenu == 'Get data'}" > <a class=" mainMenu__parentItem" href="" ng-click="nav.toggleMenu('Get data')" dir="auto">Get data</a> <ul class="mainMenu__childGroup"> <li class="mainMenu__columns"> <nav><h2></h2> <ul class="mainMenu__childItem"> <li > <a dir="auto" href="/occurrence/search">Occurrences </a> </li> <li > <a dir="auto" href="https://techdocs.gbif.org/">GBIF API <span class="gb-icon-link"></span> </a> </li> <li > <a dir="auto" href="/species/search">Species </a> </li> <li > <a dir="auto" href="/dataset/search">Datasets </a> </li> <li > <a dir="auto" href="/occurrence-snapshots">Occurrence snapshots </a> </li> <li > <a dir="auto" href="/hosted-portals">Hosted portals </a> </li> <li > <a dir="auto" href="/analytics/global">Trends </a> </li> </ul> </nav> </li> </ul> </li> <li class="mainMenu--hasChild mainMenu__firstLevel mainMenu--hasGrandChild >" ng-class="{'mainMenu--childActive': nav.activeMenu == 'How-to'}" > <a class=" mainMenu__parentItem" href="" ng-click="nav.toggleMenu('How-to')" dir="auto">How-to</a> <ul class="mainMenu__childGroup"> <li class="mainMenu__columns" > <nav><h2 dir="auto">Share data</h2> <ul class="mainMenu__childItem"> <li > <a href="/publishing-data" dir="auto">Quick-start guide </a> </li> <li > <a href="/dataset-classes" dir="auto">Dataset classes </a> </li> <li > <a href="/article/4qfLORxmM8kYOIwSYSMc2M/data-hosting" dir="auto">Data hosting </a> </li> <li > <a href="/standards" dir="auto">Standards </a> </li> <li > <a href="/become-a-publisher" dir="auto">Become a publisher </a> </li> <li > <a href="/data-quality-requirements" dir="auto">Data quality </a> </li> <li > <a href="/data-papers" dir="auto">Data papers </a> </li> </ul> </nav> </li> <li class="mainMenu__columns" > <nav><h2 dir="auto">Use data</h2> <ul class="mainMenu__childItem"> <li > <a href="/resource/search?contentType=dataUse" dir="auto">Featured data use </a> </li> <li > <a href="/citation-guidelines" dir="auto">Citation guidelines </a> </li> <li > <a href="/resource/search?contentType=literature" dir="auto">GBIF citations </a> </li> <li > <a href="/article/1E6v02SFQyhupvB7JqDXPN" dir="auto">Citation widget </a> </li> <li > <a href="/composition/3NZQV4dMHw154WEwu4TqDw" dir="auto">Guides and documentation </a> </li> </ul> </nav> </li> </ul> </li> <li class="mainMenu--hasChild mainMenu__firstLevel mainMenu--hasGrandChild >" ng-class="{'mainMenu--childActive': nav.activeMenu == 'Tools'}" > <a class=" mainMenu__parentItem" href="" ng-click="nav.toggleMenu('Tools')" dir="auto">Tools</a> <ul class="mainMenu__childGroup"> <li class="mainMenu__columns" > <nav><h2 dir="auto">Publishing</h2> <ul class="mainMenu__childItem"> <li > <a href="/ipt" dir="auto">IPT </a> </li> <li > <a href="/tools/data-validator" dir="auto">Data validator </a> </li> <li > <a href="https://geopick.gbif.org/" dir="auto">GeoPick <span class="gb-icon-link"></span> </a> </li> <li > <a href="/composition/HjlTr705BctcnaZkcjRJq/data-model" dir="auto">New data model </a> </li> <li > <a href="https://scientific-collections.gbif.org/" dir="auto">GRSciColl <span class="gb-icon-link"></span> </a> </li> <li > <a href="/suggest-dataset" dir="auto">Suggest a dataset </a> </li> <li > <a href="https://mdt.gbif-uat.org" dir="auto">Metabarcoding data toolkit <span class="gb-icon-link"></span> </a> </li> </ul> </nav> </li> <li class="mainMenu__columns" > <nav><h2 dir="auto">Data access and use</h2> <ul class="mainMenu__childItem"> <li > <a href="/hosted-portals" dir="auto">Hosted portals </a> </li> <li > <a href="/composition/3wT2HU1DKaJij0uKw8hj35/" dir="auto">Scientific collections </a> </li> <li > <a href="/data-processing" dir="auto">Data processing </a> </li> <li > <a href="/derived-dataset/about" dir="auto">Derived datasets </a> </li> <li > <a href="/tool/81747" dir="auto">rgbif </a> </li> <li > <a href="/tool/OlyoYyRbKCSCkMKIi4oIT/pygbif-gbif-python-client" dir="auto">pygbif </a> </li> <li > <a href="/tool/81279" dir="auto">MAXENT </a> </li> <li > <a href="/resource/search?contentType=tool" dir="auto">Tools catalogue </a> </li> </ul> </nav> </li> <li class="mainMenu__columns" > <nav><h2 dir="auto">GBIF labs</h2> <ul class="mainMenu__childItem"> <li > <a href="/tools/species-lookup" dir="auto">Species matching </a> </li> <li > <a href="/tools/name-parser" dir="auto">Name parser </a> </li> <li > <a href="/tools/sequence-id" dir="auto">Sequence ID </a> </li> <li > <a href="/tools/observation-trends" dir="auto">Relative observation trends </a> </li> <li > <a href="https://data-blog.gbif.org/" dir="auto">GBIF data blog <span class="gb-icon-link"></span> </a> </li> </ul> </nav> </li> </ul> </li> <li class="mainMenu--hasChild mainMenu__firstLevel mainMenu--hasGrandChild >" ng-class="{'mainMenu--childActive': nav.activeMenu == 'Community'}" > <a class=" mainMenu__parentItem" href="" ng-click="nav.toggleMenu('Community')" dir="auto">Community</a> <ul class="mainMenu__childGroup"> <li class="mainMenu__columns" > <nav><h2 dir="auto">Network</h2> <ul class="mainMenu__childItem"> <li > <a href="/the-gbif-network" dir="auto">Participant network </a> </li> <li > <a href="/composition/1aKAxGBtIAQwiEBzUjz9q6" dir="auto">Nodes </a> </li> <li > <a href="/publisher/search" dir="auto">Publishers </a> </li> <li > <a href="/contact-us/directory?group=nsg" dir="auto">Network contacts </a> </li> <li > <a href="https://discourse.gbif.org/" dir="auto">Community forum <span class="gb-icon-link"></span> </a> </li> <li > <a href="https://www.allianceforbio.org" dir="auto">alliance for biodiversity knowledge <span class="gb-icon-link"></span> </a> </li> </ul> </nav> </li> <li class="mainMenu__columns" > <nav><h2 dir="auto">Volunteers</h2> <ul class="mainMenu__childItem"> <li > <a href="/mentors" dir="auto">Mentors </a> </li> <li > <a href="/composition/6iHKXo8pUyRPJ2Ut0683Z8/" dir="auto">Ambassadors </a> </li> <li > <a href="/translators" dir="auto">Translators </a> </li> <li > <a href="/citizen-science" dir="auto">Citizen scientists </a> </li> </ul> </nav> </li> <li class="mainMenu__columns" > <nav><h2 dir="auto">Activities</h2> <ul class="mainMenu__childItem"> <li > <a href="/composition/5DQRFjEUUvcLx0Kk7Wgn6u" dir="auto">Capacity development </a> </li> <li > <a href="/composition/sogjffeR223qaLPROdpoF/" dir="auto">Programmes & projects </a> </li> <li > <a href="/training" dir="auto">Training and learning resources </a> </li> <li > <a href="/data-use-club" dir="auto">Data Use Club </a> </li> <li > <a href="http://living-atlases.gbif.org/" dir="auto">Living Atlases <span class="gb-icon-link"></span> </a> </li> </ul> </nav> </li> </ul> </li> <li class="mainMenu--hasChild mainMenu__firstLevel mainMenu--hasGrandChild >" ng-class="{'mainMenu--childActive': nav.activeMenu == 'About'}" > <a class=" mainMenu__parentItem" href="" ng-click="nav.toggleMenu('About')" dir="auto">About</a> <ul class="mainMenu__childGroup"> <li class="mainMenu__columns" > <nav><h2 dir="auto">Inside GBIF</h2> <ul class="mainMenu__childItem"> <li > <a href="/what-is-gbif" dir="auto">What is GBIF? </a> </li> <li > <a href="/become-member" dir="auto">Become a member </a> </li> <li > <a href="/governance" dir="auto">Governance </a> </li> <li > <a href="/strategic-plan" dir="auto">Strategic framework </a> </li> <li > <a href="https://docs.gbif.org/2025-work-programme/en/" dir="auto">Work Programme <span class="gb-icon-link"></span> </a> </li> <li > <a href="/funders" dir="auto">Funders </a> </li> <li > <a href="/partners" dir="auto">Partnerships </a> </li> <li > <a href="/release-notes" dir="auto">Release notes </a> </li> <li > <a href="/contact-us" dir="auto">Contacts </a> </li> </ul> </nav> </li> <li class="mainMenu__columns" > <nav><h2 dir="auto">News & outreach</h2> <ul class="mainMenu__childItem"> <li > <a href="/resource/search?contentType=news" dir="auto">News </a> </li> <li > <a href="/subscribe" dir="auto">Subscribe </a> </li> <li > <a href="/resource/search?contentType=event" dir="auto">Events </a> </li> <li > <a href="/awards" dir="auto">Awards </a> </li> <li > <a href="/science-review" dir="auto">Science Review </a> </li> <li > <a href="/data-use" dir="auto">Data use </a> </li> </ul> </nav> </li> </ul> </li> <li class="mainMenu__firstLevel hide-on-laptop"> <a class="mainMenu__parentItem" dir="auto" href="/user/profile"><span translate="profile.userProfile">User profile</span> <span ng-bind="nav.loginGreeting" class="mainMenu__greenText m-l-1"></span></a> </li> </ul> </nav> </div> </div> </div> <div id="site-wrapper" class="site-wrapper"> <div feedback data-nosnippet></div> <div notifications data-nosnippet></div> <div user-menu data-nosnippet></div> <div menu-search data-nosnippet></div> <div language-menu data-nosnippet></div> <main id="main" class="main" role="main" ui-view> <div class="site-content"> <div class="fab" fab> <div class="fab__trigger"> <a href="" class="action-flow btn btn-lg btn-highlight btn-circle" tooltip="Share"><i class="gb-icon-share"></i></a> </div> <ul class="fab__options"> <li> <a href="https://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.gbif.org/%2Ftool%2F81747%2Frgbif" onclick="window.open('https://www.facebook.com/sharer.php?u=https%3A%2F%2Fwww.gbif.org/%2Ftool%2F81747%2Frgbif', 'newwindow', 'width=600, height=350'); return false;" class="action-flow btn btn-lg btn-highlight btn-circle" tooltip="facebook"> <i class="gb-icon-facebook"></i> </a> </li> <li> <a href="https://twitter.com/intent/tweet?text=rgbif" onclick="window.open('https://twitter.com/intent/tweet?text=rgbif', 'newwindow', 'width=600, height=350'); return false;" class="action-flow btn btn-lg btn-highlight btn-circle" tooltip="twitter"> <i class="gb-icon-twitter"></i> </a> </li> <li> <a href="https://www.linkedin.com/shareArticle?mini=true&url=https://www.gbif.org/%2Ftool%2F81747%2Frgbif" onclick="window.open('https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.gbif.org/%2Ftool%2F81747%2Frgbif', 'newwindow', 'width=600, height=350'); return false;" class="action-flow btn btn-lg btn-highlight btn-circle" tooltip="linkedin"> <i class="gb-icon-linkedin"></i> </a> </li> </ul> </div> <div class="site-content__page"> <div> <div> <article class="wrapper-horizontal-stripes white-background"> <div class="horizontal-stripe article-header white-background"> <div class="container--desktop"> <div class="row"> <header class="col-xs-12 text-center"> <nav class="article-header__category article-header__category--deep"> <span class="article-header__category__upper"><a href="/resource/search?contentType=tool">Tool</a></span> <span class="article-header__category__lower">3 November 2016</span> </nav> <h1 dir="auto">rgbif </h1> <div class="article-header__intro" dir="auto"> <p>An interface to the GBIF API for the R statistical programming environment</p> </div> <div class="article-header__button" dir="auto"> <a href="https://CRAN.R-project.org/package=rgbif" class="gb-button--discreet small">rgbif homepage</a> </div> </header> </div> </div> </div> <div class="horizontal-stripe--paddingless white-background"> <figure class="heading-image"> <div class="cover-image"> <img ng-src="//api.gbif.org/v1/image/unsafe/1170x422/http:%2F%2Fimages.ctfassets.net%2Fuo17ejk9rkwj%2F7yLn4syTtFw1yHmbYz7Bju%2F9914d9ab4fc111ae08128617ab514eea%2Fhero-img-r-page3.png" alt="rgbif-bg" gallery-image> </div> <figcaption class="container--narrow" dir="auto"> </figcaption> </figure> </div> <div class="horizontal-stripe white-background"> <div class="container--narrow"> <div class="body-text--markdown" dir="auto"> <p>rgbif聽is an R package from聽<a href="https://ropensci.org/">rOpenSci</a>聽that allows聽searching and retrieving聽data from GBIF.聽rgbif聽wraps R code around the聽<a href="/developer/summary">GBIF API</a>聽to allow you to talk to GBIF from R and access聽metadata, species names, and occurrences.</p> <p>Installing the package in R is simple:</p> <p><code>> install.packages("rgbif")</code></p> <p>Once installed,聽rgbif allows you to easily</p> <ul> <li>get data for single occurrences</li> <li>retrieve multiple occurences</li> <li>search for taxon names</li> <li>generate maps of occurences<a name="citations"></a></li> </ul> <p>Full functionality is聽described in the <a href="https://docs.ropensci.org/rgbif/">rgbif tutorial</a>. 聽The rgbif package is also part of the聽<a href="https://github.com/ropensci/spocc">SPOCC Species Occurrence Data</a>聽suite, that provides access to occurrence records from multiple databases.</p> <h3 id="_citing-data-retrieved-via-rgbif">Citing data retrieved via rgbif</h3> <blockquote> <p><strong>Note</strong>: GBIF recommends using a <a href="/citation-guidelines#derivedDatasets">derived dataset</a> for citing data obtained using synchronous API calls as used by rgbif in <em>occ_data()</em> and <em>occ_search()</em>.</p> </blockquote> <p>For data obtained using the <em>occ_download()</em> routes, <em>gbif_citation()</em> can be used to retrieve the DOI.</p> <p>The <strong>rgbif</strong> library includes a function, <em>gbif_citation()</em>, that will help you properly cite the data downloaded from GBIF. To use, simply pass either a single occurrence key, a dataset key, or the results of a call to the <em>occ_download_get</em> functions.</p> <p>Examples:</p> <h5 id="_write-csv-file-containing-summary-of-datasets-to-use-with-the-derived-dataset-tool">Write CSV file containing summary of datasets to use with the <a href="/derived-dataset/register">Derived Dataset tool</a></h5> <pre><code>> myData<-occ_data(taxonKey=10709636) > datasetCounts<-myData$data %>% count(datasetKey, sort=TRUE) > write.table(datasetCounts, "~/derivedDatasetCounts.txt",col.names=FALSE, row.names=FALSE,sep=",") </code></pre> <h5 id="_get-citation-for-a-single-occurrence-passing-the-occurrence-key-as-an-argument">Get citation for a single occurrence, passing the occurrence key as an argument</h5> <pre><code>> gbif_citation(x=1265576727) <<rgbif citation>> Citation: iNaturalist.org (2017). iNaturalist Research-grade Observations. Occurrence Dataset https://doi.org/10.15468/ab3s5x accessed via GBIF.org on 2017-10-25.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2017-10-25 Rights: </code></pre> <h5 id="_get-citation-for-a-dataset-passing-the-dataset-key-as-an-argument">Get citation for a dataset, passing the dataset key as an argument</h5> <pre><code>> gbif_citation(x='d52d01f6-7472-4dbf-9ea8-a33c343255ac') <<rgbif citation>> Citation: Moeslund J E (2016). Vegetation data from protected areas in Denmark (搂 3 in the Danish Nature Protection Act). Version 8.1. Department of Bioscience, Aarhus University. Occurrence Dataset https://doi.org/10.15468/ar7pbr accessed via GBIF.org on 2017-10-25.. Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2017-10-25 Rights: </code></pre> <h5 id="_get-citation-for-asynchronous-downloads-passing-the-results-of-a-call-to-the-occ_download_get-function">Get citation for asynchronous downloads, passing the results of a call to the <em>occ_download_get</em> function:</h5> <pre><code>> my_download<-occ_download_get("0005737-171002173027117",overwrite=TRUE) Download file size: 0.26 MB On disk at /tmp/0005737-171002173027117.zip > gbif_citation(my_download) $download [1] "GBIF Occurrence Download https://doi.org/10.15468/dl.j0ehrr Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2017-10-18" ... </code></pre> <p>This response will also include individual citations of contributing datasets, however, the above citation containing the DOI will include references to each of these including information about which specific occurrences were included in the download.</p> <h5 id="_get-citation-for-downloads-passing-the-results-of-a-call-to-the-occ_download_meta-function">Get citation for downloads, passing the results of a call to the <em>occ_download_meta</em> function:</h5> <pre><code>> my_download_metadata<-occ_download_meta("0005737-171002173027117") > gbif_citation(my_download_metadata) $download [1] "GBIF Occurrence Download https://doi.org/10.15468/dl.j0ehrr Accessed from R via rgbif (https://github.com/ropensci/rgbif) on 2017-10-18" ... </code></pre> </div> <div class="article-auxiliary prose-columns smaller"> <div> <section class="no-break"> <h3 translate="cms.auxiliary.citation"></h3> <p>Scott Chamberlain (2017). rgbif: Interface to the Global 'Biodiversity' Information Facility 'API'. R package version 0.9.8. <a href="https://CRAN.R-project.org/package=rgbif">https://CRAN.R-project.org/package=rgbif</a></p> </section> </div> </div> </div> </div> </article> </div> </div> </div> </div> </main> <footer class="site-footer wrapper-horizontal-stripes" data-nosnippet> <div class="horizontal-stripe light-background site-footer__upper"> <div class="container--normal"> <nav class="site-footer__menu"> <div> <a href="/what-is-gbif">What is GBIF?</a> <a href="/developer/summary">API</a> <a href="/faq">FAQ</a> <a href="/newsletters">Newsletter</a> <a href="/terms/privacy-policy">Privacy</a> <a href="/terms">Terms and agreements</a> <a href="/citation-guidelines">Citation</a> <a href="/code-of-conduct">Code of Conduct</a> <a href="/acknowledgements">Acknowledgements</a> </div> <div> <a href="/contact-us">Contact</a> <span> <span href=""><span>GBIF Secretariat </span>Universitetsparken 15</span> <span href="">DK-2100 Copenhagen 脴</span> <span href="">Denmark</span> </span> </div> </nav> </div> </div> <div class="horizontal-stripe site-footer__gbc p-t-1 p-b-1" style="background: #5b5b5b;"> <div class="container--normal"> <nav class="site-footer__menu"> <div style="margin: 0;"> <a href="/news/6PHdgoyIF6RmI7u4VOouuD"> <img src="/img/gbc.svg" style="max-height: 40px; padding: 0 24px;" /> <span style="font-weight: 500;">GBIF</span> <span> is a Global Core Biodata Resource</span> </a> </div> </nav> </div> </div> <div class="horizontal-stripe site-footer__lower"> <div class="container--normal text-center"> <div class="site-footer__social"> <a href="https://www.facebook.com/gbifnews" class="btn btn-lg btn-circle"><i class="gb-icon-facebook"></i></a> <a href="https://biodiversity.social/@gbif" rel="me" class="btn btn-lg btn-circle"><i class="gb-icon-mastodon"></i></a> <a href="https://twitter.com/GBIF" class="btn btn-lg btn-circle"><i class="gb-icon-twitter"></i></a> <a href="https://www.linkedin.com/company/gbif" class="btn btn-lg btn-circle"><i class="gb-icon-linkedin"></i></a> <a href="https://www.youtube.com/user/GBIFvideo" class="btn btn-lg btn-circle"><i class="gb-icon-youtube"></i></a> <a href="https://vimeo.com/gbif" class="btn btn-lg btn-circle"><i class="gb-icon-vimeo"></i></a> <a href="https://www.instagram.com/gbifs/" class="btn btn-lg btn-circle"><i class="gb-icon-instagram"></i></a> </div> </div> </div> <div class="horizontal-stripe site-footer__bottom"> <div class="container--normal text-center"> <img src="/img/full_logo_white.svg"> </div> </div> </footer> <div gdpr data-nosnippet></div> </div> <div gb-help-overlay data-nosnippet></div> <script type="text/ng-template" id="dropdown.html"> <a href="" dir="auto"> <span ng-bind-html="match.label | uibTypeaheadHighlight:query"></span> </a> </script> <script> window.gb = window.gb || {}; window.gb.locale = 'en'; window.gb.urlPrefix = ''; window.gb.buildVersion = '1741350459850'; </script> <script src="/js/environment.js?v=1741350459850"></script> <script src="/js/base/vendor.js?v=1741350459850"></script> <script src="/js/base/custom.js?v=1741350459850"></script> </body> </html>