New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

falcon-vis

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

falcon-vis

[![npm version](https://img.shields.io/npm/v/falcon-vis.svg)](https://www.npmjs.com/package/falcon-vis) ![Tests](https://github.com/cmudig/falcon/workflows/Node.js%20CI/badge.svg) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-f

  • 0.17.2
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-88.89%
Maintainers
3
Weekly downloads
 
Created
Source

FalconVis

npm version Tests code style: prettier

🚧 Work in Progress

npm install falcon-vis

A simple javascript API to link visualizations at scale. FalconVis is a successor to vega/falcon.

Finally, you can cross-filter all the data you've been hoarding without the large delays or slowdowns. Interactions are smooth, fast, and responsive.

Live Browser Examples

Example

Check out real examples in the examples/ directory. If you want a quick sneak-peak, keep reading.

TODO make this section more clear.

Initialization

Create a the falcon instance and link it up to some data and some views.

import { FalconVis, JsonDB } from "falcon-vis";

/**
 * 1. create the falcon instance with a database
 */
const plainOldJavascriptObject = await fetch("flights-10k.json").then((d) =>
	d.json()
);
const db = new JsonDB(plainOldJavascriptObject);
falcon = new FalconVis(db);

/**
 * 2. create the views (you interact with these directly to cross-filter)
 */
// 0D is total count (num rows)
const countView = await falcon.view0D();
countView.onChange((updatedTotalCount) => {
	// called every time the count changes
	console.log(updatedTotalCount); // you can do whatever in here
});

// 1D is a histogram
const distanceView = await falcon.view1D({
	type: "continuous",
	name: "Distance",
	resolution: 400,
	bins: 5,
});
distanceView.onChange((updatedHistogram) => {
	console.log(updatedHistogram);
});

/**
 * 3. initialize falcon by linking everything together
 */
await falcon.link();

Cross-filtering

The view you that you want to filter is the active view. Once you do filter an active view, the onChange callbacks will be called with the updated counts for all the other linked views.

/**
 * 1. make the view you are interacting with active
 *    this computes the fast falcon index in the background
 */
await distanceView.activate();

/**
 * 2. select/filter a range between 0 and 100
 */
await distanceView.select([0, 100]);

API Reference

TODO fill in and add examples

Core


# index.view0D()


# index.view1D()


# index.link()


# index.entries()


# view.activate()


# view.select()


# view.onChange()

Databases


# JsonDB
# ArrowDB
# DuckDB
# HttpDB

Development

Check out the CONTRIBUTING.md document to see how to run the development server.

FAQs

Package last updated on 17 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc