For realtime statistics mluvii uses specialized timeseries database influx.
For data filtering in influx use scripting language flux.