{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Using r-obis and r-obistools to explore the OBIS database\n", "\n", "\n", "The [Ocean Biogeographic Information System (OBIS)](http://www.iobis.org) is an open-access data and information system for marine biodiversity for science, conservation and sustainable development.\n", "\n", "In this example we will use R libraries [`obistools`](https://iobis.github.io/obistools) and [`robis`](https://iobis.github.io/robis) to search data regarding marine turtles occurrence in the South Atlantic Ocean.\n", "\n", "Let's start by loading the R-to-Python extension and check the database for the 7 known species of marine turtles found in the world's oceans." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "import warnings\n", "\n", "warnings.simplefilter('ignore')" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [], "source": [ "%load_ext rpy2.ipython" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "slideshow": { "slide_type": "fragment" } }, "outputs": [], "source": [ "%%R -o matches\n", "\n", "library(obistools)\n", "\n", "species <- c(\n", " 'Caretta caretta',\n", " 'Chelonia mydas',\n", " 'Dermochelys coriacea',\n", " 'Eretmochelys imbricata',\n", " 'Lepidochelys kempii',\n", " 'Lepidochelys olivacea',\n", " 'Natator depressa'\n", ")\n", "\n", "matches = match_taxa(species, ask=FALSE)" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "slideshow": { "slide_type": "slide" } }, "outputs": [ { "data": { "text/html": [ "
\n", " | scientificName | \n", "scientificNameID | \n", "match_type | \n", "
---|---|---|---|
0 | \n", "Caretta caretta | \n", "urn:lsid:marinespecies.org:taxname:137205 | \n", "exact | \n", "
1 | \n", "Chelonia mydas | \n", "urn:lsid:marinespecies.org:taxname:137206 | \n", "exact | \n", "
2 | \n", "Dermochelys coriacea | \n", "urn:lsid:marinespecies.org:taxname:137209 | \n", "exact | \n", "
3 | \n", "Eretmochelys imbricata | \n", "urn:lsid:marinespecies.org:taxname:137207 | \n", "exact | \n", "
4 | \n", "Lepidochelys kempii | \n", "urn:lsid:marinespecies.org:taxname:137208 | \n", "exact | \n", "
5 | \n", "Lepidochelys olivacea | \n", "urn:lsid:marinespecies.org:taxname:220293 | \n", "exact | \n", "
6 | \n", "Natator depressa | \n", "urn:lsid:marinespecies.org:taxname:344093 | \n", "exact | \n", "