# Statistics Filter¶

The *foglamp-filter-statistics* filter is designed to accept data from one or more asset and produces statistics over specified time intervals, for example produce the mean, standard deviation and variance for 100 milliseconds samples of the data. The statistics that can be produced are;

mean - the average of all the values in the time period calculated by adding up all the values and dividing by the number of values.

mode - the number that appears most often in the time period.

median - the median is found by sorting all the values in the time period and then choosing the middle number in this sorted set

minimum - the minimum value that appears within the time period

maximum - the maximum value that appears within the time period

standard deviation - the standard deviation measures the spread of the numbers above and below the mean value

variance - the variance is the average of the squared differences from the mean value calculated over the time period

Statistics filters are added in the same way as any other filters.

Click on the Applications add icon for your service or task.

Select the

statisticsplugin from the list of available plugins.Name your statistics filter.

Click

Nextand you will be presented with the following configuration page

Configure your statistics filter

Mean: A toggle that controls inclusion of the mean value

Mode: A toggle that controls inclusion of the mode value

Median: A toggle that controls inclusion of the median value

Minimum: A toggle that controls inclusion of the minimum value

Maximum: A toggle that controls inclusion of the maximum value

Standard Deviation: A toggle that controls inclusion of the standard deviation value

Variance: A toggle that controls inclusion of the variance valueEnable your filter and click

Done

## See Also¶

foglamp-filter-ADM_LD_prediction - Filter to detect whether a large discharge is required for a centrifuge

foglamp-filter-conditional-labeling - Attach labels the reading data based on a set of expressions matched against the data stream.

foglamp-filter-enumeration - A filter to map between symbolic names and numeric values in a datapoint.

foglamp-filter-expression - A FogLAMP processing filter plugin that applies a user define formula to the data as it passes through the filter

foglamp-filter-fft - A FogLAMP processing filter plugin that calculates a Fast Fourier Transform across sensor data

foglamp-filter-log - A FogLAMP filter that converts the readings data to a logarithmic scale. This is the example filter used in the plugin developers guide.

foglamp-filter-metadata - A FogLAMP processing filter plugin that adds metadata to the readings in the data stream

foglamp-filter-normalise - Normalise the timestamps of all readings that pass through the filter. This allows data collected at different rate or with skewed timestamps to be directly compared.

foglamp-filter-omfhint - A filter plugin that allows data to be added to assets that will provide extra information to the OMF north plugin.

foglamp-filter-python35 - A FogLAMP processing filter that allows Python 3 code to be run on each sensor value.

foglamp-filter-rms - A FogLAMP processing filter plugin that calculates RMS value for sensor data

foglamp-filter-scale-set - A FogLAMP processing filter plugin that applies a set of sale factors to the data

foglamp-filter-specgram - FogLAMP filter to generate spectrogram images for vibration data

foglamp-filter-vibration_features - A filter plugin that takes a stream of vibration data and generates a set of features that characterise that data

foglamp-south-Expression - A FogLAMP south plugin that uses a user define expression to generate data