-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
64 lines (45 loc) · 1.82 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# shinyBigQuery
<!-- badges: start -->
<!-- badges: end -->
## Overview
The goal of shinyBigQuery is to allow a Shiny application to perform interactive authentication with Google BigQuery and assist with creating a DBI connection object. This allows users to access BigQuery datasets stored in their Google Cloud projects.
## Installation
You can install the released version of shinyBigQuery from [GitHub](https://github.com/thewileylab/shinyBigQuery) with:
``` r
# install.packages("devtools")
devtools::install_github("thewileylab/shinyBigQuery")
```
## Example
To run a demo application:
```{r demo, eval=F}
shinyBigQuery::run_app()
```
## Usage
To integrate shinyBigQuery with your Shiny application place `bigquery_setup_ui()` and `bigquery_setup_server()` functions into your applications ui and server functions respectively. Note, as Google relies on OAuth 2.0 authentication, this application must run on port 1410 in a browser. An example is given below:
```{r example, eval=F}
library(shiny)
library(shinyBigQuery)
ui <- fluidPage(
tags$h2('Connect to BigQuery UI'),
bigquery_setup_ui(id = 'setup-namespace')
)
server <- function(input, output, session) {
bq_setup_vars <- bigquery_setup_server(id = 'setup-namespace')
}
if (interactive())
shinyApp(ui = ui, server = server, options = list(port = 1410, launch.browser = T))
```
## Code of Conduct
Please note that the 'shinyBigQuery' project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.