spocc = SPecies OCCurrence data

At rOpenSci, we have been writing R packages to interact with many sources of species occurrence data, including GBIF, Vertnet, BISON, iNaturalist, the Berkeley ecoengine, and eBird. Other databases are out there as well, which we can pull in. spocc is an R package to query and collect species occurrence data from many sources. The goal is to to create a seamless search experience across data sources, as well as creating unified outputs across data sources.

spocc currently interfaces with nine major biodiversity repositories

  1. Global Biodiversity Information Facility (GBIF) (via rgbif) GBIF is a government funded open data repository with several partner organizations with the express goal of providing access to data on Earth’s biodiversity. The data are made available by a network of member nodes, coordinating information from various participant organizations and government agencies.

  2. Berkeley Ecoengine (via ecoengine) The ecoengine is an open API built by the Berkeley Initiative for Global Change Biology. The repository provides access to over 3 million specimens from various Berkeley natural history museums. These data span more than a century and provide access to georeferenced specimens, species checklists, photographs, vegetation surveys and resurveys and a variety of measurements from environmental sensors located at reserves across University of California’s natural reserve system.

  3. iNaturalist iNaturalist provides access to crowd sourced citizen science data on species observations.

  4. VertNet (via rvertnet) Similar to rgbif, ecoengine, and rbison (see below), VertNet provides access to more than 80 million vertebrate records spanning a large number of institutions and museums primarly covering four major disciplines (mammology, herpetology, ornithology, and icthyology). Note that we don’t currenlty support VertNet data in this package, but we should soon

  5. Biodiversity Information Serving Our Nation (via rbison) Built by the US Geological Survey’s core science analytic team, BISON is a portal that provides access to species occurrence data from several participating institutions.

  6. eBird (via rebird) ebird is a database developed and maintained by the Cornell Lab of Ornithology and the National Audubon Society. It provides real-time access to checklist data, data on bird abundance and distribution, and communtiy reports from birders.

  7. iDigBio (via ridigbio) iDigBio facilitates the digitization of biological and paleobiological specimens and their associated data, and houses specimen data, as well as providing their specimen data via RESTful web services.

  8. OBIS OBIS (Ocean Biogeographic Information System) allows users to search marine species datasets from all of the world’s oceans.

  9. Atlas of Living Australia ALA (Atlas of Living Australia) contains information on all the known species in Australia aggregated from a wide range of data providers: museums, herbaria, community groups, government departments, individuals and universities; it contains more than 50 million occurrence records.

The inspiration for this comes from users requesting a more seamless experience across data sources, and from our work on a similar package for taxonomy data (taxize).

BEWARE: In cases where you request data from multiple providers, especially when including GBIF, there could be duplicate records since many providers’ data eventually ends up with GBIF. See ?spocc_duplicates, after installation, for more.

Learn more

Contributing

See CONTRIBUTING.md

Installation

Stable version from CRAN

install.packages("spocc", dependencies = TRUE)

Or the development version from GitHub

install.packages("devtools")
devtools::install_github("ropensci/spocc")
library("spocc")

Pass options to each data source

Get fine-grained detail over each data source by passing on parameters to the packge rebird in this example.

Get just gbif data

out$gbif
#> Species [Setophaga caerulescens (500)] 
#> First 10 rows of [Setophaga_caerulescens]
#> 
#> # A tibble: 500 x 99
#>    name  longitude latitude prov  issues key   scientificName datasetKey
#>    <chr>     <dbl>    <dbl> <chr> <chr>  <chr> <chr>          <chr>     
#>  1 Seto…     -80.3     25.8 gbif  cdrou… 2006… Setophaga cae… 50c9509d-…
#>  2 Seto…     -80.2     25.4 gbif  gass84 2006… Setophaga cae… 50c9509d-…
#>  3 Seto…     -80.2     25.8 gbif  cdrou… 2013… Setophaga cae… 50c9509d-…
#>  4 Seto…     -80.4     25.2 gbif  cdrou… 2235… Setophaga cae… 50c9509d-…
#>  5 Seto…     -80.3     25.7 gbif  cdrou… 2028… Setophaga cae… 50c9509d-…
#>  6 Seto…     -80.2     25.8 gbif  gass84 2013… Setophaga cae… 50c9509d-…
#>  7 Seto…     -79.1     35.9 gbif  cdrou… 2237… Setophaga cae… 50c9509d-…
#>  8 Seto…     -80.6     28.1 gbif  cdrou… 2238… Setophaga cae… 50c9509d-…
#>  9 Seto…     -80.2     26.5 gbif  cdrou… 2238… Setophaga cae… 50c9509d-…
#> 10 Seto…     -78.5     38.0 gbif  cdrou… 2242… Setophaga cae… 50c9509d-…
#> # … with 490 more rows, and 91 more variables: publishingOrgKey <chr>,
#> #   networkKeys <list>, installationKey <chr>, publishingCountry <chr>,
#> #   protocol <chr>, lastCrawled <chr>, lastParsed <chr>, crawlId <int>,
#> #   basisOfRecord <chr>, taxonKey <int>, kingdomKey <int>,
#> #   phylumKey <int>, classKey <int>, orderKey <int>, familyKey <int>,
#> #   genusKey <int>, speciesKey <int>, acceptedTaxonKey <int>,
#> #   acceptedScientificName <chr>, kingdom <chr>, phylum <chr>,
#> #   order <chr>, family <chr>, genus <chr>, species <chr>,
#> #   genericName <chr>, specificEpithet <chr>, taxonRank <chr>,
#> #   taxonomicStatus <chr>, dateIdentified <chr>,
#> #   coordinateUncertaintyInMeters <dbl>, stateProvince <chr>, year <int>,
#> #   month <int>, day <int>, eventDate <date>, modified <chr>,
#> #   lastInterpreted <chr>, references <chr>, license <chr>,
#> #   geodeticDatum <chr>, class <chr>, countryCode <chr>, country <chr>,
#> #   rightsHolder <chr>, identifier <chr>, `http://unknown.org/nick` <chr>,
#> #   verbatimEventDate <chr>, datasetName <chr>, collectionCode <chr>,
#> #   gbifID <chr>, verbatimLocality <chr>, occurrenceID <chr>,
#> #   taxonID <chr>, catalogNumber <chr>, recordedBy <chr>,
#> #   `http://unknown.org/occurrenceDetails` <chr>, institutionCode <chr>,
#> #   rights <chr>, eventTime <chr>, identificationID <chr>,
#> #   occurrenceRemarks <chr>, informationWithheld <chr>, sex <chr>,
#> #   infraspecificEpithet <chr>, continent <chr>, institutionID <chr>,
#> #   county <chr>, language <chr>, type <chr>, preparations <chr>,
#> #   verbatimElevation <chr>, recordNumber <chr>, higherGeography <chr>,
#> #   nomenclaturalCode <chr>, dataGeneralizations <chr>, locality <chr>,
#> #   organismID <chr>, startDayOfYear <chr>, ownerInstitutionCode <chr>,
#> #   datasetID <chr>, accessRights <chr>, collectionID <chr>,
#> #   higherClassification <chr>,
#> #   `http://unknown.org/recordedByOrcid` <chr>, vernacularName <chr>,
#> #   fieldNotes <chr>, behavior <chr>, associatedTaxa <chr>,
#> #   identificationRemarks <chr>, individualCount <int>

Many data sources at once

Get data from many sources in a single call

Clean data

All data cleaning functionality is in a new package scrubr. scrubr on CRAN.

Make maps

All mapping functionality is now in a separate package mapr (formerly known as spoccutils), to make spocc easier to maintain. mapr on CRAN.

Meta

ropensci_footer