uwdata / arquero-worker

Worker thread support for Arquero.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

arquero-worker

A proof-of-concept implementation of worker thread support for Arquero queries. Forks a worker thread using either a Web Worker or a node.js Worker thread and provides an API for authoring queries, submitting queries to the worker for processing, and fetching the query results.

Example

// create query worker, providing web worker script
const qw = aq.worker('./arquero-worker.min.js');

// load dataset into worker thread
// return value is a query builder with a table verb API
const beers = await qw.load('beers', 'data/beers.csv');

// build a query for beers with the word 'hop' in their name
// fetch the data, query is processed on worker thread
const hops = await beers
  .filter(d => op.match(d.name, /hop/i))
  .select('name', 'abv', 'ibu')
  .orderby('name')
  .fetch();

// print the fetched rows to the console
hops.print();

For more, see the example page and its source code.

Build Instructions

To build and develop arquero-query locally:

About

Worker thread support for Arquero.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 100.0%