{"name":"apache-arrow","version":"0.3.0","keywords":["apache","arrow"],"author":{"name":"Apache Software Foundation"},"license":"Apache-2.0","_id":"apache-arrow@0.3.0","homepage":"https://github.com/apache/arrow/blob/master/js/README.md","bugs":{"url":"https://issues.apache.org/jira/projects/ARROW"},"bin":{"arrow2csv":"bin/arrow2csv.js"},"dist":{"shasum":"26400942311a09905ab6638906ad2ea84c9d7b54","tarball":"http://registry-npm.ywwl.com/apache-arrow/download/apache-arrow-0.3.0.tgz","fileCount":89,"integrity":"sha512-ZJvOhB3uQZTZ++nMQLcQ5PRtQSibScEXGQaP2pYJnt1noam52Ttouu9Sps9Ss/tMkUxY+HNS/K77NKR0qV2yvw==","signatures":[{"sig":"MEUCICDZYy69IQnPMNE1uikPJmxdVU2ueCqt1aYeXKGPIos8AiEA2nCk+X3PvCpABVoh0g+Vm6vA4Mq0Nsx7NvnNbRBffAU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4526268,"size":863805,"noattachment":false,"key":"/apache-arrow/-/apache-arrow-0.3.0.tgz"},"main":"Arrow","types":"Arrow.d.ts","module":"Arrow.mjs","@std/esm":{"esm":"mjs","warnings":false,"sourceMap":true},"_npmUser":{"name":"ptaylor","email":"paul.e.taylor@me.com"},"repository":{"url":"git+https://github.com/apache/arrow.git","type":"git"},"_npmVersion":"5.6.0","description":"Apache Arrow columnar in-memory format","directories":{},"_nodeVersion":"9.5.0","dependencies":{"tslib":"1.9.0","@types/node":"9.3.0","flatbuffers":"github:trxcllnt/flatbuffers-esm","json-bignum":"0.0.3","command-line-args":"5.0.1","@types/flatbuffers":"1.6.5","command-line-usage":"4.1.0","text-encoding-utf-8":"^1.0.2","@types/text-encoding-utf-8":"1.0.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/apache-arrow_0.3.0_1519260814626_0.33267624339072754","host":"s3://npm-registry-packages"},"readme":"<!---\n  Licensed to the Apache Software Foundation (ASF) under one\n  or more contributor license agreements.  See the NOTICE file\n  distributed with this work for additional information\n  regarding copyright ownership.  The ASF licenses this file\n  to you under the Apache License, Version 2.0 (the\n  \"License\"); you may not use this file except in compliance\n  with the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n  Unless required by applicable law or agreed to in writing,\n  software distributed under the License is distributed on an\n  \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n  KIND, either express or implied.  See the License for the\n  specific language governing permissions and limitations\n  under the License.\n-->\n\n# [Apache Arrow](https://github.com/apache/arrow) in JS\n\n[![npm version](https://img.shields.io/npm/v/apache-arrow.svg)](https://www.npmjs.com/package/apache-arrow)\n\nArrow is a set of technologies that enable big data systems to process and transfer data quickly.\n\n## Install `apache-arrow` from NPM\n\n`npm install apache-arrow` or `yarn add apache-arrow`\n\n(read about how we [package apache-arrow](#packaging) below)\n\n# Powering Columnar In-Memory Analytics\n\n[Apache Arrow](https://github.com/apache/arrow) is a columnar memory layout specification for encoding vectors and table-like containers of flat and nested data. The Arrow spec aligns columnar data in memory to minimize cache misses and take advantage of the latest SIMD (Single input multiple data) and GPU operations on modern processors.\n\nApache Arrow is the emerging standard for large in-memory columnar data ([Spark](https://spark.apache.org/), [Pandas](https://wesmckinney.com/blog/pandas-and-apache-arrow/), [Drill](https://drill.apache.org/), [Graphistry](https://www.graphistry.com), ...). By standardizing on a common binary interchange format, big data systems can reduce the costs and friction associated with cross-system communication.\n\n# Get Started\n\nCheck out our [API documentation][5] to learn more about how to use Apache Arrow's JS implementation. You can also learn by example by checking out some of the following resources:\n\n* [/js/test/unit](https://github.com/apache/arrow/tree/main/js/test/unit) - Unit tests for Table and Vector\n\n## Cookbook\n\n### Get a table from an Arrow file on disk (in IPC format)\n\n```js\nimport { readFileSync } from 'fs';\nimport { tableFromIPC } from 'apache-arrow';\n\nconst arrow = readFileSync('simple.arrow');\nconst table = tableFromIPC(arrow);\n\nconsole.table(table.toArray());\n\n/*\n foo,  bar,  baz\n   1,    1,   aa\nnull, null, null\n   3, null, null\n   4,    4,  bbb\n   5,    5, cccc\n*/\n```\n\n### Create a Table when the Arrow file is split across buffers\n\n```js\nimport { readFileSync } from 'fs';\nimport { tableFromIPC } from 'apache-arrow';\n\nconst table = tableFromIPC([\n    'latlong/schema.arrow',\n    'latlong/records.arrow'\n].map((file) => readFileSync(file)));\n\nconsole.table([...table]);\n\n/*\n        origin_lat,         origin_lon\n35.393089294433594,  -97.6007308959961\n35.393089294433594,  -97.6007308959961\n35.393089294433594,  -97.6007308959961\n29.533695220947266, -98.46977996826172\n29.533695220947266, -98.46977996826172\n*/\n```\n\n### Create a Table from JavaScript arrays\n\n```js\nimport { tableFromArrays } from 'apache-arrow';\n\nconst LENGTH = 2000;\n\nconst rainAmounts = Float32Array.from(\n    { length: LENGTH },\n    () => Number((Math.random() * 20).toFixed(1)));\n\nconst rainDates = Array.from(\n    { length: LENGTH },\n    (_, i) => new Date(Date.now() - 1000 * 60 * 60 * 24 * i));\n\nconst rainfall = tableFromArrays({\n    precipitation: rainAmounts,\n    date: rainDates\n});\n\nconsole.table([...rainfall]);\n```\n\n### Load data with `fetch`\n\n```js\nimport { tableFromIPC } from \"apache-arrow\";\n\nconst table = await tableFromIPC(fetch(\"/simple.arrow\"));\n\nconsole.table([...table]);\n```\n\n### Vectors look like JS Arrays\n\nYou can create vector from JavaScript typed arrays with `makeVector` and from JavaScript arrays with `vectorFromArray`. `makeVector` is a lot faster and does not require a copy.\n\n```js\nimport { makeVector } from \"apache-arrow\";\n\nconst LENGTH = 2000;\n\nconst rainAmounts = Float32Array.from(\n    { length: LENGTH },\n    () => Number((Math.random() * 20).toFixed(1)));\n\nconst vector = makeVector(rainAmounts);\n\nconst typed = vector.toArray()\n\nassert(typed instanceof Float32Array);\n\nfor (let i = -1, n = vector.length; ++i < n;) {\n    assert(vector.get(i) === typed[i]);\n}\n```\n\n### String vectors\n\nStrings can be encoded as UTF-8 or dictionary encoded UTF-8. Dictionary encoding encodes repeated values more efficiently. You can create a dictionary encoded string conveniently with `vectorFromArray` or efficiently with `makeVector`.\n\n```js\nimport { makeVector, vectorFromArray, Dictionary, Uint8, Utf8 } from \"apache-arrow\";\n\nconst utf8Vector = vectorFromArray(['foo', 'bar', 'baz'], new Utf8);\n\nconst dictionaryVector1 = vectorFromArray(\n    ['foo', 'bar', 'baz', 'foo', 'bar']\n);\n\nconst dictionaryVector2 = makeVector({\n    data: [0, 1, 2, 0, 1],  // indexes into the dictionary\n    dictionary: utf8Vector,\n    type: new Dictionary(new Utf8, new Uint8)\n});\n```\n\n# Getting involved\n\nSee [DEVELOP.md](DEVELOP.md)\n\nEven if you do not plan to contribute to Apache Arrow itself or Arrow\nintegrations in other projects, we'd be happy to have you involved:\n\n* Join the mailing list: send an email to\n  [dev-subscribe@arrow.apache.org][1]. Share your ideas and use cases for the\n  project\n* Follow our activity on [GitHub issues][3]\n* [Learn the format][2]\n* Contribute code to one of the reference implementations\n\nWe prefer to receive contributions in the form of GitHub pull requests.\nPlease send pull requests against the [github.com/apache/arrow][4] repository.\n\nIf you are looking for some ideas on what to contribute, check out the [GitHub\nissues][3] for the Apache Arrow project. Comment on the issue and/or contact\n[dev@arrow.apache.org](https://mail-archives.apache.org/mod_mbox/arrow-dev/)\nwith your questions and ideas.\n\nIf you’d like to report a bug but don’t have time to fix it, you can still post\nit on GitHub issues, or email the mailing list\n[dev@arrow.apache.org](https://mail-archives.apache.org/mod_mbox/arrow-dev/)\n\n## Packaging\n\n`apache-arrow` is written in TypeScript, but the project is compiled to multiple JS versions and common module formats.\n\nThe base `apache-arrow` package includes all the compilation targets for convenience, but if you're conscientious about your `node_modules` footprint, we got you.\n\nThe targets are also published under the `@apache-arrow` namespace:\n\n```sh\nnpm install apache-arrow # <-- combined es2015/CommonJS/ESModules/UMD + esnext/UMD\nnpm install @apache-arrow/ts # standalone TypeScript package\nnpm install @apache-arrow/es5-cjs # standalone es5/CommonJS package\nnpm install @apache-arrow/es5-esm # standalone es5/ESModules package\nnpm install @apache-arrow/es5-umd # standalone es5/UMD package\nnpm install @apache-arrow/es2015-cjs # standalone es2015/CommonJS package\nnpm install @apache-arrow/es2015-esm # standalone es2015/ESModules package\nnpm install @apache-arrow/es2015-umd # standalone es2015/UMD package\nnpm install @apache-arrow/esnext-cjs # standalone esNext/CommonJS package\nnpm install @apache-arrow/esnext-esm # standalone esNext/ESModules package\nnpm install @apache-arrow/esnext-umd # standalone esNext/UMD package\n```\n\n### Why we package like this\n\nThe JS community is a diverse group with a varied list of target environments and tool chains. Publishing multiple packages accommodates projects of all stripes.\n\nIf you think we missed a compilation target and it's a blocker for adoption, please open an issue.\n\n### Supported Browsers and Platforms\n\nThe bundles we compile support moderns browser released in the last 5 years. This includes supported versions of\nFirefox, Chrome, Edge, and Safari. We do not actively support Internet Explorer.\nApache Arrow also works on [maintained versions of Node](https://nodejs.org/en/about/releases/).\n\n# People\n\nFull list of broader Apache Arrow [committers](https://arrow.apache.org/committers/).\n\n* Brian Hulette, _committer_\n* Paul Taylor, _committer_\n* Dominik Moritz, _committer_\n\n# Powered By Apache Arrow in JS\n\nFull list of broader Apache Arrow [projects & organizations](https://arrow.apache.org/powered_by/).\n\n## Open Source Projects\n\n* [Apache Arrow](https://arrow.apache.org) -- Parent project for Powering Columnar In-Memory Analytics, including affiliated open source projects\n* [Perspective](https://github.com/finos/perspective) -- Perspective is an interactive analytics and data visualization component well-suited for large and/or streaming datasets. Perspective leverages Arrow C++ compiled to WebAssembly.\n* [Falcon](https://github.com/uwdata/falcon) is a visualization tool for linked interactions across multiple aggregate visualizations of millions or billions of records.\n* [Vega](https://github.com/vega) is an ecosystem of tools for interactive visualizations on the web. The Vega team implemented an [Arrow loader](https://github.com/vega/vega-loader-arrow).\n* [Arquero](https://github.com/uwdata/arquero) is a library for query processing and transformation of array-backed data tables.\n* [OmniSci](https://github.com/omnisci/mapd-connector) is a GPU database. Its JavaScript connector returns Arrow dataframes.\n\n# License\n\n[Apache 2.0](https://github.com/apache/arrow/blob/main/LICENSE)\n\n[1]: mailto:dev-subscribe@arrow.apache.org\n[2]: https://github.com/apache/arrow/tree/main/format\n[3]: https://github.com/apache/arrow/issues\n[4]: https://github.com/apache/arrow\n[5]: https://arrow.apache.org/docs/js/\n","publish_time":1519260814828,"maintainers":[{"name":"ptaylor","email":"paul.e.taylor@me.com"},{"name":"kou","email":"kou@cozmixng.org"},{"name":"xhochy","email":"uwelk@xhochy.com"},{"name":"wesm","email":"wesmckinn+npm@gmail.com"},{"name":"kszucs","email":"szucs.krisztian@gmail.com"},{"name":"jorgecarleitao","email":"jorgecarleitao@gmail.com"},{"name":"raulcd","email":"raulcumplido@gmail.com"}],"_cnpm_publish_time":1519260814828,"dist-tags":{"latest":"21.2.0"}}