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.

Contributing

See CONTRIBUTING.md

Installation

Stable version from CRAN

Or the development version from GitHub

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 108
#>    name  longitude latitude prov  issues    key datasetKey publishingOrgKey
#>    <chr>     <dbl>    <dbl> <chr> <chr>   <int> <chr>      <chr>           
#>  1 Seto…     -80.3     25.7 gbif  cdrou… 1.81e9 50c9509d-… 28eb1a3f-1c15-4…
#>  2 Seto…     -80.3     25.8 gbif  cdrou… 1.81e9 50c9509d-… 28eb1a3f-1c15-4…
#>  3 Seto…     -81.4     28.6 gbif  cdrou… 1.84e9 50c9509d-… 28eb1a3f-1c15-4…
#>  4 Seto…     -77.3     39.0 gbif  cdrou… 1.84e9 50c9509d-… 28eb1a3f-1c15-4…
#>  5 Seto…     -83.2     41.6 gbif  cdrou… 1.88e9 50c9509d-… 28eb1a3f-1c15-4…
#>  6 Seto…     -74.0     40.8 gbif  cdrou… 1.84e9 50c9509d-… 28eb1a3f-1c15-4…
#>  7 Seto…     -80.8     35.5 gbif  cdrou… 1.85e9 50c9509d-… 28eb1a3f-1c15-4…
#>  8 Seto…     -97.2     26.1 gbif  cdrou… 1.84e9 50c9509d-… 28eb1a3f-1c15-4…
#>  9 Seto…     -80.3     25.8 gbif  cdrou… 1.85e9 50c9509d-… 28eb1a3f-1c15-4…
#> 10 Seto…     -77.1     38.9 gbif  cdrou… 1.84e9 50c9509d-… 28eb1a3f-1c15-4…
#> # ... with 490 more rows, and 100 more variables: 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>, acceptedTaxonKey <int>, scientificName <chr>,
#> #   acceptedScientificName <chr>, kingdom <chr>, phylum <chr>,
#> #   order <chr>, family <chr>, genus <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>, verbatimEventDate <chr>, datasetName <chr>,
#> #   verbatimLocality <chr>, gbifID <chr>, collectionCode <chr>,
#> #   occurrenceID <chr>, taxonID <chr>, catalogNumber <chr>,
#> #   recordedBy <chr>, `http://unknown.org/occurrenceDetails` <chr>,
#> #   institutionCode <chr>, rights <chr>, eventTime <chr>,
#> #   occurrenceRemarks <chr>,
#> #   `http://unknown.org/http_//rs.gbif.org/terms/1.0/Multimedia` <chr>,
#> #   identificationID <chr>, informationWithheld <chr>,
#> #   nomenclaturalCode <chr>, locality <chr>, vernacularName <chr>,
#> #   fieldNotes <chr>, verbatimElevation <chr>, behavior <chr>,
#> #   higherClassification <chr>, sex <chr>, lifeStage <chr>,
#> #   establishmentMeans <chr>, infraspecificEpithet <chr>, continent <chr>,
#> #   recordNumber <chr>, higherGeography <chr>, dynamicProperties <chr>,
#> #   endDayOfYear <chr>, georeferenceVerificationStatus <chr>,
#> #   county <chr>, language <chr>, type <chr>, preparations <chr>,
#> #   occurrenceStatus <chr>, startDayOfYear <chr>,
#> #   bibliographicCitation <chr>, accessRights <chr>, institutionID <chr>,
#> #   dataGeneralizations <chr>, organismID <chr>,
#> #   ownerInstitutionCode <chr>, datasetID <chr>, collectionID <chr>,
#> #   habitat <chr>, georeferencedDate <chr>, georeferencedBy <chr>,
#> #   georeferenceProtocol <chr>, otherCatalogNumbers <chr>,
#> #   georeferenceSources <chr>, identificationRemarks <chr>,
#> #   individualCount <int>

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

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

ropensci_footer