simple statistics for node & browser javascript

Overview

Simple Statistics

A JavaScript implementation of descriptive, regression, and inference statistics.

Coverage Status npm version

Implemented in literate JavaScript with no dependencies, designed to work in all modern browsers (including IE) as well as in node.js.

Installation

  • I'm using Node.js, Webpack, Browserify, Rollup, or another module bundler, and install packages from npm.
    • First, install the simple-statistics module, using npm install simple-statistics, then include the code with require or import:
    • I use the require function to use modules in my project. (most likely)
      • When you use require, you have the freedom to assign the module to any variable name you want, but you need to specify the module's name exactly: in this case, 'simple-statistics'. The require method returns an object with all of the module's methods attached to it.
        var ss = require('simple-statistics')
    • I use import to use modules in my project. I'm probably using Babel, @std/esm, Webpack, or Rollup.
      • Import all functions under the ss object:
        import * as ss from 'simple-statistics'
        Include a specific named export:
        import {min} from 'simple-statistics'
        Simple statistics has only named exports for ES6.
  • I'm using Deno.
  • I'm not using a module bundler. I'm writing a web page, and want to include simple-statistics using a script tag.
    • I want to support all browsers
      • When you use simple-statistics from a script tag, you don't get to choose the variable name it is assigned to: simple-statistics will always become available globally as the variable ss. You can reassign this variable to another name if you want to, but doing so is optional.
        <script src='https://unpkg.com/[email protected]/dist/simple-statistics.min.js'>
        </script>
    • I want to use ES6 modules in a browser and I'm willing to only support new browsers to do it
      • This module works great with the ?module query parameter of unpkg. If you specify type='module' in your script tag, you'll be able to import simple-statistics directly - through index.js and with true ES6 import syntax and behavior.
        <script type='module'>
        import {min} from "https://unpkg.com/[email protected]/index.js?module"
        console.log(min([1, 2, 3]))
        </script>
        This feature is still experimental in unpkg and very bleeding-edge.
Comments
  • [Help] Linear Regression examples

    [Help] Linear Regression examples

    I know there's an example on Linear Regression but that is done by including D3 libraries to draw the plots etc. My requirement is to create simple plots/lines using linear regression on a mapbox project using the leafletjs API. I don't think there's a need to include the D3 libraries et. all for this purpose. There must be an easier way out. All I need is to display a line on the map, which can be achieved by using Polylines. I'm just not sure how the values returned by the linearRegression() or linearRegressionLine() functions can be used for this purpose.

    Any help would be much appreciated.

    opened by tinvaan 22
  • Update rollup to the latest version 🚀

    Update rollup to the latest version 🚀

    Version 0.61.0 of rollup was just published.

    Dependency [rollup](https://github.com/rollup/rollup)
    Current Version 0.60.7
    Type devDependency

    The version 0.61.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of rollup.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Commits

    The new version differs by 24 commits.

    • 8112edc 0.61.0
    • 2361e3d Fix memory leak, remove solo from test and fix tests by adding proper default
    • 9fc1294 Add release date
    • 43d01fd Update changelog
    • d4aed73 Allow to disable __esModule (#2287)
    • 9de98ce Update changelog
    • 605bdfc add vscode debugger settings (#2276)
    • 2ce4a28 Merge branch 'double-declarations'
    • 8cacd62 Separate collection and reassignment of initializers for double declarations
    • 39cc149 Skip default property test on node 4
    • dd35b6e Track reassignments of array elements
    • 7911882 Track reassignments of pattern defaults
    • 6bedd8c * No longer reassign variable initializers during initialization phase
    • 41d6fe8 Merge branch 'transform-dependencies'
    • 1b18909 feature: transform dependencies (#1203), watcher fixes #2280, #2281

    There are 24 commits in total.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 11
  • Update rollup to the latest version 🚀

    Update rollup to the latest version 🚀

    Version 0.54.0 of rollup was just published.

    Dependency rollup
    Current Version 0.53.4
    Type devDependency

    The version 0.54.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of rollup.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Commits

    The new version differs by 64 commits.

    • 0a988e0 0.54.0
    • db0a0fc Update changelog
    • d6df037 Merge branch 'kellyselden-unused' into release-0.54.0
    • d6aea92 Merge branch 'KingHenne-fix-ts-issues' into release-0.54.0
    • 46f273f Merge branch 'kellyselden-line-collapse' into release-0.54.0
    • bd45dea 0.53.4
    • a61840b Update changelog
    • 238e822 Update changelog
    • d665a43 chore(build): add stripInternal and only emit types from node entry point
    • 3fc7662 chore: clean up internal types and install missing @types
    • 57a527c Quick fix to enable tree-shaking babel-helpers again.
    • 01d38e8 * Use enum for node types
    • 8270798 fix: use chalk.supportColors rather than isTTY
    • 8ce5592 * Refactor ExecutionPathOptions types
    • 856ff0f docs: typescripts is always written as a single word

    There are 64 commits in total.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 11
  • Update flow-bin to the latest version 🚀

    Update flow-bin to the latest version 🚀

    Version 0.60.0 of flow-bin was just published.

    Dependency flow-bin
    Current Version 0.59.0
    Type devDependency

    The version 0.60.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of flow-bin.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Commits

    The new version differs by 3 commits.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 10
  • Update flow-bin to the latest version 🚀

    Update flow-bin to the latest version 🚀

    Version 0.80.0 of flow-bin was just published.

    Dependency flow-bin
    Current Version 0.79.1
    Type devDependency

    The version 0.80.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of flow-bin.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    Commits

    The new version differs by 1 commits.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 9
  • Update rollup to the latest version 🚀

    Update rollup to the latest version 🚀

    Version 0.51.0 of rollup was just published.

    Dependency rollup
    Current Version 0.50.1
    Type devDependency

    The version 0.51.0 is not covered by your current version range.

    If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

    It might be worth looking into these changes and trying to get this project onto the latest version of rollup.

    If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 9
  • Implementing Typescript

    Implementing Typescript

    Implementing Typescript (proposal)

    To make it easier to maintain, the Typescript definition is almost an exact copy of the origin Javascript files, the main index.js export remains the same and all the methods are simply copying the function definition.

    Things to think about

    • Include the JSDocs in the typescript definitions that way VSCode's intellisense will still capture all the @example & descriptions.
    • Automating JSDocs updates to Typescript definition (that way you only need to maintain the Javascript files and not worry about the Typescript definitions)
    • Better to have multiple d.ts files for each module since some of the modules are Classes and those can get quite complex instead of pure functions. Also having multiple .d.ts files will be easier to automate update JSDocs.
    • Added test/types.ts to make sure the Typescript definition are properly working, we could eventually automate this to pull this down from the @example in the JSDocs. Note: this doesn't actually test if the method works or not, it only tests if the Typescript definition works properly for it's input/output.

    Implemented the following definitions:

    • [x] addToMean
    • [x] combineMeans
    • [x] combineVariances
    • [x] geometricMean
    • [x] harmonicMean
    • [x] average
    • [x] median
    • [x] medianSorted
    • [x] subtractFromMean
    • [x] A lot more to do...
    typescript waiting-review 
    opened by DenisCarriere 9
  • An in-range update of tap is breaking the build 🚨

    An in-range update of tap is breaking the build 🚨

    The devDependency tap was updated from 14.2.0 to 14.2.1.

    🚨 View failing branch.

    This version is covered by your current version range and after updating it in your project the build failed.

    tap is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

    Status Details
    • ci/circleci: Your tests failed on CircleCI (Details).

    Commits

    The new version differs by 8 commits.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 8
  • Proof Ckmeans

    Proof Ckmeans

    • Get a instrumented version of the R library working
    • Add this result as a testcase https://github.com/simple-statistics/simple-statistics/pull/118#issuecomment-130608728 and figure out what's going on with it
    opened by tmcw 8
  • An in-range update of uglify-js is breaking the build 🚨

    An in-range update of uglify-js is breaking the build 🚨

    Version 3.4.3 of uglify-js was just published.

    Branch Build failing 🚨
    Dependency uglify-js
    Current Version 3.4.2
    Type devDependency

    This version is covered by your current version range and after updating it in your project the build failed.

    uglify-js is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

    Status Details
    • ci/circleci Your tests failed on CircleCI Details

    Release Notes v3.4.3

     

    Commits

    The new version differs by 5 commits.

    See the full diff

    FAQ and help

    There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


    Your Greenkeeper Bot :palm_tree:

    greenkeeper 
    opened by greenkeeper[bot] 7
  • Use quickselect to significantly speed up median and quantile

    Use quickselect to significantly speed up median and quantile

    A work in progress, closes #145. The first commit implements median using quickselect, making it much faster — from O(N log N) to O(N) for unsorted input.

    For a sample benchmark on 1 million random numbers, the current implementation runs in 755ms. The new one is 28ms — 27 times faster.

    Remaining tasks if the approach is approved:

    • [x] rewrite quantile using quickselection
    • [x] pull quickselect into the repo
    • [x] clean up new quantile implementation, add comments
    • [ ] add nthElement to the API (a generalization of min and max for any n)

    cc @tmcw HAPPY BIRTHDAY!!! :cake: :cake: :cake:

    opened by mourner 7
  • build(deps-dev): bump typescript from 4.9.3 to 4.9.4

    build(deps-dev): bump typescript from 4.9.3 to 4.9.4

    Bumps typescript from 4.9.3 to 4.9.4.

    Release notes

    Sourced from typescript's releases.

    TypeScript 4.9.4

    For release notes, check out the release announcement.

    For the complete list of fixed issues, check out the

    Downloads are available on:

    Changes:

    • e2868216f637e875a74c675845625eb15dcfe9a2 Bump version to 4.9.4 and LKG.
    • eb5419fc8d980859b98553586dfb5f40d811a745 Cherry-pick #51704 to release 4.9 (#51712)
    • b4d382b9b12460adf2da4cc0d1429cf19f8dc8be Cherry-pick changes for narrowing to tagged literal types.
    • e7a02f43fce47e1a39259ada5460bcc33c8e98b5 Port of #51626 and #51689 to release-4.9 (#51627)
    • 1727912f0437a7f367d90040fc4b0b4f3efd017a Cherry-pick fix around visitEachChild to release-4.9. (#51544)

    This list of changes was auto generated.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps-dev): bump documentation from 14.0.0 to 14.0.1

    build(deps-dev): bump documentation from 14.0.0 to 14.0.1

    Bumps documentation from 14.0.0 to 14.0.1.

    Changelog

    Sourced from documentation's changelog.

    14.0.1 (2022-12-14)

    Improvements

    • chore: upgrade git-url-parse to 13.1.0 to fix vulnerabilities #1565
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps-dev): bump prettier from 2.8.0 to 2.8.1

    build(deps-dev): bump prettier from 2.8.0 to 2.8.1

    Bumps prettier from 2.8.0 to 2.8.1.

    Release notes

    Sourced from prettier's releases.

    2.8.1

    🔗 Changelog

    Changelog

    Sourced from prettier's changelog.

    2.8.1

    diff

    Fix SCSS map in arguments (#9184 by @​agamkrbit)

    // Input
    $display-breakpoints: map-deep-merge(
      (
        "print-only": "only print",
        "screen-only": "only screen",
        "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm")-1})",
      ),
      $display-breakpoints
    );
    

    // Prettier 2.8.0 $display-breakpoints: map-deep-merge( ( "print-only": "only print", "screen-only": "only screen", "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, " sm ")-1})", ), $display-breakpoints );

    // Prettier 2.8.1 $display-breakpoints: map-deep-merge( ( "print-only": "only print", "screen-only": "only screen", "xs-only": "only screen and (max-width: #{map-get($grid-breakpoints, "sm")-1})", ), $display-breakpoints );

    Support auto accessors syntax (#13919 by @​sosukesuzuki)

    Support for Auto Accessors Syntax landed in TypeScript 4.9.

    (Doesn't work well with babel-ts parser)

    class Foo {
      accessor foo: number = 3;
    </tr></table> 
    

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps-dev): bump eslint from 8.28.0 to 8.31.0

    build(deps-dev): bump eslint from 8.28.0 to 8.31.0

    Bumps eslint from 8.28.0 to 8.31.0.

    Release notes

    Sourced from eslint's releases.

    v8.31.0

    Features

    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)

    Bug Fixes

    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)

    Documentation

    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)

    Chores

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0

    Features

    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)

    Bug Fixes

    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)

    Documentation

    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)

    ... (truncated)

    Changelog

    Sourced from eslint's changelog.

    v8.31.0 - December 31, 2022

    • 65d4e24 chore: Upgrade @​eslint/eslintrc@​1.4.1 (#16729) (Brandon Mills)
    • 35439f1 fix: correct syntax error in prefer-arrow-callback autofix (#16722) (Francesco Trotta)
    • 87b2470 fix: new instance of FlatESLint should load latest config file version (#16608) (Milos Djermanovic)
    • 8d93081 chore: fix CI failure (#16721) (Sam Chen)
    • 4339dc4 docs: Update README (GitHub Actions Bot)
    • 8f17247 chore: Set up automatic updating of README (#16717) (Nicholas C. Zakas)
    • 4e4049c docs: optimize code block structure (#16669) (Sam Chen)
    • 54a7ade docs: do not escape code blocks of formatters examples (#16719) (Sam Chen)
    • 52c7c73 feat: check assignment patterns in no-underscore-dangle (#16693) (Milos Djermanovic)
    • e5ecfef docs: Add function call example for no-undefined (#16712) (Elliot Huffman)
    • a3262f0 docs: Add mastodon link (#16638) (Amaresh S M)
    • 4cd87cb ci: bump actions/stale from 6 to 7 (#16713) (dependabot[bot])
    • a14ccf9 docs: clarify files property (#16709) (Sam Chen)
    • 3b29eb1 docs: fix npm link (#16710) (Abdullah Osama)
    • fd20c75 chore: sort package.json scripts in alphabetical order (#16705) (Darius Dzien)
    • a638673 docs: fix search bar focus on Esc (#16700) (Shanmughapriyan S)
    • f62b722 docs: country flag missing in windows (#16698) (Shanmughapriyan S)
    • 4d27ec6 docs: display zh-hans in the docs language switcher (#16686) (Percy Ma)
    • 8bda20e docs: remove manually maintained anchors (#16685) (Percy Ma)
    • b401cde feat: add options to check destructuring in no-underscore-dangle (#16006) (Morten Kaltoft)
    • b68440f docs: User Guide Getting Started expansion (#16596) (Ben Perlmutter)
    • 30d0daf feat: group properties with values in parentheses in key-spacing (#16677) (Francesco Trotta)
    • 10a5c78 chore: update ignore patterns in eslint.config.js (#16678) (Milos Djermanovic)

    v8.30.0 - December 16, 2022

    • f2c4737 chore: upgrade @​eslint/eslintrc@​1.4.0 (#16675) (Milos Djermanovic)
    • 1a327aa fix: Ensure flat config unignores work consistently like eslintrc (#16579) (Nicholas C. Zakas)
    • 075ef2c feat: add suggestion for no-return-await (#16637) (Daniel Bartholomae)
    • ba74253 chore: standardize npm script names per #14827 (#16315) (Patrick McElhaney)
    • 6a8cd94 docs: Clarify Discord info in issue template config (#16663) (Nicholas C. Zakas)
    • 0d9af4c ci: fix npm v9 problem with file: (#16664) (Milos Djermanovic)
    • 7190d98 feat: update globals (#16654) (Sébastien Règne)
    • ad44344 docs: CLI documentation standardization (#16563) (Ben Perlmutter)
    • 90c9219 refactor: migrate off deprecated function-style rules in all tests (#16618) (Bryan Mishkin)
    • 9b8bb72 fix: autofix recursive functions in no-var (#16611) (Milos Djermanovic)
    • 293573e docs: fix broken line numbers (#16606) (Sam Chen)
    • fa2c64b docs: use relative links for internal links (#16631) (Percy Ma)
    • 75276c9 docs: reorder options in no-unused-vars (#16625) (Milos Djermanovic)
    • 7276fe5 docs: Fix anchor in URL (#16628) (Karl Horky)
    • 6bef135 docs: don't apply layouts to html formatter example (#16591) (Tanuj Kanti)
    • dfc7ec1 docs: Formatters page updates (#16566) (Ben Perlmutter)
    • 8ba124c docs: update the prefer-const example (#16607) (Pavel)
    • e6cb05a docs: fix css leaking (#16603) (Sam Chen)

    v8.29.0 - December 2, 2022

    • 0311d81 docs: Configuring Plugins page intro, page tweaks, and rename (#16534) (Ben Perlmutter)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps-dev): bump rollup from 3.5.1 to 3.9.0

    build(deps-dev): bump rollup from 3.5.1 to 3.9.0

    Bumps rollup from 3.5.1 to 3.9.0.

    Release notes

    Sourced from rollup's releases.

    v3.9.0

    3.9.0

    2022-12-28

    Features

    • Support ES2022 arbitrary module namespace identifiers (#4770)
    • Add optional version property to plugin type (#4771)

    Pull Requests

    v3.8.1

    3.8.1

    2022-12-23

    Bug Fixes

    • Reduce memory footprint when explicitly passing cache: false (#4762)
    • Fix a crash when preserving modules and reexporting namespaces (#4766)

    Pull Requests

    v3.8.0

    3.8.0

    2022-12-22

    Features

    • Deduplicate ESM exports and reexports when preserving modules (#4759)

    Bug Fixes

    • Handle files that are emitted as a side effect of the manualChunks option (#4759)

    Pull Requests

    ... (truncated)

    Changelog

    Sourced from rollup's changelog.

    3.9.0

    2022-12-28

    Features

    • Support ES2022 arbitrary module namespace identifiers (#4770)
    • Add optional version property to plugin type (#4771)

    Pull Requests

    3.8.1

    2022-12-23

    Bug Fixes

    • Reduce memory footprint when explicitly passing cache: false (#4762)
    • Fix a crash when preserving modules and reexporting namespaces (#4766)

    Pull Requests

    3.8.0

    2022-12-22

    Features

    • Deduplicate ESM exports and reexports when preserving modules (#4759)

    Bug Fixes

    • Handle files that are emitted as a side effect of the manualChunks option (#4759)

    Pull Requests

    3.7.5

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • datapoint labels

    datapoint labels

    is there a way to label datapoints to know their origin?

    array = [{id:'1', value: 1}, {id:'2', value: 2}]
    max(array)
    
    // or at least something like:
    
    array = [[1,'x'], [2,'y']]
    
    opened by hp8wvvvgnj6asjm7 2
Releases(v2.2.0)
  • v2.2.0(Oct 20, 2016)

    • Improved Ckmeans algorithm from the updated R project that dramatically increases performance.
    • Adds permutationHeap method for computing all permutations of an array.
    • Adds combinations for combinations without replacement
    • Adds combinationsReplacement for combinations with replacement
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Jun 2, 2016)

    New features:

    • product: returns the product of a series of numbers
    • medianSorted: exposes the internal method of median that only operates on sorted arrays and works in constant time
    • modeSorted: exposes the internal method of mode and works in linear time.

    Specifications:

    • Adds Flow annotations to all methods, allowing up-front typechecking if you use Flow in your application.

    Changes:

    • Invalid input now uniformly produces the value NaN instead of previously a mix of null and undefined.
    • The method sortedUniqueCount is now called uniqueCountSorted to match the other sorted methods, medianSorted and modeSorted

    Fixes:

    • equalIntervalBreaks was not exported by index.js, and now is.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Nov 30, 2015)

    Fixes:

    • Fixes to ckmeans algorithm (thanks to @llimllib) (#125)

    Housekeeping:

    • Add keywords to package. Fixes #120
    • Standardize indentation, add example for epsilon
    • Browser testing with Sauce Labs

    Bundle size optimizations:

    • Add external sourcemaps for minified and unminified standalone bundles
    • Use bundle-collapser for smaller bundles
    • Indicate numericSort as an internal method.
    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Aug 10, 2015)

    This is the first major release of simple-statistics. It represents the work of 18 contributors, many improvements and battle-testing in over 3 years of development.

    There are also several major changes that happened in this release.

    In the course of many great additions, the monolithic simple_statistics.js file grew to over 1,500 lines, making it relatively unwieldy to develop. This release adopts the node require() method to split the methods into small focused files. This doesn't mean that node is required: a robust browser distribution is now provided in uncompressed & compressed forms under the /dist directory, and tools like browserify and webpack make it very convenient to use this kind of module unchanged.

    The original simple-statistics absorbed one of my transgressions against JavaScript code style: underscore naming instead of camelCase naming. v1.0.0 reverses this decision, adopting the near-universal camelCase naming style for all methods.

    v1.0.0 keeps all of the literate documentation that helps make tricky statistical methods understandable, but adds a big new documentation component: JSDoc, interpreted through documentation.js. documentation.js has been a side project of mine for quite a while now and this API-style documentation has proven to be a more scannable & uniformly styled counterpart to literate documentation. This also means that we're showing many more code samples inline with documentation to make it immediately clear what input and output types are used with each method.

    On the algorithmic side, an implementation of Ckmeans clustering by Haizhou Wang and Mingzhou Song replaces the implementation of Jenks clustering ported from the original Fortran. A big thanks to Mason Lai for pointing me to this great research that establishes a more consistent, better explained, and faster implementation of the clustering problem.

    Full changelog to follow:


    1.0.0

    Breaking Changes

    • Removed the .m() and .b() shortcuts from the linear regression class. Use .mb().b and .mb().m instead.
    • linearRegression is now a function, and linearRegressionLine is a separate function.

    UPGRADING

    Linear Regression

    Before:

    var l = ss.linear_regression().data([[0, 0], [1, 1]]);
    l.line()(0); // 0
    

    After:

    var line = ss.linearRegressionLine(ss.linearRegression([[0, 0], [1, 1]]));
    line(0); // 0
    

    Jenks -> ckmeans

    The implementation of Jenks natural breaks was removed: an implementation of Ckmeans, an improvement on its technique, is added. Ckmeans should work better for nearly all Jenks usecases.

    Before:

    ss.jenks([1, 2, 4, 5, 7, 9, 10, 20], 3) //= [1, 7, 20, 20]
    

    After:

    ss.ckmeans([1, 2, 4, 5, 7, 9, 10, 20], 3))
    //= [ [ 1,  2,  4,  5, 7, 9 ],  [ 10 ],  [ 20 ] ]
    

    Instead of class breaks, ckmeans returns clustered data. Class breaks can be derived by taking the first value from each cluster:

    var breaks = ss.ckmeans([1, 2, 4, 5, 7, 9, 10, 20], 3)).map(function(cluster) {
      return cluster[0];
    });
    
    • BayesModel is now a class
    • PerceptronModel is now a class, and the weights and bias members are accessable as properties rather than methods.
    • All multi-word method names are now camelCase rather than underscore_cased: this means that a method like ss.r_squared is now accessible as ss.rSquared

    New Features

    • Ckmeans replaces Jenks
    • sortedUniqueCount provides an extremely fast method for counting unique values of sorted arrays.
    • sumNthPowerDeviations is now exposed, providing a simple way to calculate the fundamental aspect of measures like variance and skewness.

    Non-Breaking Changes

    • JSDoc documentation throughout
    • Each function is now its own file, and simple-statistics is assembled with CommonJS-style require() statements. simple-statistics can still be used in a browser with browserify.
    • The standard normal table is now calculated using the cumulative distribution function, rather than hardcoded.
    Source code(tar.gz)
    Source code(zip)
    simple_statistics.js(83.87 KB)
    simple_statistics.min.js(19.06 KB)
Owner
simple statistics
statistics in javascript with a focus on friendliness
simple statistics
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Statistics toolkit for JavaScript

statkit A statistics toolkit for javascript. Usage Install using npm: npm install statkit Fit a linear regression model using MCMC: var sk = require(

Erik Rigtorp 50 Dec 19, 2022
A tool to get plugin statistics of Obsidian plugin ecosystem.

Obsidian Plugin Stats A tool to get plugin statistics of Obsidian plugin ecosystem. Usage You can use this tool to see the plugins that has hit commun

Ganessh Kumar 27 Dec 25, 2022
My personal profile with dynamic github statistics, coding infos, music status with the spotify API.

Oh, Hello there ?? My name's Mouhcine, A recent bachelor Graduate Security Researcher/Student from ???? . Currently Working on other projects. ?? Soci

Mouhcine 18 Oct 29, 2022
An app to test out your typing speed, save your progress and view statistics against them.

Introduction An app to test out your typing speed, save your progress and view statistics against them. Demo Check out the quick demo here. Getting St

Nithin Kumar B 2 Sep 7, 2022
Statistics plugin for RemNote that will give you some helpful numbers, charts and heatmap for your knowledge base.

RemNote statistics plugin Features This plugin will give you the following statistics: Retention rate Number of cards due in future Type of buttons yo

Henrik 3 Sep 9, 2022
📊🌍 Super small, light, privacy-focused, self-hostable web statistics provider

femtostats Update: It turns out Fathom Lite does everything I wanted to do except custom events for free, so I'm going to stop working on this for now

Ian Langworth ☠ 12 Nov 17, 2022
UAParser.js - Detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data. Supports browser & node.js environment.

UAParser.js JavaScript library to detect Browser, Engine, OS, CPU, and Device type/model from User-Agent data with relatively small footprint (~17KB m

Faisal Salman 7.4k Jan 4, 2023
Ping.js is a small and simple Javascript library for the browser to "ping" response times to web servers in Javascript

Ping.js Ping.js is a small and simple Javascript library for the browser to "ping" response times to web servers in Javascript! This is useful for whe

Alfred Gutierrez 353 Dec 27, 2022
A simple library for Node and the browser that allows you to rapidly develop stateful, socketed multiplayer games and web applications.

gameroom.js Overview gameroom.js is a simple library for Node and the browser that allows you to rapidly develop stateful, socketed multiplayer games

Jackson Bierfeldt 3 Nov 3, 2022
A lightweight extension to automatically detect and provide verbose warnings for embedded iframe elements in order to protect against Browser-In-The-Browser (BITB) attacks.

Enhanced iFrame Protection - Browser Extension Enhanced iFrame Protection (EIP) is a lightweight extension to automatically detect and provide verbose

odacavo 16 Dec 24, 2022
Browser In The Browser (BITB) attack is a sophisticated phishing and hard to detect.

BITB Browser In The Browser (BITB) attack is a sophisticated phishing and hard to detect. Goto: ?? MacOS-Chrome-DarkMode ?? MacOS-Chrome-LightMode ??

Lục Thiên Phong 18 Dec 4, 2022
Detect browser, and render view according to the detected browser type.

react-browser-detector Detect browser, and render view according to the detected browser type. Installation To install, you can use npm or yarn: npm i

kirillsaint 5 Jul 13, 2022
make ie browser like a morden browser main for ie6~ie8,

ieBetter.js It's created for IE6-IE8. Why need this? Modern browsers are so powerfull. For some small project, there is no any reason to include a lar

zhangxinxu 796 Dec 19, 2022
Tiny and powerful JavaScript full-text search engine for browser and Node

MiniSearch MiniSearch is a tiny but powerful in-memory fulltext search engine written in JavaScript. It is respectful of resources, and it can comfort

Luca Ongaro 2k Jan 3, 2023
A JavaScript library built on top of the Faker.JS library. It generates massive amounts of fake data in the browser and node.js.

Blaver - generate massive amounts of fake data in the browser and node.js Blaver is a JavaScript library built on top of the Faker.JS library. It gene

Priyansh 113 Dec 30, 2022
Pintora is an extensible javascript text-to-diagrams library that works in both browser and Node.js.

Pintora Documentation | Live Editor Pintora is an extensible javascript text-to-diagrams library that works in both browser and Node.js. Expressing yo

hikerpig 652 Dec 30, 2022
Build Schema.org graphs for JavaScript Runtimes (Browser, Node, etc). Improve your sites SEO with quick and easy Rich Results.

schema-org-graph-js The quickest and easiest way to build Schema.org graphs for JavaScript Runtimes (Browser, Node, etc). Status: ?? In Development Pl

Harlan Wilton 17 Dec 21, 2022