Title: | Ocean Biodiversity Information System (OBIS) Client |
---|---|
Description: | Client for the Ocean Biodiversity Information System (<https://obis.org>). |
Authors: | Pieter Provoost [cre, aut], Samuel Bosch [aut], Ward Appeltans [ctb], OBIS [cph] |
Maintainer: | Pieter Provoost <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.11.3 |
Built: | 2024-11-12 04:57:45 UTC |
Source: | https://github.com/iobis/robis |
Fetch a list of areas
area(verbose = FALSE)
area(verbose = FALSE)
verbose |
logical. Optional parameter to enable verbose logging (default = |
The areas.
areas <- area(verbose = FALSE)
areas <- area(verbose = FALSE)
Create a checklist.
checklist(scientificname = NULL, taxonid = NULL, datasetid = NULL, nodeid = NULL, instituteid = NULL, areaid = NULL, startdate = NULL, enddate = NULL, startdepth = NULL, enddepth = NULL, geometry = NULL, redlist = NULL, hab = NULL, wrims = NULL, dropped = NULL, flags = NULL, exclude = NULL, verbose = FALSE)
checklist(scientificname = NULL, taxonid = NULL, datasetid = NULL, nodeid = NULL, instituteid = NULL, areaid = NULL, startdate = NULL, enddate = NULL, startdepth = NULL, enddepth = NULL, geometry = NULL, redlist = NULL, hab = NULL, wrims = NULL, dropped = NULL, flags = NULL, exclude = NULL, verbose = FALSE)
scientificname |
the scientific name. |
taxonid |
the taxon identifier (WoRMS AphiaID). |
datasetid |
the dataset identifier. |
nodeid |
the OBIS node identifier. |
instituteid |
the OBIS institute identifier. |
areaid |
the OBIS area identifier. |
startdate |
the earliest date on which occurrence took place. |
enddate |
the latest date on which the occurrence took place. |
startdepth |
the minimum depth below the sea surface. |
enddepth |
the maximum depth below the sea surface. |
geometry |
a WKT geometry string. |
redlist |
include only IUCN Red List species. |
hab |
include only IOC-UNESCO HAB species. |
wrims |
include only WRiMS species. |
dropped |
only include dropped records ( |
flags |
quality flags which need to be set. |
exclude |
quality flags to be excluded from the results. |
verbose |
logical. Optional parameter to enable verbose logging (default = |
The checklist.
taxa <- checklist(scientificname = "Tellinidae") taxa <- checklist(geometry = "POLYGON ((2.3 51.8, 2.3 51.6, 2.6 51.6, 2.6 51.8, 2.3 51.8))") taxa <- checklist(areaid = 10181)
taxa <- checklist(scientificname = "Tellinidae") taxa <- checklist(geometry = "POLYGON ((2.3 51.8, 2.3 51.6, 2.6 51.6, 2.6 51.8, 2.3 51.8))") taxa <- checklist(areaid = 10181)
Create a list of datasets.
dataset(scientificname = NULL, taxonid = NULL, datasetid = NULL, nodeid = NULL, instituteid = NULL, areaid = NULL, startdate = NULL, enddate = NULL, startdepth = NULL, enddepth = NULL, geometry = NULL, redlist = NULL, hab = NULL, wrims = NULL, hasextensions = NULL, exclude = NULL, verbose = FALSE)
dataset(scientificname = NULL, taxonid = NULL, datasetid = NULL, nodeid = NULL, instituteid = NULL, areaid = NULL, startdate = NULL, enddate = NULL, startdepth = NULL, enddepth = NULL, geometry = NULL, redlist = NULL, hab = NULL, wrims = NULL, hasextensions = NULL, exclude = NULL, verbose = FALSE)
scientificname |
the scientific name. |
taxonid |
the taxon identifier (WoRMS AphiaID). |
datasetid |
the dataset identifier. |
nodeid |
the OBIS node identifier. |
instituteid |
the OBIS institute identifier. |
areaid |
the OBIS area identifier. |
startdate |
the earliest date on which occurrence took place. |
enddate |
the latest date on which the occurrence took place. |
startdepth |
the minimum depth below the sea surface. |
enddepth |
the maximum depth below the sea surface. |
geometry |
a WKT geometry string. |
redlist |
include only IUCN Red List species. |
hab |
include only IOC-UNESCO HAB species. |
wrims |
include only WRiMS species. |
hasextensions |
which extensions need to be present (e.g. MeasurementOrFact, DNADerivedData, default = |
exclude |
quality flags to be excluded from the results. |
verbose |
logical. Optional parameter to enable verbose logging (default = |
The datasets.
datasets <- dataset(scientificname = "Tellinidae") datasets <- dataset(geometry = "POLYGON ((2.3 51.8, 2.3 51.6, 2.6 51.6, 2.6 51.8, 2.3 51.8))") datasets <- dataset(areaid = 10181)
datasets <- dataset(scientificname = "Tellinidae") datasets <- dataset(geometry = "POLYGON ((2.3 51.8, 2.3 51.6, 2.6 51.6, 2.6 51.8, 2.3 51.8))") datasets <- dataset(areaid = 10181)
Extract DNA records from occurrence data with a dna column.
dna_records(df, fields = "id")
dna_records(df, fields = "id")
df |
the occurrence dataframe. |
fields |
columns from the occurrence dataframe to include. |
The DNA records.
Generate a citation from metadata elements.
generate_citation(title, published, url, contacts)
generate_citation(title, published, url, contacts)
title |
the dataset title. |
published |
the dataset published date. |
url |
the dataset url. |
contacts |
the dataset contacts as a dataframe. |
A citation string.
Get a WKT geometry by drawing on a map.
get_geometry(provider_tiles = "Esri.WorldGrayCanvas")
get_geometry(provider_tiles = "Esri.WorldGrayCanvas")
provider_tiles |
the base map provider. |
A WKT representation of a geometry.
Create a ggplot2 map.
map_ggplot(data, color = "#ff3399")
map_ggplot(data, color = "#ff3399")
data |
the occurrences from |
color |
color to be used for the dots. |
A ggplot object.
Create a leaflet map.
map_leaflet(data, color = "#ff3399", provider_tiles = "Esri.WorldGrayCanvas", popup = function(x) { x["id"] }, antarctic = FALSE)
map_leaflet(data, color = "#ff3399", provider_tiles = "Esri.WorldGrayCanvas", popup = function(x) { x["id"] }, antarctic = FALSE)
data |
the occurrences from |
color |
color to be used for the dots. |
provider_tiles |
the base map provider. |
popup |
function generating the popup content. |
antarctic |
use antarctic polar stereographic projection. |
A leaflet object.
Extract measurements or facts from occurrence data with a mof column.
measurements(df, fields = "id")
measurements(df, fields = "id")
df |
the occurrence dataframe. |
fields |
columns from the occurrence dataframe to include. |
The measurements.
Fetch a list of nodes
node(verbose = FALSE)
node(verbose = FALSE)
verbose |
logical. Optional parameter to enable verbose logging (default = |
The nodes
nodes <- node()
nodes <- node()
Find occurrences.
occurrence(scientificname = NULL, taxonid = NULL, datasetid = NULL, nodeid = NULL, instituteid = NULL, areaid = NULL, startdate = NULL, enddate = NULL, startdepth = NULL, enddepth = NULL, geometry = NULL, measurementtype = NULL, measurementtypeid = NULL, measurementvalue = NULL, measurementvalueid = NULL, measurementunit = NULL, measurementunitid = NULL, redlist = NULL, hab = NULL, wrims = NULL, extensions = NULL, hasextensions = NULL, mof = NULL, dna = NULL, absence = NULL, event = NULL, dropped = NULL, flags = NULL, exclude = NULL, fields = NULL, qcfields = NULL, verbose = FALSE)
occurrence(scientificname = NULL, taxonid = NULL, datasetid = NULL, nodeid = NULL, instituteid = NULL, areaid = NULL, startdate = NULL, enddate = NULL, startdepth = NULL, enddepth = NULL, geometry = NULL, measurementtype = NULL, measurementtypeid = NULL, measurementvalue = NULL, measurementvalueid = NULL, measurementunit = NULL, measurementunitid = NULL, redlist = NULL, hab = NULL, wrims = NULL, extensions = NULL, hasextensions = NULL, mof = NULL, dna = NULL, absence = NULL, event = NULL, dropped = NULL, flags = NULL, exclude = NULL, fields = NULL, qcfields = NULL, verbose = FALSE)
scientificname |
the scientific name. |
taxonid |
the taxon identifier (WoRMS AphiaID). |
datasetid |
the dataset identifier. |
nodeid |
the OBIS node identifier. |
instituteid |
the OBIS institute identifier. |
areaid |
the OBIS area identifier. |
startdate |
the earliest date on which occurrence took place. |
enddate |
the latest date on which the occurrence took place. |
startdepth |
the minimum depth below the sea surface. |
enddepth |
the maximum depth below the sea surface. |
geometry |
a WKT geometry string. |
measurementtype |
the measurement type to be included in the measurements data. |
measurementtypeid |
the measurement type ID to be included in the measurements data. |
measurementvalue |
the measurement value to be included in the measurements data. |
measurementvalueid |
the measurement value ID to be included in the measurements data. |
measurementunit |
the measurement unit to be included in the measurements data. |
measurementunitid |
the measurement unit ID to be included in the measurements data. |
redlist |
include only IUCN Red List species. |
hab |
include only IOC-UNESCO HAB species. |
wrims |
include only WRiMS species. |
extensions |
which extensions to include (e.g. MeasurementOrFact, DNADerivedData, default = |
hasextensions |
which extensions need to be present (e.g. MeasurementOrFact, DNADerivedData, default = |
mof |
include measurements data (default = |
dna |
include DNA data (default = |
absence |
only include absence records ( |
event |
only include pure event records ( |
dropped |
only include dropped records ( |
flags |
quality flags which need to be set. |
exclude |
quality flags to be excluded from the results. |
fields |
fields to be included in the results. |
qcfields |
include lists of missing and invalid fields (default = |
verbose |
logical. Optional parameter to enable verbose logging (default = |
The occurrence records.
records <- occurrence(scientificname = "Abra sibogai") records <- occurrence(taxonid = 141438, startdate = as.Date("2007-10-10"))
records <- occurrence(scientificname = "Abra sibogai") records <- occurrence(taxonid = 141438, startdate = as.Date("2007-10-10"))
This is an R client for the Ocean Biodiversity Information System (OBIS) API which is documented at https://api.obis.org.
Code and issues for this package are managed at https://github.com/iobis/robis.
Pieter Provoost, [email protected]
Samuel Bosch
Get taxon by taxon ID.
taxon(taxonid, verbose = FALSE)
taxon(taxonid, verbose = FALSE)
taxonid |
the taxon identifier (WoRMS AphiaID). |
verbose |
logical. Optional parameter to enable verbose logging (default = |
Tibble containing taxon records.
taxon(c(141433, 141434))
taxon(c(141433, 141434))
Extract extension records from occurrence data with nested extension column.
unnest_extension(df, extension, fields = "id")
unnest_extension(df, extension, fields = "id")
df |
the occurrence dataframe. |
extension |
the extension type (e.g. 'MeasurementOrFact', 'DNADerivedData'). |
fields |
columns from the occurrence dataframe to include. |
The extension records.