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.
You can install the released version of shinyBigQuery from GitHub with:
# install.packages("devtools")
devtools::install_github("thewileylab/shinyBigQuery")
To run a demo application:
shinyBigQuery::run_app()
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:
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))
Please note that the ‘shinyBigQuery’ project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.