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

New time_pivot visualization #3941

Merged
merged 3 commits into from
Dec 7, 2017
Merged

Conversation

mistercrunch
Copy link
Member

No description provided.

@mistercrunch
Copy link
Member Author

@williaster @graceguo-supercat I'd love a review on this pretty plz

@williaster
Copy link
Contributor

sorry will 👀 !

Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This lgtm overall, my major concerns are language/terminology :)

Also do you have any thoughts on how this would integrate with annotations? (on my mind : )

clearable: false,
choices: [
['AS', '[AS] Year'],
['52W-MON', '[52W-MON] 52 Weeks (starting Monday)'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should there be an equivalent for 52 Weeks (starting Sunday)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to add in the default list. It's just hard to know where to stop (other days of the week?). My intent was to show a few example expression and let the users compose their own following the pattern. I'll clarify the help text and add more examples.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see, yeah no need to add. I thought you were maybe doing the defaults based on known use-cases as opposed to generic variety so I think not adding is 👍

['4W-MON', '[4W-MON] 4 Weeks'],
],
description: t(
'The frequency over which to pivot time. Free-form "pandas" offset alias ' +
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use text ticks `text` and wrap without concatenation (it inserts spaces for newlines)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I didn't know ticks did that. neat

superset/viz.py Outdated
@@ -1136,6 +1146,47 @@ class NVD3TimeSeriesBarViz(NVD3TimeSeriesViz):
verbose_name = _('Time Series - Bar Chart')


class NVD3TimePivotViz(NVD3TimeSeriesViz):

"""Overlapping time series"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Overlayed" maybe seems more accurate?

freeForm: true,
clearable: false,
choices: [
['AS', '[AS] Year'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does AS mean here?
EDIT: I see it's pandas jargon. Can you just encode AS as the value and remove AS just using year in the label? novice users are not going to understand that and even though it says year currently they might think it's doing something else confusing and be unsure of their selection because it says AS

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get that it's confusing, and was trying to be transparent about the pandas freq mapping. Especially given that this is a freeform dropdown allowing them to use whatever valid pandas freq. Maybe moving to Year (freq=AS) and following that pattern?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree transparency is valuable. I think that pattern is a good middle ground!

@@ -195,6 +195,50 @@ export const visTypes = {
},
},

time_pivot: {
label: t('Time Series - Period Pivot'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the terminology for this visualization is confusing, you intermix "period" and "frequency" a lot and I think both of those are confusing for people not already familiar with more complex data analysis.

What do you think of calling this Time Series -- Seasonality Pivot and using seasonality consistently? If you don't like that, I think periodicity is next best.

cc @elibrumbaugh @graceguo-supercat for thoughts!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good point. We're planning to use this mostly on periodicity of week and day at Lyft, so I prefer "periodicity" to "seasonality" which seems to imply year...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, "seasonality" does seem most associated with year although it doesn't have to be. "periodicity"++

@mistercrunch
Copy link
Member Author

Adressed comments, mergin.

@mistercrunch mistercrunch merged commit 5bc581f into apache:master Dec 7, 2017
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* New time_pivot visualization

* Minor tweaks

* Addressing comments
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* New time_pivot visualization

* Minor tweaks

* Addressing comments
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.21.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.21.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants