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

With or without an As Timeseries widget, the transformation to timeseries should behave the same way #85

Closed
irgolic opened this issue Mar 29, 2020 · 8 comments

Comments

@irgolic
Copy link
Member

irgolic commented Mar 29, 2020

Connecting a Data output to a Time series input is allowed, but just shows a horizontal line.

Time series widgets should infer that 'As Timeseries' was supposed to be added in between, and try to use the first datetime feature as the sequential attribute, or instance ordering if there's no datetime feature.

@kernc
Copy link
Contributor

kernc commented Mar 29, 2020

Time series widgets should infer that 'As Timeseries' was supposed to be added in between,

This is the case.

and try to use the first datetime feature as the sequential attribute

This is the case.

or instance ordering if there's no datetime feature.

And this is not (yet).

IIRC, the widget is there exactly to make the choice of the temporal attribute convenient and explicit.

@ajdapretnar
Copy link
Collaborator

I think it is necessary if there is more than one time variable or there is an non-explicit continuous variable with 'pseudotime'.

@irgolic
Copy link
Member Author

irgolic commented Mar 30, 2020

Ah, I should've opened with the use case.

My dataset contains a couple of different sources merged together, so the timestamps are a bit jumbled. It seems the time delta isn't detected properly if I plug Data directly into a timeseries widget, but it works fine if I run it through As Timeseries.

@kernc
Copy link
Contributor

kernc commented Mar 30, 2020

Yeah, in addition, the widget sorts:

ordered = np.argsort(values)
if (ordered != np.arange(len(ordered))).any():
data = data[ordered]

@irgolic
Copy link
Member Author

irgolic commented Mar 30, 2020

I see. Plugging in what I did probably isn't too meaningful anyway, more than anything else, I was just confused as to why it was acting differently. It'd be nice if it sorted without As Timeseries too.

@ajdapretnar
Copy link
Collaborator

@irgolic Perhaps rename the issue?

@irgolic irgolic changed the title Is the 'As Timeseries' widget necessary? A Timeseries should always be sorted Apr 3, 2020
@irgolic irgolic mentioned this issue Apr 7, 2020
8 tasks
@irgolic
Copy link
Member Author

irgolic commented Apr 7, 2020

Related: NaNs should be ignored when Data is converted to Timeseries, and in As Timeseries, a warning should be thrown instead of an error upon NaNs.

Ideally, a warning should be shown in any Timeseries widget if there's NaN values present in the time variable. What's the easiest way of implementing this across the add-on, without duplicating Warning code in each widget?

@irgolic irgolic changed the title A Timeseries should always be sorted With or without an As Timeseries widget, the transformation to timeseries should behave the same way Apr 7, 2020
@ajdapretnar
Copy link
Collaborator

Fixed via #95.

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

3 participants