{"_id":"@data-prism/expression","_rev":"1-bceb6575c5cf437266a8ea8d67225c09","name":"@data-prism/expression","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@data-prism/expression","version":"0.0.1","type":"module","main":"./dist/src/expression.js","types":"./dist/src/expression.d.ts","exports":{".":"./dist/src/expression.js","./*":{"import":"./src/*.js","require":"./dist/*.js"}},"scripts":{"build":"tsc -p ./tsconfig.json","test":"NODE_ENV=test vitest"},"keywords":[],"author":{"name":"Jake Sower"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","eslint":"^8.34.0","eslint-config-prettier":"^8.6.0","eslint-config-standard":"^17.0.0","prettier":"^2.8.4","typescript":"^5.0.0-beta","typescript-eslint":"^0.0.1-alpha.0","vitest":"^0.28.5"},"publishConfig":{"access":"public"},"private":false,"dependencies":{"lodash-es":"^4.17.21"},"gitHead":"f6583a2150216a1bb65b2caf7e835741b1556308","description":"## Uses","_id":"@data-prism/expression@0.0.1","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-5SDyVH1MqtX/eph0qdHQgml0irxTVKcC5AIORrJEdNxDUQWBEIsNyMsK5oN8unkUD5Vk+RaeApkHpHVD9d3GYQ==","shasum":"3f8683e86258d92e4d459ef927b4f4414deb5dfc","tarball":"https://registry.npmjs.org/@data-prism/expression/-/expression-0.0.1.tgz","fileCount":17,"unpackedSize":95835,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxkTDV6Fgg80vnZFejmI9H1xFRKXg/G2/LmR18d4IdWAIgSa9yvw2Ryym/VLqLcrJW0M4g/jkfYXmNElKZwLs4vho="}]},"_npmUser":{"name":"blossomlib","email":"kind.salt4683@fastmail.com"},"directories":{},"maintainers":[{"name":"blossomlib","email":"kind.salt4683@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expression_0.0.1_1684855480182_0.6504907580898875"},"_hasShrinkwrap":false},"0.0.2":{"name":"@data-prism/expression","version":"0.0.2","type":"module","main":"./dist/src/expression.js","types":"./dist/src/expression.d.ts","exports":{".":"./dist/src/expression.js","./*":{"import":"./src/*.js","require":"./dist/*.js"}},"scripts":{"build":"tsc -p ./tsconfig.json","test":"NODE_ENV=test vitest"},"keywords":[],"author":{"name":"Jake Sower"},"devDependencies":{"@typescript-eslint/eslint-plugin":"^5.52.0","@typescript-eslint/parser":"^5.52.0","eslint":"^8.34.0","eslint-config-prettier":"^8.6.0","eslint-config-standard":"^17.0.0","prettier":"^2.8.4","typescript":"^5.0.0-beta","typescript-eslint":"^0.0.1-alpha.0","vitest":"^0.28.5"},"publishConfig":{"access":"public"},"private":false,"dependencies":{"lodash-es":"^4.17.21"},"gitHead":"8203e184ecd50dd23f1da057aeec0edf88f69310","description":"## Uses","_id":"@data-prism/expression@0.0.2","_nodeVersion":"18.15.0","_npmVersion":"9.5.0","dist":{"integrity":"sha512-DmmN/rBJBhxwUt5lJv0lKi6h65lgIl6yCzE5gcwZrE9OV56LoupxWCPIBpDV7ETFQV1WE56dhnqSUOCdyEcg8g==","shasum":"29990302dc711a6d4adc3cc918e7673d76e72beb","tarball":"https://registry.npmjs.org/@data-prism/expression/-/expression-0.0.2.tgz","fileCount":39,"unpackedSize":187117,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCU1EtCw68o6670QrUT0s6VZ1qDMUx/vEUbQK5cPSKXqQIhANOvfH1yHNpy0LIv0sls5UhN7SnH2S2il4XgDOyz2Gy3"}]},"_npmUser":{"name":"blossomlib","email":"kind.salt4683@fastmail.com"},"directories":{},"maintainers":[{"name":"blossomlib","email":"kind.salt4683@fastmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/expression_0.0.2_1684867599260_0.394771386507234"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-23T15:24:40.109Z","0.0.1":"2023-05-23T15:24:40.360Z","modified":"2023-05-23T18:46:39.615Z","0.0.2":"2023-05-23T18:46:39.494Z"},"maintainers":[{"name":"blossomlib","email":"kind.salt4683@fastmail.com"}],"description":"## Uses","keywords":[],"author":{"name":"Jake Sower"},"readme":"# Data Prism\n\n## Uses\n\n- Remix (derive, filter, sort, etc.)\n- Join (part of remix, but distinct use)\n- Schemify (wrap another source)\n- Upload\n- Add URL (includes permalink/archive)\n- Chart\n\n## Remix\n\n### Operations\n\nOperations are the core concept for remixing. They get used in two ways: collection and application. The collection aspect is when an operation is selected and gather its parameters. Application involves taking that information and applying it to a source.\n\n### Operation Types\n\n#### Combine\n\nA `combine` operation is any operation involving two (or more?) sources. They include joins, set combinations, and appends.\n\n### Derive\n\nA `derive` operation produces one or more new columns based on information in the source. This can be per-row, such as adding two numbers; or calculated from the whole source, such as the percentile of a value across the source.\n\n### Filter\n\nA `filter` collects criteria for which rows should be included in the result source. All filters are per-row and always produce a boolean. (What about \"top 10%\" or the like? Depend on derived columns?)\n\n*TODO: The following headings are not categories of operations, but are useful and familiar enough to make them worthy of their own sections. All could be replecated with the above types except for limiting columns in the result. Well, sorta. The key difference is producing a transformed result source (totally different columns), which using the above types of operations would be difficult, and would require an \"embedded source\" in some fashion. It's totally not worth it.*\n\n### Sort\n\nA `sort` takes a list of columns with a direction and produces a sorted list based on those columns in order, preferring columns earlier in the list.\n\n### Limit & Offset\n\nNot so much an operation, `limit` and `offset` describe how many rows should be in the result set and which index to start with, respectively.\n\n### Group\n\nThe `group` operation takes a list of columns (parameter columns) and produces a result set with the following qualities:\n\n- The result columns will the same as the parameter columns, with the addition of a special column for the original rows.\n- Rows will be composed of each unique combination of the parameter columns with all rows having that combination in the special column.\n- Alternatively, the cartesian product of the unique values of the paremeter columns can be used, with some special columns being empty in some rows.\n\nThe resulting source lends itself to particular `aggregate` operations, such as counting the number of result rows in the special column. These are ultimately identical to `derive` operations. However, it is useful to treat them differently because the central utility of `group` is to apply `aggregate` operations to it, though it is possible to simply preserve the special column if desired. The result source of a `group` is fundamentally different than any other operation type. (A `derive` operation could theoretically be capable of this, but it's impractical and distracting.)\n\n### Column\n\n### Order of Operations\n\n- Join\n- Compute\n- Filter\n- Sort\n- Limit/Offset\n- Group with Aggregates\n\nFollowing this pattern will create a new source, which may be temporary. Keeping things ordered will promote simplicity instead of the hodge-podge operations in any order.\n","readmeFilename":"README.md"}