Skip to content

iobis/robis

Repository files navigation

robis: an R client for the OBIS API

DOI

robis is an R package that allows accessing data from the Ocean Biodiversity Information System (OBIS) directly from R. OBIS is a global open-access data and information clearing-house on marine biodiversity for science, conservation and sustainable development.

With robis users can:

  • Download data from OBIS
  • Create a checklist of taxa that met a set of filters
  • Download measurements and facts associated with occurrences
  • Create maps from occurrences (including leaflet maps)

Installation

robis is available from CRAN.

# CRAN
install.packages("robis")

# latest development version
remotes::install_github("iobis/robis")

Getting started

The main functions of the robis package are occurrences and checklist. You can easily download data for one species using:

records <- occurrence(scientificname = "Abra sibogai")

Then you can plot the occurrences with:

map_leaflet(records)

Or you can create a ggplot map using:

map_ggplot(records)

With the function checklist it's possible to obtain a checklist of all taxa in OBIS that met a certain filter. For example, here we obtain all species from the family "Tellinidae"

taxa <- checklist(scientificname = "Tellinidae")

See the Getting started vignette for more details on how to download data according to filters and how to extract measurements or facts from occurrence data using the function measurements.

Spatial Filtering

There are a variety of ways to add a spatial filter to your query:

  1. Filter by geography using areaid filters.

OBIS provides polygon filters for about 800 areas of interest, like the Southern Ocean or the Bay of Bengal. These can be viewed via the area function. The corresponding id values can be used in the areaid parameter of the occurrence and checklist functions.

  1. Filter with Well-Known Text (WKT) strings.

Both the occurrence and checklist functions allow spatial filtering with Well-Known Text (WK) strings, via the geometry parameter. Following this example from the OBIS Manual, here is an example of how to obtain a checklist of Mollusc species in a certain area:

mollcheck<-checklist(scientificname="Mollusca", geometry = "POLYGON ((2.3 51.8, 2.3 51.6, 2.6 51.6, 2.6 51.8, 2.3 51.8))")

If you're unsure how to construct WKT, robis includes the function get_geometry, which provides an interactive tool to draw shapes and return WKT than can be plugged into queries.

To use it, run: wkt <- get_geometry(). This will open up the tool in the Viewer of RStudio. You can zoom, pan, and use the shapes to draw on the map. Once you are satisfied with what you've drawn, click the 'Done' button in the bottom right hand corner, and it will assign the WKT to the object wkt. If you aren't happy with what you've drawn, you can click the trashcan icon to clear the shape from the tool.

How to use OBIS data

OBIS holds a large collection of biodiversity information, with more than 100 million presence records and almost 200 measurements and facts. This information is powering research in areas like taxonomy, phylogeny and ecology, and is being used as an important tool in conservation and management. You can learn more about OBIS with the OBIS manual. You can also explore some of our use cases or the many publications that applied OBIS data.

obistools package

There is a companion package, obistools, available from GitHub: github.com/iobis/obistools

obistools provide several tools for cleaning data downloaded from OBIS, like:

  • Checking points on land
  • Checking depths
  • Checking dates

About

R client for the OBIS API

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Contributors 6

Languages