Giter Club home page Giter Club logo

bigquery-visualiser's Introduction

BigQuery-Visualiser

A Shiny app to visualise BigQuery data in R.

Open sourced so you can deploy on your own Shiny server.

Introduction

bigQuery-demo

After releasing the public Shiny app BigQuery Visualiser Nov 2015, good feedback was how it couldn't be used by some organisations due to security policy to not let unknown apps access to your BigQuery account.

Since there is not yet a read only BigQuery scope, one alternative is to allow a JSON upload for verification, but this is pending a fix in httr

This leaves this solution, allowing users to download their own copy of the Shiny app, for deployment on their own server.

Setup

  • Clone this library to your own local computer
  • Install dependencies:
install.packages("devtools")
devtools::install_github("MarkEdmondson1234/googleAuthR")
devtools::install_github("MarkEdmondson1234/bigQueryR")
devtools::install_github("timelyportfolio/listviewer")
  • I recommended setting up a local redirect URI at 127.0.0.1:1221 for testing, and one with the URL of where your app will eventually be deployed.
  • The setup should look something like this:

oauth2-setup-bigquery-visualiser

  • Update the server.R file to include your credentials. The comments at the top of the file are reproduced below:
  ## The bigQueryR client Ids do not have billing enabled, 
  ## so to work with your own data you need to replace the below with your own
  ## Google API console keys with billing enabled. Do that here:
  ## https://console.developers.google.com/apis/credentials/oauthclient

  options("googleAuthR.webapp.client_id" = getOption("bigQueryR.webapp.client_id"))
  options("googleAuthR.webapp.client_secret" = getOption("bigQueryR.webapp.client_secret"))
  
  ## Once you have made your keys comment out the above options and comment in the below 
#   options("googleAuthR.webapp.client_id" = "YOUR_CLIENT_ID_FOR_OAUTH_TYPE_WEB_APPLICATION")
#   options("googleAuthR.webapp.client_secret" = "YOUR_CLIENT_SECRET_FOR_OAUTH_TYPE_WEB_APPLICATION")
  • Launch the app locally using:
shiny::runApp(port=1221)

...where the variable port is equal to the one you set up in the Google Dev Console (1221 in this example).

For Shiny server deployment onto the web no port is needed.

Feedback

If you have any improvements such as new plot types or feedback raise an issue or submit a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.