GithubHelp home page GithubHelp logo

looker-custom-viz-boilerplate's Introduction

Looker Custom Visualization Boilerplate

A repo for getting started with custom visualizations that includes a Highcharts example integration.

Installation

  1. Install Dependecies.

    Using yarn, install all dependencies

    yarn install
    
  2. Generate local HTTPS certificate

    Using yarn, run the following to generate certificates for serving the custom visualization to Looker:

    yarn gen-cert
    

    Enter a country code when asked for country code. All other prompts can be skipped by pressing Enter. This will generate /server/cert.pem and /server/key.pem

  3. Enable Google Chrome to allow invalid certificates for resources loaded from localhost

    Paste this into Google Chrome URL bar:

    chrome://flags/#allow-insecure-localhost
    

    Reference: https://stackoverflow.com/a/31900210

  4. Make changes to the source code

  5. Compile your code

    You need to bundle your code, let's run:

    yarn build
    

    Recommended: Webpack can detect changes and build automatically, and Node can serve bundled code from a local HTTPS server:

    yarn serve
    
  6. Add visualization to Looker

    In Looker, add the visualization according to the official documentation.

Project Files

This project consists of the following folders and files:

  • /server: This directory contains everything necessary for serving the compiled visualization code to Looker during development & testing
  • /server/index.js: Node script leveraging Express to serve build file over a local HTTPS server.
  • /server/static/my-custom-viz.js: This visualization's minified distribution file (not included in version control).
  • manifest.lkml: Looker's external dependencies configuration file. The visualization object is defined here.
  • marketplace.json: A JSON file containing information the marketplace installer uses to set up this project.
  • /src: This directory will contain all of the visualization's source code.
  • /src/my-custom-viz.js: The main source code for the visualization.
  • /node_modules: The directory where all of the modules of code that your project depends on (npm packages) are automatically installed.
  • README.md: This is a text file containing useful reference information about this visualization.
  • yarn.lock: Yarn is a package manager alternative to npm. This file serves essentially the same purpose as package-lock.json, just for a different package management system.

looker-custom-viz-boilerplate's People

Contributors

rbob86 avatar

Watchers

 avatar

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.