Package 'SymbiotaR2'

Title: Downloading Data from Symbiota2 Portals into R
Description: Download data from Symbiota2 portals using Symbiota's API. Covers the Checklists, Collections, Crowdsource, Exsiccati, Glossary, ImageProcessor, Key, Media, Occurrence, Reference, Taxa, Traits, and UserRoles API families. Each Symbiota2 portal owner can load their own plugins (and modified code), and so this package may not cover every possible API endpoint from a given Symbiota2 instance.
Authors: Austin Koontz [aut, cre] , William D. Pearse [aut] , Ben Bond-Lamberty [rev] (Ben reviewed SymbiotaR2 for rOpenSci and provided valuable feedback, see https://github.com/ropensci/software-review/issues/373), Scott Chamberlain [rev] (Scott reviewed SymbiotaR2 for rOpenSci and provided valuable feedback, see https://github.com/ropensci/software-review/issues/373)
Maintainer: Austin Koontz <[email protected]>
License: MIT + file LICENSE
Version: 0.0-1
Built: 2024-11-27 03:39:09 UTC
Source: https://github.com/ropensci/SymbiotaR2

Help Index


Retrieves Checklists resources from the Symbiota2 server

Description

Functions that retrieve Checklist resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

ChecklistProjects(id, page, url = NULL)

Coordinates(id, page, url = NULL)

TaxaLink(id, page, url = NULL)

Checklists(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a Coordinates resource (id = 1), from a (nonexistent) dummy portal
object <- Coordinates(id = 1, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Collection resources from the Symbiota2 server

Description

Functions that retrieve Collection resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Categories(id, page, url = NULL)

Institutions(id, page, url = NULL)

Stats(id, page, url = NULL)

Collections(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling in a page of Institutions, from a (nonexistent) dummy portal
ints <- Institutions(page = 3, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Crowdsource resources from the Symbiota2 server

Description

Functions that retrieve Crowdsource resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Central(id, page, url = NULL)

Queue(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Acquiring a Queue resource (id = 2), from a (nonexistent) dummy portal
object <- Queue(id = 2, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Exsiccati resources from the Symbiota2 server

Description

Functions that retrieve Exsiccati resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Numbers(id, page, url = NULL)

Titles(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Acquiring a Titles resource (id = 3), from a (nonexistent) dummy portal
object <- Titles(id = 3, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Glossary resources from the Symbiota2 server

Description

Functions that retrieve Glossary resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Glossary(id, page, url = NULL)

TermLink(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Acquiring a page of Glossary resources, from a (nonexistent) dummy portal
glossPage <- Glossary(page = 1, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves ImageProcessor resources from the Symbiota2 server

Description

Functions that retrieve ImageProcessor resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Projects(id, page, url = NULL)

RawLabels(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Acquiring a RawLabels resource (id = 1), from a (nonexistent) dummy portal
object <- RawLabels(id = 1, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Key resources from the Symbiota2 server

Description

Functions that retrieve Key resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

CharacterHeading(id, page, url = NULL)

Characters(id, page, url = NULL)

CharacterStateImages(id, page, url = NULL)

CharacterStates(id, page, url = NULL)

DescriptionDeletions(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a Characters resource (id = 3), from a (nonexistent) dummy portal
object <- Characters(id = 3, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Media resources from the Symbiota2 server

Description

Functions that retrieve Media resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

TagKey(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a page of TagKey resources, from a (nonexistent) dummy portal
object <- TagKey(page = 1, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Miscellaneous resources from the Symbiota2 server

Description

Functions that retrieve Miscellaneous resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Configurations(id, page, url = NULL)

LookupLanguages(id, page, url = NULL)

SchemaVersion(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a Configurations resource (id = 4), from a (nonexistent) dummy portal
object <- Configurations(id = 4, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Occurrence resources from the Symbiota2 server

Description

Functions that retrieve Occurrence resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

AccessStats(id, page, url = NULL)

Determinations(id, page, url = NULL)

Duplicates(id, page, url = NULL)

EditLocks(id, page, url = NULL)

Edits(id, page, url = NULL)

FullText(id, page, url = NULL)

GuidDeterminations(id, page, url = NULL)

GuidOccurrences(id, page, url = NULL)

LookupChronostratigraphy(id, page, url = NULL)

LookupCounties(id, page, url = NULL)

LookupCountries(id, page, url = NULL)

LookupStateProvinces(id, page, url = NULL)

UploadMappings(id, page, url = NULL)

UploadParameters(id, page, url = NULL)

Verification(id, page, url = NULL)

Associations(id, page, url = NULL)

Comments(id, page, url = NULL)

DatasetLink(id, page, url = NULL)

Datasets(id, page, url = NULL)

Exchange(id, page, url = NULL)

Loans(id, page, url = NULL)

Occurrences(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a page of Occurrences, from a (nonexistent) dummy portal
entries <- Occurrence(page = 6, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Reference resources from the Symbiota2 server

Description

Functions that retrieve Reference resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

LookupReferenceTypes(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a LookupReferenceType resource (id = 1), 
from a (nonexistent) dummy portal
object <- LookupReferenceType(id = 1, url = "http://dummy-portal.com/api/")

## End(Not run)

Downloading data from Symbiota2 portals into R

Description

This package allows users to access and download from Symbiota2, a content management system for biodiveristy data.

About

Symbiota2 is the improved, refactored version of Symbiota, an open source content management system for biological specimen data. SymbiotaR2 allows users to access the data available at Symbiota2 portals. By specifying the URL of the relevant portal, and the resource to be downloaded, users can use SymbiotaR2 to deliver biological specimen-data in an R format.

Code Structure

Package functions are organized by API family, which generally group the functions by the type of resource they pull from the portal. Each function can either return an individual resources (through specifying the 'id' argument) or a collection of resources (through specifying the 'page' argument). After providing either the 'id' or the 'page' of resources, and the URL of the relevant portal, SymbiotaR2 will return an R object (for 'id', usually a list; for 'page', usually a data.frame).

Portal Specification

All SymbiotaR2 commands require a URL that directs to the Symiobta2 portal to download data from. Users need to make sure they are granted access to a Symbiota2 portal before trying to download data from it.

The address of a Symbiota2 portal is provided as the 'url' string argument to each function. To specify a default URL, use the 'SymbiotaR2_setup' function, which will the default url to your .Rprofile.

This package only allows users to access data from existing Symbiota2 portals; to create a new Symbiota2 portal, see the documentation at https://symbiota2.github.io/Symbiota2/setup/installation.html

References

https://symbiota.org/docs/

Gries, C., Gilbert, E. E., & Franz, N. M. (2014). Symbiota - A virtual platform for creating voucher-based biodiversity information communities. Biodiversity Data Journal, 2, e1114.

Examples

## Not run: 
myURL <- "http://ImaginarySymbiota2Portal.com/api"
myTaxa <- Taxa(id = 12, url = myURL)
str(myTaxa)

myOccurrences <- Occurrence(page = 2, url = myURL)
length(myOccurrences)

## End(Not run)

Set default URL for Symbiota2 portal download

Description

Sets the SymbiotaR2_url option for you, optionally, by appending it to your .Rprofile. Checks whether you've specified a valid URL that can be reached, and attempts to pull a resource from the API, to confirm that the URL does specify a Symbiota2 portal.

Usage

SymbiotaR2_setup(url, append = FALSE, verbose = TRUE)

Arguments

url

URL of Symbiota2 portal (a trailing / will be appended, if it is not given)

append

logical of whether to attempt to append this to your .Rprofile file, making this your default every time you start up R

verbose

logical of whether or not to display output

Value

Invisbly, the URL that has been stored

Author(s)

Will Pearse

Examples

## Not run: 
# An example (that doesn't work because it's not a real portal)
SymbiotaR2_setup("http://nonexistent-portal.com/api/")
# Trying to save a non-existence portal
SymbiotaR2_setup("http://nonexistent-portal.com/api/", TRUE)

## End(Not run)

Retrieves Taxa resources from the Symbiota2 server

Description

Functions that retrieve Taxa resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Taxa(id, page, url = NULL)

Authorities(id, page, url = NULL)

DescriptionBlock(id, page, url = NULL)

Synonymy(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a page of Taxa resources, from a (nonexistent) dummy portal
object <- Taxa(page = 2, url = "http://dummy-portal.com/api/")

## End(Not run)

Retrieves Traits resources from the Symbiota2 server

Description

Functions that retrieve Traits resources from the server previously connected to. Each function either retrieves an individual resource or a page of resources, depending on the arguments provided.

Usage

Traits(id, page, url = NULL)

Arguments

id

id value (usually numeric, but not always) used to refer to the specific resource to pull from the database

page

numeric value referring to the page of resources to pull. If neither an id or a page parameter is provided, function will pull the first page of resources (i.e. page=1)

url

URL string of the Symbiota2 portal to be connected to. A trailing / will be appended, if it is not given.

Value

If using id, the specific resource specified; if using page, the page specified of resources

Note

To specify a default URL to refer to, see SymbiotaR2_setup()

Author(s)

Austin Koontz

Examples

## Not run: 
# Pulling a Traits resource (id = 4), from a (nonexistent) dummy portal
object <- Traits(id = 4, url = "http://dummy-portal.com/api/")

## End(Not run)