Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving average in graphs for trend identification #1718

Closed
anonymous-matomo-user opened this issue Sep 22, 2010 · 6 comments
Closed

Moving average in graphs for trend identification #1718

anonymous-matomo-user opened this issue Sep 22, 2010 · 6 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@anonymous-matomo-user
Copy link

Hi, I'd like to see a simple moving average line in some graphs, mainly visitors.

Rationale: On daily graphs, peaks are not uncommon. Those make it hard to see if the overall trend goes up or down.

Enter The Moving Average Indicator.

I suggest a 5-day moving average, this would result in 6 more data points that will have to be rendered in the default 30-day-view.

Thanks for your consideration!
Keywords: wishlist

@robocoder
Copy link
Contributor

A 5-day moving average means that each day we also compute the average over the last 5 days. On a 30 day view, that's 26 or 30 data points, depending on the implementation.

Where period != day, the moving average is less useful because aggregation also has a smoothing effect on data.

Such a feature would be nicer if OFC had the ability to smooth a line via bezier curves / cubic splines.

@anonymous-matomo-user
Copy link
Author

Replying to vipsoft:

A 5-day moving average means that each day we also compute the average over the last 5 days.

You're right, my bad. Thanks for checking the numbers.

Where period != day, the moving average is less useful because aggregation also has a smoothing effect on data.

Exactly!

Such a feature would be nicer if OFC had the ability to smooth a line via bezier curves / cubic splines.

Oooh, that would be cool!

@anonymous-matomo-user
Copy link
Author

Here's another wrinkle. I have several sites where the weekday usage is several times the weekend usage. A straight 5-day moving average, which would be a great idea for many sites, would be misleading in this case. It would fit my use case here much better if it was possible to exclude certain days from the 5-day average - i.e. use the last 5 weekdays and just skip over the weekends. Or better yet, have one moving average for just the weekdays and another for just the weekends.

@anonymous-matomo-user
Copy link
Author

I don't think excluding specific days is the right way to go here. After all, I am suggesting a SMA to flatten peaks and see a smooth trend over time, without re-introducing separate data points.

@anonymous-matomo-user
Copy link
Author

The complication in my case is that I basically have two smooth trends over time: the weekday trend and the weekend trend. This might be out of scope; if so, I can just not use the moving average feature for these sites.

Actually, the other moving average that would be useful would be to see both the most recent, say, Tuesday's number, and the moving average of the past 5 Tuesdays. Just food for thought.

@mattab
Copy link
Member

mattab commented Nov 16, 2010

I don't think we will implement this in core, but if a patch comes in we will definitely consider.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants