Package 'rglobi'

Title: Interface to Global Biotic Interactions
Description: A programmatic interface to the web service methods provided by Global Biotic Interactions (GloBI) (<https://www.globalbioticinteractions.org/>). GloBI provides access to spatial-temporal species interaction records from sources all over the world. rglobi provides methods to search species interactions by location, interaction type, and taxonomic name.
Authors: Jorrit Poelen [aut, cre], Stephen Gosnell [aut], Sergey Slyusarev [aut], Helen Waters [aut]
Maintainer: Jorrit Poelen <[email protected]>
License: MIT + file LICENSE
Version: 0.3.4
Built: 2024-11-27 03:53:56 UTC
Source: https://github.com/ropensci/rglobi

Help Index


List data fields identified in GloBI database

Description

Returns data frame with supported data fields

Usage

get_data_fields(opts = list(), read_csv = read_csv_online)

Arguments

opts

list of named options to configure GloBI API

read_csv

function used to find csv associated to query url, defaulting to online query method

Value

Returns data frame of supported data fields

Examples

get_data_fields()

Find locations at which interactions were observed

Description

Returns all locations (latitude,longitude) of interactions in data base or area specified in arguments

Usage

get_interaction_areas(bbox = NULL, read_csv = read_csv_online, ...)

Arguments

bbox

Coordinates in EPSG:4326 decimal degrees defining "left, bottom, right, top" of bounding box

read_csv

function used to find csv associated to query url, defaulting to online query method

...

list of named options to configure GloBI API

Value

Returns data frame of coordinates

See Also

Other areas: get_interactions_in_area()

Examples

get_interaction_areas ()
get_interaction_areas (bbox=c(-67.87,12.79,-57.08,23.32))

Get Interaction Matrix. Constructs an interaction matrix indicating whether source taxa (rows) or target taxa (columns) are known to interact with given type.

Description

Get Interaction Matrix. Constructs an interaction matrix indicating whether source taxa (rows) or target taxa (columns) are known to interact with given type.

Usage

get_interaction_matrix(
  source.taxon.names = list("Homo sapiens"),
  target.taxon.names = list("Mammalia"),
  interaction.type = "eats",
  opts = list(),
  read_csv = read_csv_online
)

Arguments

source.taxon.names

list of source taxon names (e.g. list('Mammalia', 'Aves', 'Ariopsis felis'))

target.taxon.names

list of target taxon names

interaction.type

the preferred interaction type (e.g. preysOn)

opts

list of options to configure GloBI API

read_csv

function used to find csv associated to query url, defaulting to online query method

Value

matrix representing species interactions between source and target taxa

See Also

Other interactions: get_interaction_types(), get_interactions_by_taxa(), get_interactions_by_type(), get_interactions(), get_predators_of(), get_prey_of()

Examples

get_interaction_matrix("Homo sapiens", "Mammalia", "interactsWith")

List interactions identified in GloBI database

Description

Returns data frame with supported interaction types

Usage

get_interaction_types(opts = list(), read_csv = read_csv_online)

Arguments

opts

list of named options to configure GloBI API

read_csv

function used to find csv associated to query url, defaulting to online query method

Value

Returns data frame of supported interaction types

See Also

Other interactions: get_interaction_matrix(), get_interactions_by_taxa(), get_interactions_by_type(), get_interactions(), get_predators_of(), get_prey_of()

Examples

get_interaction_types()

Get Species Interaction from GloBI

Description

Get Species Interaction from GloBI

Usage

get_interactions(taxon = "Homo sapiens", interaction.type = "preysOn", ...)

Arguments

taxon

canonical scientific name of source taxon (e.g. Homo sapiens)

interaction.type

the preferred interaction type (e.g. preysOn)

...

list of options to configure GloBI API

Value

species interactions between source and target taxa

See Also

Other interactions: get_interaction_matrix(), get_interaction_types(), get_interactions_by_taxa(), get_interactions_by_type(), get_predators_of(), get_prey_of()

Examples

get_interactions("Homo sapiens", "preysOn")
get_interactions("Insecta", "parasiteOf")

Return interactions involving specific taxa

Description

Returns interactions involving specific taxa. Secondary (target) taxa and spatial boundaries may also be set

Usage

get_interactions_by_taxa(
  sourcetaxon,
  targettaxon = NULL,
  interactiontype = NULL,
  accordingto = NULL,
  showfield = c("source_taxon_external_id", "source_taxon_name", "source_taxon_path",
    "source_specimen_life_stage", "interaction_type", "target_taxon_external_id",
    "target_taxon_name", "target_taxon_path", "target_specimen_life_stage", "latitude",
    "longitude", "study_citation", "study_external_id", "study_source_citation"),
  otherkeys = NULL,
  bbox = NULL,
  returnobservations = FALSE,
  opts = list(),
  read_csv = read_csv_online
)

Arguments

sourcetaxon

Taxa of interest (consumer, predator, parasite); may be specified as "Genus species" or higher level (e.g., Genus, Family, Class).

targettaxon

Taxa of interest (prey, host); may be specified as "Genus species" or higher level (e.g., Genus, Family, Class)

interactiontype

Interaction types of interest (prey, host); may be specified as listed by get_interaction_types()

accordingto

Data source of interest

showfield

Data fields of interest (e. g. source_taxon_external_id, source_taxon_name); may be specified as listed by get_data_fields()

otherkeys

list of key-value pairs to query any field not covered by other parameters; keys may be specified as listed by get_data_fields()

bbox

Coordinates in EPSG:4326 decimal degrees defining "left, bottom, right, top" of bounding box

returnobservations

if true, all individual observations are returned, else only distinct relationships

opts

list of named options to configure GloBI API

read_csv

function used to find csv associated to query url, defaulting to online query method

Value

Returns data frame of interactions

Note

For data sources in which type of interactions were not specified, the interaction is labeled "interacts_with"

See Also

Other interactions: get_interaction_matrix(), get_interaction_types(), get_interactions_by_type(), get_interactions(), get_predators_of(), get_prey_of()

Examples

get_interactions_by_taxa(sourcetaxon = "Rattus")
get_interactions_by_taxa(sourcetaxon = "Aves", targettaxon = "Rattus")
get_interactions_by_taxa(sourcetaxon = "Rattus rattus",
bbox = c(-67.87,12.79,-57.08,23.32))

Get Species Interactions by Interaction Type from GloBI

Description

Get Species Interactions by Interaction Type from GloBI

Usage

get_interactions_by_type(interactiontype = c("interactsWith"), ...)

Arguments

interactiontype

the requested interaction type (e.g. preysOn)

...

list of options to configure GloBI API

Value

species interactions given provided interaction type(s)

See Also

Other interactions: get_interaction_matrix(), get_interaction_types(), get_interactions_by_taxa(), get_interactions(), get_predators_of(), get_prey_of()

Examples

get_interactions_by_type(interactiontype = c("eats", "eatenBy"))
get_interactions_by_type(interactiontype = "parasiteOf")

Return all interactions in specified area

Description

Returns all interactions in data base in area specified in arguments

Usage

get_interactions_in_area(bbox, ...)

Arguments

bbox

Coordinates in EPSG:4326 decimal degrees defining "left, bottom, right, top" of bounding box

...

list of named options to configure GloBI API

Value

Returns data frame of interactions

See Also

Other areas: get_interaction_areas()

Examples

get_interactions_in_area(bbox = c(-67.87, 12.79, -57.08, 23.32))

Get a List of Predators of a Given Prey Taxon

Description

Get a List of Predators of a Given Prey Taxon

Usage

get_predators_of(taxon = "Rattus rattus", ...)

Arguments

taxon

scientific name of prey taxon. Can be any taxonomic rank (e.g. Rattus rattus, Decapoda)

...

list of named options to configure the GloBI API

Value

list of recorded prey-predator interactions that involve the desired prey taxon.

See Also

Other interactions: get_interaction_matrix(), get_interaction_types(), get_interactions_by_taxa(), get_interactions_by_type(), get_interactions(), get_prey_of()

Examples

get_predators_of("Rattus rattus")
get_predators_of("Primates")

Get a List of Prey for given Predator Taxon

Description

Get a List of Prey for given Predator Taxon

Usage

get_prey_of(taxon = "Homo sapiens", ...)

Arguments

taxon

scientific name of predator taxon. Can be any taxonomic rank (e.g. Homo sapiens, Animalia)

...

list of named options to configure GloBI API

Value

list of recorded predator-prey interactions that involve the desired predator taxon

See Also

Other interactions: get_interaction_matrix(), get_interaction_types(), get_interactions_by_taxa(), get_interactions_by_type(), get_interactions(), get_predators_of()

Examples

get_prey_of("Homo sapiens")
get_prey_of("Primates")