Ok so I’m being forced to switch to flux as there is no timeShift in the old language.
I got the basics, but can someone help me find where is the moving average function to smooth out the graphs? I have seen some blog post about expotentialmovingaverage in flux bu chronograph does not have it in the list of functions?
TIA
Hi @Maciej_Eckstein , I’m checking with the Flux team to see if that is still an available function, or if perhaps it has been renamed.
Hi @Maciej_Eckstein I checked with the team and there isn’t a specific moving average function yet.
That is a huge ommsion, hope it gets introduced soon.
Hello @Maciej_Eckstein ,
What are you looking to do? It’s possible that you might be able to use kapacitor or a CQ to compute the SMA.
I need to smooth out the graph of daily pool temperature that I collect with Openhab. That can wait until there is a proper moving average function.
Work is now being done on moving average in flux…
# Flux Specification
The following document specifies the Flux language and query execution.
## Language
The Flux language is centered on querying and manipulating time series data.
### Notation
The syntax of the language is specified using Extended Backus-Naur Form (EBNF):
Production = production_name "=" [ Expression ] "." .
Expression = Alternative { "|" Alternative } .
Alternative = Term { Term } .
Term = production_name | token [ "…" token ] | Group | Option | Repetition .
Group = "(" Expression ")" .
Option = "[" Expression "]" .
Repetition = "{" Expression "}" .
Productions are expressions constructed from terms and the following operators, in increasing precedence:
This file has been truncated. show original
influxdata:master
← influxdata:feat/moving-average
opened 03:57PM - 28 Jun 19 UTC
### Done checklist
- [x] docs/SPEC.md updated
- [x] Test cases written
opened 09:45PM - 01 Jul 19 UTC
closed 04:00PM - 24 Jul 19 UTC
team/query
The current definition of `movingAverage` written in pure Flux produces in dupli… cate rows at the end of the result table.
- Implement moving average in flux, and
- add a planner rules
The planner rules will look for the pattern of `window + mean + duplicate` and internally rewrite it to use the Go implementation of moving average, which will prevent the creation of duplicate rows.
Thanks,
Michael Angerman
Corvallis, Oregon