Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/MCodrescu/octopus

R Package for Interacting with Databases
https://github.com/MCodrescu/octopus

data-science database r rshiny

Last synced: about 1 month ago
JSON representation

R Package for Interacting with Databases

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# octopus

[![R-CMD-check](https://github.com/MCodrescu/octopus/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MCodrescu/octopus/actions/workflows/R-CMD-check.yaml) [![CRAN status](https://www.r-pkg.org/badges/version/octopus)](https://CRAN.R-project.org/package=octopus)
[![R-CMD-check](https://github.com/MCodrescu/octopus/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MCodrescu/octopus/actions/workflows/R-CMD-check.yaml)

The *octopus* package is a database management tool built entirely in R. You can preview tables, upload files, send queries, and more.

All database credentials are handled by the R user. Simply pass a supported database connection object created with `DBI::dbConnect()` to the function `octopus::view_database()` and *octopus* will start a shiny application allowing you to interact with the database.

*Try it out here! [shinyapps.io](https://zszxyy-marcus-codrescu.shinyapps.io/octopusconceptapp/)*

![](https://raw.githubusercontent.com/MCodrescu/octopus/da65cdba6ce2362c7b8c21cd2cf309a3cfcbb17b/images/octopusMainPage3.png)

## Supported Databases

The *octopus* package currently supports the following databases:

```{r}
octopus::list_drivers()
```

## Installation

Install the stable version from CRAN.

``` r
install.packages("octopus")
```

Install the development version from github.

``` r
devtools::install_github("MCodrescu/octopus")
```

## Example

Here is an example of connecting to a database and running the main function of octopus.

```{r example, eval = FALSE}
# Create a Database Connection
drv <- duckdb::duckdb()
con <- DBI::dbConnect(drv)

# Write some data
DBI::dbWriteTable(con, "mtcars", mtcars)

# View the Database
octopus::view_database(con)

```