Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uwdata/arquero-worker
Worker thread support for Arquero.
https://github.com/uwdata/arquero-worker
Last synced: 7 days ago
JSON representation
Worker thread support for Arquero.
- Host: GitHub
- URL: https://github.com/uwdata/arquero-worker
- Owner: uwdata
- License: bsd-3-clause
- Created: 2020-11-05T12:31:45.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-16T10:10:30.000Z (over 3 years ago)
- Last Synced: 2024-11-02T00:33:04.746Z (11 days ago)
- Language: JavaScript
- Homepage:
- Size: 1.62 MB
- Stars: 22
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A proof-of-concept implementation of worker thread support for [Arquero](https://github.com/uwdata/arquero) queries. Forks a worker thread using either a [Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) or a [node.js Worker thread](https://nodejs.org/api/worker_threads.html) and provides an API for authoring queries, submitting queries to the worker for processing, and fetching the query results.
## Example
```js
// 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](https://uwdata.github.io/arquero-worker/example/) and its [source code](https://github.com/uwdata/arquero-query/blob/main/docs/example/index.html).
## Build Instructions
To build and develop arquero-query locally:
- Clone [https://github.com/uwdata/arquero-worker](https://github.com/uwdata/arquero-worker).
- Run `yarn` to install dependencies for all packages. If you don't have yarn installed, see [https://yarnpkg.com/en/docs/install](https://yarnpkg.com/en/docs/install).
- Run `yarn test` to run test cases, and `yarn build` to build output files.