rOpenSci | Databases

Databases

Work with Databases From R
Showing 10 of 12
nodbi
CRAN

Document NoSQL Database DBI Connector

Ralf Herold
Description

R database connector for creating, reading (querying and listing fields), updating and deleting of individual or many JSON documents, providing a common API across supported databases (SQLite, PostgreSQL, DuckDB, MariaDB or MySQL as well as NoSQL databases MongoDB, CouchDB and Elasticsearch).

View Documentation

A Test Environment for Database Requests

Jonathan Keane
Description

Testing and documenting code that communicates with remote databases can be painful. Although the interaction with R is usually relatively simple (e.g. data(frames) passed to and from a database), because they rely on a separate service and the data there, testing them can be difficult to set up, unsustainable in a continuous integration environment, or impossible without replicating an entire production cluster. This package addresses that by allowing you to make recordings from your database interactions and then play them back while testing (or in other contexts) all without needing to spin up or have access to the database your code would typically connect to.

View Documentation
ckanr
CRAN

Client for the Comprehensive Knowledge Archive Network (CKAN)

Florian Mayer
Description

Client for the Comprehensive Knowledge Archive Network (CKAN) application programming interface (API) (https://ckan.org/). Includes interface to CKAN APIs for search, list, show for packages, organizations, and resources. In addition, provides an interface to the datastore extension.

View Documentation
Scientific use cases
  1. White, L., & Santy, S. (2018). DataDepsGenerators.jl: making reusing data easy by automatically generating DataDeps.jl registration code. Journal of Open Source Software, 3(31), 921. https://doi.org/10.21105/joss.00921
sofa
CRAN

Connector to CouchDB

Yaoxiang Li
Description

Provides an interface to the NoSQL database CouchDB (https://couchdb.apache.org/). Methods are provided for managing databases within CouchDB, including creating/deleting/updating/transferring, and managing documents within databases. One can connect with a local CouchDB instance, or a remote CouchDB database such as ‘IBM Cloudant’. Documents can be inserted directly from vectors, lists, data.frames, and JSON. Targeted at CouchDB v2 or greater.

View Documentation

A High-Performance Taxonomic Database Interface

Carl Boettiger
Description

Provides fast access to many commonly used taxonomic authorities in a uniform Darwin Core format. Tables are read directly from versioned Parquet snapshots, streamed from cloud storage or from a local copy, and queried with familiar dplyr verbs.

View Documentation

Archive and Unarchive Databases Using Flat Files

Carl Boettiger
Description

Flat text files provide a robust, compressible, and portable way to store tables from databases. This package provides convenient functions for exporting tables from relational database connections into compressed text files and streaming those text files back into a database without requiring the whole table to fit in working memory.

View Documentation

Offline Access to Taxonomic Databases

Tamás Stirling
Description

Download taxonomic databases, convert them into SQLite format, and query them locally for fast, reliable, and reproducible access to taxonomic data.

View Documentation
Scientific use cases
  1. Jin, J., & Yang, J. (2020). BDcleaner: A workflow for cleaning taxonomic and geographic errors in occurrence data archived in biodiversity databases. Global Ecology and Conservation, 21, e00852. https://doi.org/10.1016/j.gecco.2019.e00852

Interface to Virtuoso using ODBC

Carl Boettiger
Description

Provides users with a simple and convenient mechanism to manage and query a Virtuoso database using the DBI (Data-Base Interface) compatible ODBC (Open Database Connectivity) interface. Virtuoso is a high-performance “universal server,” which can act as both a relational database, supporting standard Structured Query Language (SQL) queries, while also supporting data following the Resource Description Framework (RDF) model for Linked Data. RDF data can be queried using SPARQL (SPARQL Protocol and RDF Query Language) queries, a graph-based query that supports semantic reasoning. This allows users to leverage the performance of local or remote Virtuoso servers using popular R packages such as DBI and dplyr, while also providing a high-performance solution for working with large RDF triplestores from R. The package also provides helper routines to install, launch, and manage a Virtuoso server locally on Mac, Windows and Linux platforms using the standard interactive installers from the R command-line. By automatically handling these setup steps, the package can make using Virtuoso considerably faster and easier for a most users to deploy in a local environment. Managing the bulk import of triples from common serializations with a single intuitive command is another key feature of this package. Bulk import performance can be tens to hundreds of times faster than the comparable imports using existing R tools, including rdflib and redland packages.

View Documentation

Create and Query a Local Copy of GenBank in R

Joel H. Nitta
Description

Download large sections of GenBank https://www.ncbi.nlm.nih.gov/genbank/ and generate a local SQL-based database. A user can then query this database using restez functions or through rentrez https://CRAN.R-project.org/package=rentrez wrappers.

View Documentation
Scientific use cases
  1. Bennett, D., Hettling, H., Silvestro, D., Vos, R., & Antonelli, A. (2018). restez: Create and Query a Local Copy of GenBank in R. Journal of Open Source Software, 3(31), 1102. https://doi.org/10.21105/joss.01102
  2. Ruiz-Sanchez, E., Maya-Lastra, C. A., Steinmann, V. W., Zamudio, S., Carranza, E., Murillo, R. M., & Rzedowski, J. (2019). Datataxa: a new script to extract metadata sequence information from GenBank, the Flora of Bajío as a case study. Botanical Sciences, 97(4), 754–760. https://doi.org/10.17129/botsci.2226
rdataretriever
CRAN

R Interface to the Data Retriever

Henry Senyondo
Description

Provides an R interface to the Data Retriever https://retriever.readthedocs.io/en/latest/ via the Data Retriever’s command line interface. The Data Retriever automates the tasks of finding, downloading, and cleaning public datasets, and then stores them in a local database.

View Documentation