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 Transform : Aggregate by week #278

Open
alaindebecker opened this issue Apr 23, 2024 · 3 comments
Open

Moving Transform : Aggregate by week #278

alaindebecker opened this issue Apr 23, 2024 · 3 comments

Comments

@alaindebecker
Copy link

Timeseries version

0.6.3

Orange version

3.36

Expected behavior

Should be able to group by weeks.

I work with data for which are undervalued on week end (due to Business not to reporting). Furthermore this data is daily on a time period and sometimes becomes weekly (also for Business reasons).
I am used to replace the date by the end_of_week and group_by this date (which I can do with a Formula + Group_By, but that is a workaround).

It would be a real plus if Orange/timeseries could handle this situation.

Actual behavior

Can group by year, month, day,... and by week_of_year but not by week.
Also, it is not possible to group by Year (in one column) and Week_of_year (in another).

Steps to reproduce the behavior

Click on the widget icon and look at the dropdown menu.

Additional info (worksheets, data, screenshots, ...)
  • Sincere congratulations for the widget

  • Nice to have : be able to select the begining/end of week/year/month,...

  • Question : what is the difference between Sliding_window and Consecutive_blocks, especially in the case you do not have a measure at regular intervals ?

@janezd
Copy link
Collaborator

janezd commented Apr 23, 2024

This makes perfect sense. The problem is that this add-on currently has no "custodian". All regular contributors are spread thin on other parts of the project. Would you perhaps be able to contribute a patch?

Note to self or to whoever implements this: in orangecontrib.timeseries.time_blocks, basically take the number of days that passed from some date in the past (like here below) and divide by 7. Note that this will not work for dates prior to Gregorian reform because Python's datetime incorrectly assumes that 11 days have passed between Oct 4 and Oct 15 1582.

>>> (date(1582, 10, 15) - date(1582, 10, 4)).days
11

I guess we don't care about this bug, though.

@janezd
Copy link
Collaborator

janezd commented Apr 23, 2024

Question : what is the difference between Sliding_window and Consecutive_blocks, especially in the case you do not have a measure at regular intervals ?

As far as I remember, in sliding window of size n (except those in tails), each measurement appears in n consecutive windows. In consecutive blocks, data is cut into blocks, so each measurement appears once.

@alaindebecker
Copy link
Author

Would you perhaps be able to contribute a patch?
With pleasure. Orange is a so nice product. However, let me get a bit more familiar with it first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants