node-red-contrib-statistics 1.1.0

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

npm install node-red-contrib-statistics

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


Normally, the value of msg.payload is saved into the data set. When a message with a topic that ends in a statistical function name is received, that statistic is calculated and output as the msg.payload. 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 msg.payload.


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

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

In addition, two other functions are implemented:

  • size - returns the size of the data set
  • clear - clears the data set

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

Node Info

Version: 1.1.0
Updated 7 months, 2 weeks ago
License: MIT


2 in the last day
37 in the last week
108 in the last month


  • statistics


  • node-red
  • statistics


  • deancording