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

[Feedback] Page: /api/latest/hyperfunctions/month_normalize/ #3536

Open
nicolasembleton opened this issue Oct 27, 2024 · 3 comments
Open

[Feedback] Page: /api/latest/hyperfunctions/month_normalize/ #3536

nicolasembleton opened this issue Oct 27, 2024 · 3 comments
Assignees
Labels
community Raised by a community member documentation Improvements or additions to documentation feedback Submissions from the docs site feedback form

Comments

@nicolasembleton
Copy link

Is it easy to find the information you need?

No

Are the instructions clear?

Yes

How could we improve the Timescale documentation site?

Apologies if I'm dense but what does "normalize" mean in this context? Can't make sense of this. Why is 1000 for 01/01/2021 suddenly becomes 981.xxx when normalized?

@nicolasembleton nicolasembleton added community Raised by a community member documentation Improvements or additions to documentation feedback Submissions from the docs site feedback form labels Oct 27, 2024
Copy link

Thank you for the report. We welcome documentation contributions!

  • For information about how to propose a change, see the contributing guide in our GitHub repository.
  • For information on style and word usage, see the style guide

@billy-the-fish
Copy link
Contributor

@mkindahl , any chance you could give me a one liner about what normalize means in https://docs.timescale.com/api/latest/hyperfunctions/month_normalize/. I found https://www.postgresql.org/docs/current/datatype-datetime.html but it seems like a long read :-).

@mkindahl
Copy link
Contributor

mkindahl commented Oct 30, 2024

The function month_normalize is intended to translate a metric to a "standard month" of 365.25/12 days, so that you can compare two month and decide, e.g., which one is better. As an example, consider the following metrics for a few months:

Month Sales
Jan 3000
Feb 2900
Mar 2900

In this case it looks like January was the best month, but if you normalize this, you get the following result:

Month Normalized Sales
Jan 2945.56
Feb 3152.46
Mar 2847.38

So it turns out that the better month was actually February. This is because February have just 28 days (in this example) and the other months have 31 days. For that reason, since the month is shorter, it has a better outcome.

It could equivalently be defined as "income per day times 365.25/12 or the value of 'days'".

@billy-the-fish billy-the-fish self-assigned this Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Raised by a community member documentation Improvements or additions to documentation feedback Submissions from the docs site feedback form
Projects
None yet
Development

No branches or pull requests

3 participants