Statistics Overview
MAPS can attach statistical analysers to event streams.
These analysers consume events, compute statistics, and periodically emit a summary event in JSON format.
Available Analysers
Analyser | Metrics Produced |
---|---|
Base | open, close, high, low, average |
Advanced | Base + stdDev, slope, intercept |
Moment | Advanced + skewness, kurtosisExcess |
MovingAverage | Base + 1, 5, 10, 15 minute moving averages |
Quality | Advanced + missing, NaN, infinite, outliers, outlierStdDevs |
Quantiles | Advanced + median, p90, p95, p99 |
Trend | Advanced + timestampSlopePerSec, timestampIntercept |
Window | windowSize, windowCount, windowMean, windowStdDev |
Example Outputs
Advanced Example
{
"temperature": {
"first": 27.8,
"last": 27.9,
"min": 27.7,
"max": 27.9,
"average": 27.84,
"count": 10,
"stdDev": 0.0699,
"slope": -0.0024,
"intercept": 27.85
},
"O₂": {
"first": 19.5,
"last": 19.5,
"min": 19.5,
"max": 19.5,
"average": 19.5,
"count": 10,
"stdDev": 0,
"slope": 0,
"intercept": 19.5
}
}
Mixed Numeric + String Example
{
"Product Name": {
"totalCount": 10,
"distribution": [
{ "value": "SEN66", "count": 10 }
]
},
"CO₂": {
"first": 488,
"last": 488,
"min": 488,
"max": 488,
"average": 488,
"count": 10,
"stdDev": 0,
"slope": 0,
"intercept": 488
},
"airQualityValue": {
"totalCount": 10,
"distribution": [
{ "value": "Hazardous", "count": 10 }
]
}
}
Configuration
Statistics are configured inside inter-server connections.
See Inter-Server Connections for full context.
Example:
links:
- direction: push
local_namespace: "/sensors/#"
remote_namespace: "/satellite/#"
include_schema: false
analytics:
defaultAnalyser: Advanced
eventCount: 10
ignoreList: "timestamp"
- eventCount: number of events to accumulate before emitting a statistics event.
- defaultAnalyser: which analyser to use (
Base
,Advanced
,Moment
, etc.). - ignoreList: comma-separated list of keys that will be excluded from analysis.
Notes
- Currently, statistics can only be configured on inter-server connections.
- Support for client-level statistics is planned in future versions, once namespace integration is finalized.
- Summary events are valid JSON and can be routed, archived, or further transformed like any other MAPS event.