GithubHelp home page GithubHelp logo

vega / voyager Goto Github PK

View Code? Open in Web Editor NEW
1.4K 51.0 179.0 77.5 MB

Visualization Tool for Data Exploration

Home Page: http://vega.github.io/voyager

License: Other

JavaScript 6.50% HTML 0.14% TypeScript 86.32% Shell 0.30% SCSS 6.67% EJS 0.07%

voyager's Introduction

Voyager 2

Test

Voyager 2 is a data exploration tool that blends manual and automated chart specification. Voyager 2 combines PoleStar, a traditional chart specification tool inspired by Tableau and Polaris (research project that led to the birth of Tableau), with two partial chart specification interfaces: (1) wildcards let users specify multiple charts in parallel,(2) related views suggest visualizations relevant to the currently specified chart. With Voyager 2, we aim to help analysts engage in both breadth-oriented exploration and depth-oriented question answering.

For a quick overview of Voyager, see our preview video, or a 4-minute demo in our Vega-Lite talk at OpenVisConf, or watch our research talk at CHI 2017. For more information about our design, please read our CHI paper and other related papers (1, 2, 3).

Voyager 2 can be used from JupyterLab via the JupyterLab extension for Voyager. The DataVoyager.jl package integrates Voyager 2 into the Julia programming language.

WARNING:

This repository now hosts an alpha version of the migration of Voyager 2 to a React/Redux application. Older versions of Voyager built in AngularJS at the following URL.

Documentation

You can find Voyager documentation on our GitBook.

This documentation is divided into several sections:

Basic Setup

For basic setup for local development or installation, we use yarn for package management. Installing dependencies can be done with:

yarn

Once the installation is complete, use yarn test to run the included tests.

To build a deployable version of the code, run yarn build.

Please see our contributing documentation for more info about setup and coding conventions if you are interested in contributing to this project.

Build Outputs

There are 3 artifacts build using yarn build:

  • Stand alone version of voyager in dist/. This distribution can be hosted on a web server to deploy Voyager.
  • Compiled Javscript and .d.js declaration files for a subset of the Voyager source code in build/src/. These declarations and sources can be included in other packages that use Voyager as a dependency. See voyager-server for an example.
  • Embeddable Voyager build in build/. See below for more details on embedding Voyager in other applications.

Embed Voyager (datavoyager library)

Voyager can be embedded in another web application. The following sections document how to use it.

Installation

Using npm or yarn? Add the following to your package.json then run npm install datavoyager or yarn add datavoyager.

If you want to use the latest development version, you may want to clone and link Voyager.

Example Use

Instantiation

const libVoyager = require('voyager');

const container = document.getElementById("voyager-embed");
const config = undefined;
const data = undefined;
const voyagerInstance = libVoyager.CreateVoyager(container, config, data)

Initializing with data

const data: any = {
  "values": [
    {"fieldA": "A", "fieldB": 28}, {"fieldA": "B", "fieldB": 55}, {"fieldA": "C", "fieldB": 43},
    {"fieldA": "D", "fieldB": 91}, {"fieldA": "E", "fieldB": 81}, {"fieldA": "F", "fieldB": 53},
    {"fieldA": "G", "fieldB": 19}, {"fieldA": "H", "fieldB": 87}, {"fieldA": "I", "fieldB": 52}
  ]
};

const voyagerInstance = libVoyager.CreateVoyager(container, undefined, data)

Updating Data

const voyagerInstance = libVoyager.CreateVoyager(container, undefined, undefined)

const data: any = {
  "values": [
    {"fieldA": "A", "fieldB": 28}, {"fieldA": "B", "fieldB": 55}, {"fieldA": "C", "fieldB": 43},
    {"fieldA": "D", "fieldB": 91}, {"fieldA": "E", "fieldB": 81}, {"fieldA": "F", "fieldB": 53},
    {"fieldA": "G", "fieldB": 19}, {"fieldA": "H", "fieldB": 87}, {"fieldA": "I", "fieldB": 52}
  ]
};

voyagerInstance.updateData(data);

CSS

You currently also need to include the CSS. Note that this has not yet been optimized for embedding (it will take over the whole screen)

<link rel="stylesheet" type="text/css" href="./node_modules/voyager/lib/style.css">

API

The voyager module exposes 1 function.

CreateVoyager(container, config, data)

/**
 * Create an instance of the voyager application and return it.
 *
 * @param {Container} container css selector or HTMLElement that will be the parent
 *                              element of the application
 * @param {Object|undefined}    config    Optional: configuration options
 * @param {Array|undefined}     data      Optional: data object. Can be a string or an array of objects.
 */

Please see src/lib-voyager.tsx to see the exposed public methods.

For information regarding the config parameter, please see src/models/config.ts

The data parameter must follow the inline data format as seen in the vega lite documentation

Voyager-server Mode

Computationally expensive portions of the Voyager process can be configured to run on a server.

To get this running in a local development environment, first clone and install the dependencies of the voyager-server project.

In voyager-server directory, yarn start will start the server running on port 3000.

With voyager-server now running, we can start voyager in server mode by running:

yarn start:server

This will run Voyager in "server-mode" sending requests to voyager-server, which it expects, by default, to be at http://localhost:3000.

The server url is controlled by the SERVER environment variable.

See voyager-server for more information on what portions of the functionality the server handles.

voyager's People

Contributors

abanh206 avatar ajainarayanan avatar andrewfhart avatar davidanthoff avatar dependabot[bot] avatar domoritz avatar espressoroaster avatar felixcodes avatar jazzido avatar joos2010kj avatar kadamwhite avatar kanitw avatar light-and-salt avatar researcherben avatar saulshanabrook avatar siyaol1 avatar ssharif6 avatar starry97 avatar tafsiri avatar vlandham avatar yhoonkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

voyager's Issues

vlplot error in encodingvariatons due to show / hide state

There must be some issues with show/hide states of our special encoding variation pane.

Uncaught TypeError: Cannot read property 'addEventListener' of nullvega.js:2154 
(anonymous function)vega.js:2153 
vg.canvas.Handler.prototype.initializevega.js:7118 
vg.View.prototype.initializevega.js:7184    // can’t find canvas element using d3.js
vg.ViewFactoryVM4677 vlplot.js:24   // although element.find() found something here
(anonymous function)vega.js:5084  
(anonymous function)vega.js:4487 
(anonymous function)vega.js:2910 
(anonymous function)VM4663 d3.js:1954 
(anonymous function)VM4663 d3.js:491 
eventVM4663 d3.js:1907 respond

Vis List

  • display visualization
  • click visualization to open on the right pane

Improve encoding variations display

See #4

  • Improve styling. Need to show what we opened and better style the details pane (encodingVariations).
  • Reflow the details pane on resize (not super important)
  • Animate opening details pane.

Loading “Campaigns” lead to the following errors

TypeError: Cannot read property 'Special Election Status' of undefined
    at http://localhost:3001/vendor/vegalite.js:2001:24
    at Array.forEach (native)
    at Object.vldata.getSchema (http://localhost:3001/vendor/vegalite.js:1997:10)
    at http://localhost:3001/app/dataset/dataset.js:116:36
    at processQueue (http://localhost:3001/bower_components/angular/angular.js:13189:27)
    at http://localhost:3001/bower_components/angular/angular.js:13205:27
    at Scope.$eval (http://localhost:3001/bower_components/angular/angular.js:14401:28)
    at Scope.$digest (http://localhost:3001/bower_components/angular/angular.js:14217:31)
    at Scope.scopePrototype.$digest (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:1468:23)
    at Scope.$apply (http://localhost:3001/bower_components/angular/angular.js:14506:24)

Full Screen View

  • make this the default full screen view #58 76f0178
  • reduce margins
  • add shadows
  • make them clickable (for swapping the main one) 0ea6902
  • make esc works

styling

  • make the main vis big
  • better thumbnail layout .. (don’t use wrap?)

Linking Pills

Mouseover a field pill would highlight other pills of the same field.

(This is an idea from the old prototype)

Building Partials broken with multiple modules

Many tests were failing because of my bugs in directive generator — namely <directive-tag> should be dash-case instead of camelCase (<directiveTag>) and templatefilename.html should be lowercase, not camelcase.

These are fixed in f38f8e6 and now they are fixed in master.

However, new problem emerges. Right now all the directive tests are broken since it can’t find template.

An error looks like this:

Error: Unexpected request: GET components/vlplot/vlplot.html
    No more request expected
        at $httpBackend (/Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular-mocks/angular-mocks.js:1227)
        at sendReq (/Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular/angular.js:9620)
        at /Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular/angular.js:9335
        at processQueue (/Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular/angular.js:13175)
        at /Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular/angular.js:13191
        at /Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular/angular.js:14388
        at /Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular/angular.js:14204
        at /Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/src/components/vlplot/vlplot.spec.js:32
        at invoke (/Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular/angular.js:4182)
        at workFn (/Users/kanitw/Dropbox/_Projects/_idl/_visrec/facetedviz/bower_components/angular-mocks/angular-mocks.js:2350)
    undefined

Minor issue in the deploy script

warning: You ran 'git add' with neither '-A (--all)' or '--ignore-removal',
whose behaviour will change in Git 2.0 with respect to paths you removed.
Paths like 'scripts/app-9806398a.js' that are
removed from your working tree are ignored with this version of Git.

* 'git add --ignore-removal <pathspec>', which is the current default,
  ignores paths you removed from your working tree.

* 'git add --all <pathspec>' will let you also record the removals.

Run 'git status' to check the paths you removed from your working tree.

[gh-pages 9fe8920] release 5f7cc771f1a520e11d96bcd9778095a930debfcc
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename scripts/{app-9806398a.js => app-09f7f368.js} (82%)
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 54.75 KiB | 0 bytes/s, done.
Total 5 (delta 2), reused 0 (delta 0)
To [email protected]:uwdata/facetedviz.git
   7aad68d..9fe8920  gh-pages -> gh-pages

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.