npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

datavoyager

v2.0.0-alpha.24

Published

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 pa

Downloads

46

Readme

Voyager 2

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).

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.

  • The Voyager 2 visualization tool, which blends manual and automated chart specification – demo at http://vega.github.io/voyager2 and source code at https://github.com/vega/voyager2
  • The Voyager 1 visualization browser -- demo at http://uwdata.github.io/voyager and source code in the vy1 branch of this repository.

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.