Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-statistics

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-statistics

A node-red node to perform simple statistical operations on a flow.

  • 2.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
142
decreased by-2.74%
Maintainers
1
Weekly downloads
 
Created
Source

Node Red Statistics

Calculates statistics about input data. This is a wrapper around the Simple Statistics Node library.

Inputs

Normally, the value of an input property is saved into the data set. The input property may also contain an array of values which will be saved into the data set. If data set size is greater that 0 then the size of the data set will be limited to the number of elements specified, with the oldest elements dropped first.

When a message is received with a MQTT format topic that ends with a sub-topic that is a statistical function name, that statistic is calculated and output to the output property. For example, a message with the topic data/mean would output the mean of the data received so far. Optionally, the function name can be stripped from the topic. For statistical functions that require a parameter, the parameter is passed in using the parameter property.

Functions

The functions in the Simple Statistics library that are supported are:

  • bernoulliDistribution
  • chunk
  • ckmeans
  • cumulativeStdNormalProbability
  • equalIntervalBreaks
  • errorFunction
  • extent
  • factorial
  • inverseErrorFunction
  • gamma
  • geometricMean
  • harmonicMean
  • interquartileRange
  • medianAbsoluteDeviation
  • max
  • mean
  • median
  • min
  • mode
  • poissonDistribution
  • probit
  • product
  • quantile
  • quantileRank
  • rootMeanSquare
  • sample
  • sampleWithReplacement
  • sampleKurtosis
  • sampleSkewness
  • sampleStandardDeviation
  • shuffle
  • standardDeviation
  • sum
  • sumNthPowerDeviations
  • tTest
  • uniqueCount
  • variance

In addition, three other functions are implemented:

  • size - returns the size of the data set
  • clear - clears the data set
  • dump - dumps the data set in an array

These three functions can also contain a data item or array of data items which are added to the data set before calculating the result for size or dump, or after the data set is cleared for clear.

For more detailed information about the functions see the Simple Statistics API documentation.

Keywords

FAQs

Package last updated on 20 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc