SymbiotaR2
SymbiotaR2: An R Package for Accessing Symbiota2 Data - Published in JOSS (2020)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Repository
SymbiotaR2: an R package for accessing and downloading from Symbiota2 portals
Basic Info
Statistics
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 3
- Releases: 1
Topics
Metadata Files
README.md
SymbiotaR2
Austin Koontz, Benjamin Brandt, Curtis Dyreson, and William D. Pearse
Overview
Designed to assist students, taxonomists, educators, and anyone working with biological specimens, Symbiota is an open-source content management system designed to integrate virtual biodiversity databases. Over 750 natural history collections use Symbiota, which has motivated the development of the Symbiota2 update to the Symbiota platform. This package, SymbiotaR2, allows users to access and download specimen- and observation-based data from a published Symbiota2 portal. If you're looking for something similar for the original Symbiota, take a look at rSymbiota.
More information about Symbiota2 can be found on the website. The GitHub page for Symbiota2 can be found here; if you want to set up a new Symbiota2 portal, please follow the instructions on its documentation site. Finally, a review of the original Symbiota platform is offered in Gries et al., 2014.
Example workflow for SymbiotaR2
In general, there are four steps for using SymbiotaR2:
- Determine the URL of the Symbiota2 portal you wish to access data from; its "API endpoint" is probably its web address with "api" appended to it (see below). Remember that your particular portal may not have enabled data download.
- Load the SymbiotaR2 package (see Installation below for install instructions).
- Find the function corresponding to the kind of data you wish to
pull from the Symbiota2 portal (e.g.,
Coordinatesfor co-ordinate data).- Functions are named after the resources they download, and are grouped according to the relevant API call.
- Note that, because each Symbiota2 portal owner can load their own plugins into the API, it's possible that not every API endpoint will be covered.
- You can find a full list by typing
library(help=SymbiotaR2)
- Call the function, specifying the Symbiota2 portal using the
urlargument (see Example and Portal Specification below).
The R code below provides an example of how to install a Coordinates
resource from an example Symbiota2 portal
```{R}
Step 1 - Find the URL
myURL <- "http://imaginary-symbiota2-portal.com/api"
Step 2 - Install the package (only required the first time you're using it)
install.packages("SymbiotaR2")
Step 3 - Load the package
library(SymbiotaR2)
Step 4 - Choose the kind of data you want
library(help=SymbiotaR2)
Step 5 - Download your data
myCoordinates <- Coordinates(url = myURL) ```
From here, the myCoordinates object can be used as desired.
Setting up a default portal for download
Calling SymbiotaR2_setup will specify a default portal URL to use for
all subsequent SymbiotaR2 calls made within your R session.
Specifing a different url argument will let you refer to
a portal besides the default. The code below offers an example:
{R}
SymbiotaR2_setup("http://imaginary-symbiota-portal.com/api")
Coordinates() # Download from http://imaginary-symbiota-portal.com/api
Coordinates("http://another-imaginary-portal.com/api") # Download from a different portal
If the append argument in your SymbiotaR2_setup call is set to
TRUE, then the specified url argument will be saved as the default
to your .Rprofile, allowing it to be used everytime you start up R.
Installation
This package is not currently up on CRAN (as it's being developed), but it can be downloaded by calling:
{R}
library(devtools)
install_github("ropensci/SymbiotaR2")
Once it has passed peer review, you will be able to install it by running:
{R}
install.packages("SymbiotaR2")
Load the package using:
{R}
library(SymbiotaR2)
(For developers) Unit tests
All of the package functions come with tests, for both pulling a
single Symbiota2 resource (using the id argument), or a collection
of resources (using page). Tests for each function are contained in
the tests/testthat directory. Running these tests requires you have
access to a fully configured Symbiota2 test instance, complete with
demo data, which is both time-consuming to setup and then
time/bandwidth-consuming to run the tests. We therefore release cached
data downloads, generated using vcr, for use with this package.
While more information about the vcr package can be found on the
vcr page on GitHub, you don't need
to understand how vcr works to run the tests for yourself. Instead,
do the following:
- Build the package as you would normally, with something like
R CMD build SymbiotaR2from the command line. - Check the package as you would normally, with something like
R CMD check SymbbiotaR2_0.0-1from the command line.
If you want to add new tests, or new functions that address new API endpoints (perhaps because you have written a Symbiota2 plugin and want it to work with this package), do the following:
- Setup a Symbiota2 instance with the canned example data.
- If you are adding support for a new API endpoint, make a new file
in
tests/testthatfor your tests. Otherwise, add to one of the existing files. - Write your test, following the coding style of the other tests,
particularly with respect to setting up the
vcrcassette. Note that the folderfixturescontains the cassettes, and thatSymbiotaR2makes use of the filetests/testthat/helper-SymbiotaR2.Rto setup the automatic tests. See point 4 below. - When writing/checking your test, set the
urlvariable at the top of the script to be wherever your test instance is. When committing your code to submit a pull request (see point 5), change it to the address at the top of the other tests (currentlyhttp://a02235015-6.bluezone.usu.edu/api/). - When you are finished, submit a pull request to the
masterbranch of this repository. Please use the pull request template and follow the contributor guidelines.
Here is an example of what a piece of testing code may look like:
{R}
context("AccessStats")
vcr::use_cassette(name = "AccessStats_id", {
data <- AccessStats(id = 4, url = url)
})
test_that("AccessStats_id", {
expect_equal(length(data), 12)
expect_type(data, "list")
})
The data <- AccessStates(url = url, id = 4) line is the Symbiota2
call, and the test_that block below it contains the test
conditions--here, that the data object is a list of
length 12.
Citation
If you use SymbiotaR2 as a component to publication, we ask that you
properly cite this R package. Use citation("SymbiotaR2") to see how to
cite SymbiotaR2.
Contributions
Please check out our contribution guidelines.
If you'd like to contribute to the tests in this package (e.g. to include a test for a new plugin), remember that you'll need an accessible SymbiotaR2 instance to determine test criteria.
As the underlying Symbiota2 API and the R package are still being worked on, we generally recommend holding off on any package development until these are finalized. If you're interested in contributing to the package in the future, though, please drop one of us an email and we'll let you know when we're ready!
Please note that this package is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Owner
- Name: rOpenSci
- Login: ropensci
- Kind: organization
- Email: info@ropensci.org
- Location: Berkeley, CA
- Website: https://ropensci.org/
- Twitter: rOpenSci
- Repositories: 307
- Profile: https://github.com/ropensci
JOSS Publication
SymbiotaR2: An R Package for Accessing Symbiota2 Data
Authors
Northern Arizona University, Arizona, USA
Department of Computer Science, Utah State University, Logan, Utah, USA
Tags
Symbiota specimen-records biodiversityCodeMeta (codemeta.json)
{
"@context": [
"https://doi.org/10.5063/schema/codemeta-2.0",
"http://schema.org"
],
"@type": "SoftwareSourceCode",
"identifier": "SymbiotaR2",
"description": "Download data from Symbiota2 portals using Symbiota's\n API. Covers the Checklists, Collections, Crowdsource, Exsiccati,\n Glossary, ImageProcessor, Key, Media, Occurrence, Reference, Taxa,\n Traits, and UserRoles API families. Each Symbiota2 portal owner\n can load their own plugins (and modified code), and so this\n package may not cover every possible API endpoint from a given\n Symbiota2 instance.",
"name": "SymbiotaR2: Downloading Data from Symbiota2 Portals into R",
"codeRepository": "https://github.com/pearselab/SymbiotaR2",
"issueTracker": "https://github.com/pearselab/SymbiotaR2/issues",
"license": "https://spdx.org/licenses/MIT",
"version": "0.0.1",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 3.6.3 (2020-02-29)",
"author": [
{
"@type": "Person",
"givenName": "Austin",
"familyName": "Koontz",
"email": "austinkoontz11@gmail.com",
"@id": "https://orcid.org/0000-0002-6103-5896"
},
{
"@type": "Person",
"givenName": "William D.",
"familyName": "Pearse",
"email": "will.pearse@gmail.com",
"@id": "https://orcid.org/0000-0002-6241-3164"
}
],
"contributor": {},
"copyrightHolder": {},
"funder": {},
"maintainer": [
{
"@type": "Person",
"givenName": "Austin",
"familyName": "Koontz",
"email": "austinkoontz11@gmail.com",
"@id": "https://orcid.org/0000-0002-6103-5896"
}
],
"softwareSuggestions": [
{
"@type": "SoftwareApplication",
"identifier": "knitr",
"name": "knitr",
"version": ">= 1.23",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=knitr"
},
{
"@type": "SoftwareApplication",
"identifier": "testthat",
"name": "testthat",
"version": ">= 2.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=testthat"
},
{
"@type": "SoftwareApplication",
"identifier": "vcr",
"name": "vcr",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=vcr"
}
],
"softwareRequirements": [
{
"@type": "SoftwareApplication",
"identifier": "httr",
"name": "httr",
"version": ">= 1.0.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=httr"
},
{
"@type": "SoftwareApplication",
"identifier": "rjson",
"name": "rjson",
"version": ">= 0.2.20",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=rjson"
},
{
"@type": "SoftwareApplication",
"identifier": "fs",
"name": "fs",
"version": ">= 1.2.6",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=fs"
},
{
"@type": "SoftwareApplication",
"identifier": "curl",
"name": "curl",
"version": ">= 3.3",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=curl"
}
],
"releaseNotes": "https://github.com/pearselab/SymbiotaR2/blob/master/NEWS.md",
"readme": "https://github.com/ropensci/SymbiotaR2/blob/master/README.md",
"fileSize": "2017.879KB",
"contIntegration": [
"https://travis-ci.org/ropensci/SymbiotaR2",
"https://codecov.io/gh/ropensci/SymbiotaR2"
],
"developmentStatus": "https://www.repostatus.org/#wip",
"keywords": [
"symbiota2-portal",
"database",
"library",
"r",
"symbiota",
"specimen-records",
"symbiota2"
]
}
GitHub Events
Total
Last Year
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| akoontz11 | a****1@g****m | 210 |
| Will Pearse | w****e@g****m | 17 |
| Maëlle Salmon | m****n@y****e | 1 |
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 9
- Total pull requests: 1
- Average time to close issues: 4 months
- Average time to close pull requests: 6 days
- Total issue authors: 2
- Total pull request authors: 1
- Average comments per issue: 5.89
- Average comments per pull request: 1.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- akoontz11 (8)
- willpearse (1)
Pull Request Authors
- maelle (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- curl >= 3.3 imports
- fs >= 1.2.6 imports
- httr >= 1.0.0 imports
- rjson >= 0.2.20 imports
- knitr >= 1.23 suggests
- testthat >= 2.0.0 suggests
- vcr * suggests

